[scikit-learn] Random Forest with Mean Absolute Error
rdslater at gmail.com
Sun Oct 23 18:37:30 EDT 2016
I searched the archives to see if this was a known issue, but could not
seem to find anyone else having the problem.
Nevertheless, in the latest version (0.18) Random Forest Regressor has the
new option of 'mae' for criterion. However it appears to run
disporportinally longer than the 'mse' critera,
from sklearn.ensemble import RandomForestRegressor
oob_score=True, n_jobs=1, random_state=0,
from sklearn.ensemble import ExtraTreesRegressor
from sklearn.model_selection import train_test_split
from sklearn.metrics import mean_absolute_error
X_train, X_test, y_train, y_test = train_test_split(train, loss,
I was using these two for a recent Kaggle competition. If I use
"criterion='mse'" in the Random forest it takes around 1 min to build.
Switching to 'mae' causes 100% CPU usage and 30 minutes (at least) if wait
time before I kill my kernel.
Not sure if the problem is on my end or if there is a real issue so I
wanted to reach out and see if there or others.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the scikit-learn