Loop: 0
--------------
R2 score: 0.900071279487
Best Score: 0.61802821072
Best params: {'max_features': 'log2', 'min_samples_split': 2, 'bootstrap': False, 'n_estimators': 10}
Loop: 1
--------------
R2 score: 0.993462885564
Best Score: 0.671309726329
Best params: {'max_features': 'log2', 'min_samples_split': 4, 'bootstrap': False, 'n_estimators': 10}
Loop: 2
--------------
R2 score: -0.181378339338
Best Score: -30.9012120698
Best params: {'max_features': 'log2', 'min_samples_split': 4, 'bootstrap': True, 'n_estimators': 20}
Loop: 3
--------------
R2 score: 0.750116663033
Best Score: 0.71472985391
Best params: {'max_features': 'log2', 'min_samples_split': 4, 'bootstrap': False, 'n_estimators': 30}
Loop: 4
--------------
R2 score: 0.692075744759
Best Score: 0.715012972471
Best params: {'max_features': 'sqrt', 'min_samples_split': 2, 'bootstrap': True, 'n_estimators': 30}
¿Warum erhalte ich unterschiedliche Ergebnisse im R2-Score?, ¿Das liegt daran, dass ich CV=5 ausgewählt habe?, ¿Das liegt daran, dass ich auf meinem RandomForestRegressor() keinen random_state=0 ermittelt habe?
[url=viewtopic.php?t=30561]Ich möchte[/url] die Parameter dieses [b]GridSearchCV[/b] für einen [b]Random Forest Regressor[/b] verbessern.
[code]def Grid_Search_CV_RFR(X_train, y_train): from sklearn.model_selection import GridSearchCV from sklearn.model_selection import ShuffleSplit from sklearn.ensemble import RandomForestRegressor
def splitter_v2(tab,y_indicator): from sklearn.model_selection import train_test_split # Asignamos X e y, eliminando la columna y en X X = correlacion(tab,y_indicator) y = tab[:,y_indicator] # Separamos Train y Test respectivamente para X e y X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2) return X_train, X_test, y_train, y_test [/code]
Ich habe diese [b]Funktion[/b] 5 Mal mit diesem Code verwendet:
[code]Loop: 0 -------------- R2 score: 0.900071279487 Best Score: 0.61802821072 Best params: {'max_features': 'log2', 'min_samples_split': 2, 'bootstrap': False, 'n_estimators': 10} Loop: 1 -------------- R2 score: 0.993462885564 Best Score: 0.671309726329 Best params: {'max_features': 'log2', 'min_samples_split': 4, 'bootstrap': False, 'n_estimators': 10} Loop: 2 -------------- R2 score: -0.181378339338 Best Score: -30.9012120698 Best params: {'max_features': 'log2', 'min_samples_split': 4, 'bootstrap': True, 'n_estimators': 20} Loop: 3 -------------- R2 score: 0.750116663033 Best Score: 0.71472985391 Best params: {'max_features': 'log2', 'min_samples_split': 4, 'bootstrap': False, 'n_estimators': 30} Loop: 4 -------------- R2 score: 0.692075744759 Best Score: 0.715012972471 Best params: {'max_features': 'sqrt', 'min_samples_split': 2, 'bootstrap': True, 'n_estimators': 30} [/code]
¿Warum erhalte ich [b]unterschiedliche Ergebnisse[/b] im [b]R2-Score[/b]?, ¿Das liegt daran, dass ich [b]CV=5[/b] ausgewählt habe?, ¿Das liegt daran, dass ich auf meinem [b]RandomForestRegressor()[/b] keinen [b]random_state=0[/b] ermittelt habe?
In meiner Deep-Learning-Übung musste ich einen Parameter D1 mit der gleichen Größe wie A1 initialisieren, also habe ich Folgendes getan:
D1 = np.random.randn(A1.shape ,A1.shape )
Ich stoße auf ein Problem in Bezug auf Xgboost -Regressor. Es erzeugt keine Standardwerte, wie in Abbildung unten gezeigt. Was könnte der Grund dafür sein, dass die Standardwerte für das XSGBOOST...
Ich versuche, den GridSearchCV von sklearn.model_selection zu verwenden. Meine Daten sind eine Reihe von Klassifizierungen, die nach Zeit indiziert sind. Daher möchte ich bei der Kreuzvalidierung,...
Ich führe eine GridSearchCV -Optimierung in eine parallelisierte Funktion aus. Der Pseudocode sieht so aus
from tqdm.contrib.concurrent import process_map
from sklearn.model_selection import...
Ich arbeite an einem Projekt, bei dem ich die Sekunden von Audio und Videobildern mithilfe eines zufälligen Zustands in Python neu anordne, mit dem Ziel, die Reihenfolge zu „verschlüsseln“. Nach der...