{"cells": [{"cell_type": "markdown", "metadata": {}, "source": ["# Hyperparam\u00e8tres, LassoRandomForestRregressor et grid_search (correction)\n", "\n", "Le notebook explore l'optimisation des hyper parama\u00e8tres du mod\u00e8le [LassoRandomForestRegressor](http://www.xavierdupre.fr/app/ensae_teaching_cs/helpsphinx/ensae_teaching_cs/ml/lasso_random_forest_regressor.html), et fait varier le nombre d'arbre et le param\u00e8tres alpha."]}, {"cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [{"data": {"text/html": ["
\n", ""], "text/plain": ["GridSearchCV(estimator=LassoRandomForestRegressor(lasso_estimator=Lasso(),\n", " rf_estimator=RandomForestRegressor()),\n", " param_grid={'lasso_estimator__alpha': [0.25, 0.5, 0.75, 1.0, 1.25,\n", " 1.5],\n", " 'rf_estimator__n_estimators': [20, 40, 60, 80, 100,\n", " 120]},\n", " verbose=1)In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
GridSearchCV(estimator=LassoRandomForestRegressor(lasso_estimator=Lasso(),\n", " rf_estimator=RandomForestRegressor()),\n", " param_grid={'lasso_estimator__alpha': [0.25, 0.5, 0.75, 1.0, 1.25,\n", " 1.5],\n", " 'rf_estimator__n_estimators': [20, 40, 60, 80, 100,\n", " 120]},\n", " verbose=1)
LassoRandomForestRegressor(lasso_estimator=Lasso(),\n", " rf_estimator=RandomForestRegressor())
Lasso()
Lasso()
RandomForestRegressor()
RandomForestRegressor()