{"cells": [{"cell_type": "markdown", "metadata": {"slideshow": {"slide_type": "slide"}}, "source": ["# API de sciki-learn et mod\u00e8les customis\u00e9s\n", "\n", "*scikit-learn* est devenu le module incontournable quand il s'agit de machine learning. Cela tient en partie \u00e0 son API \u00e9pur\u00e9e qui permet \u00e0 quiconque d'impl\u00e9menter ses propres mod\u00e8les tout permettant \u00e0 *scikit-learn* de les manipuler comme s'il s'agissait des siens."]}, {"cell_type": "code", "execution_count": 1, "metadata": {"slideshow": {"slide_type": "subslide"}}, "outputs": [{"data": {"text/html": ["
\n", ""], "text/plain": ["Pipeline(steps=[('norm', Normalizer()), ('pca', PCA()),\n", " ('lr', LogisticRegression())])In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
Pipeline(steps=[('norm', Normalizer()), ('pca', PCA()),\n", " ('lr', LogisticRegression())])
Normalizer()
PCA()
LogisticRegression()
\n", " | 0 | \n", "1 | \n", "2 | \n", "3 | \n", "label | \n", "
---|---|---|---|---|---|
0 | \n", "5.1 | \n", "3.5 | \n", "1.4 | \n", "0.2 | \n", "0 | \n", "
1 | \n", "4.9 | \n", "3.0 | \n", "1.4 | \n", "0.2 | \n", "0 | \n", "
2 | \n", "4.7 | \n", "3.2 | \n", "1.3 | \n", "0.2 | \n", "0 | \n", "
3 | \n", "4.6 | \n", "3.1 | \n", "1.5 | \n", "0.2 | \n", "0 | \n", "
4 | \n", "5.0 | \n", "3.6 | \n", "1.4 | \n", "0.2 | \n", "0 | \n", "
LassoRandomForestRegressor(lasso_estimator=Lasso(),\n", " rf_estimator=RandomForestRegressor())In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
LassoRandomForestRegressor(lasso_estimator=Lasso(),\n", " rf_estimator=RandomForestRegressor())
Lasso()
Lasso()
RandomForestRegressor()
RandomForestRegressor()
LassoRandomForestRegressor(lasso_estimator=LassoLarsIC(),\n", " rf_estimator=RandomForestRegressor())In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
LassoRandomForestRegressor(lasso_estimator=LassoLarsIC(),\n", " rf_estimator=RandomForestRegressor())
LassoLarsIC()
LassoLarsIC()
RandomForestRegressor()
RandomForestRegressor()