A random forest model.
The doc is here : http://scikit-learn.org/dev/modules/generated/sklearn.ensemble.RandomForestClassifier.html
C’est le premier modèle que j’ai utilisé. Pour 5 arbres, Kaggle me donne 75.59% de réussites.
$ python RandomForest.py
Opening the file 'train.csv' and 'test.csv'...
Find the best value for the meta parameter n_estimators, with 10 run for each...
Searching in the range : [1, 2, 4, 5, 8, 10, 20]...
Using the first part (67.00%, 596 passengers) of the training dataset as training,
and the second part (33.00%, 295 passengers) as testing !
For 1 random tree(s), learning from the first part of the dataset...
... this value of n_estimators seems to have a (mean) quality = 84.09%...
For 2 random tree(s), learning from the first part of the dataset...
... this value of n_estimators seems to have a (mean) quality = 84.03%...
For 4 random tree(s), learning from the first part of the dataset...
... this value of n_estimators seems to have a (mean) quality = 87.40%...
For 5 random tree(s), learning from the first part of the dataset...
... this value of n_estimators seems to have a (mean) quality = 87.87%...
For 8 random tree(s), learning from the first part of the dataset...
... this value of n_estimators seems to have a (mean) quality = 89.24%...
For 10 random tree(s), learning from the first part of the dataset...
... this value of n_estimators seems to have a (mean) quality = 88.71%...
For 20 random tree(s), learning from the first part of the dataset...
... this value of n_estimators seems to have a (mean) quality = 90.25%...
With trying each of the following n_estimators ([1, 2, 4, 5, 8, 10, 20]), each 10 times, the best one is 20. (for a quality = 90.25%)
Creating the random forest (of 20 estimators)...
Learning...
Proportion of perfect fitting for the training dataset = 97.31%
Predicting for the testing dataset
Prediction: wrote in the file csv/RandomForest_best.csv.
La soumission du résultat à Kaggle donne 77.38%.
Espace de recherche
Nombre de tests utilisés pour méta-apprendre
Proportion d’individus utilisés pour méta-apprendre.
La valeur optimale trouvée pour le paramètre n_estimators
The score for this classifier.