COMPARISON - Jupyter Notebook
COMPARISON - Jupyter Notebook
In [7]: X = data[['Q. id', 'Wheat Area', 'Wheat Seed', 'Fertilizer kg', 'Consumption']
y = data['Production']
localhost:8888/notebooks/COMPARISON.ipynb 1/5
11/24/24, 3:30 PM COMPARISON - Jupyter Notebook
In [337]: preprocessor
Out[337]: ColumnTransformer(remainder='passthrough',
transformers=[('standarization', StandardScaler(),
[0, 1, 2, 3, 4])])
In a Jupyter environment, please rerun this cell to show the HTML representation or trust
the notebook.
On GitHub, the HTML representation is unable to render, please try loading this page with
nbviewer.org.
In [340]: X_train_dummy
In [305]: models = {
# 'Linear Regression': LinearRegression(),
# 'Decision Tree': DecisionTreeRegressor(),
# 'K-Nearest Neighbors': KNeighborsRegressor(),
'Neural Network': MLPRegressor(max_iter=1000),
'Random Forest': RandomForestRegressor(n_estimators=100, random_state=42),
'Gradient Boosting': GradientBoostingRegressor(n_estimators=100, random_sta
'Gaussian Process': GaussianProcessRegressor(kernel=RBF())
}
localhost:8888/notebooks/COMPARISON.ipynb 2/5
11/24/24, 3:30 PM COMPARISON - Jupyter Notebook
C:\Users\swp\anaconda3\Lib\site-packages\sklearn\gaussian_process\_gpr.py:65
9: ConvergenceWarning: lbfgs failed to converge (status=2):
ABNORMAL_TERMINATION_IN_LNSRCH.
Increase the number of iterations (max_iter) or scale the data as shown in:
https://scikit-learn.org/stable/modules/preprocessing.html (https://sciki
t-learn.org/stable/modules/preprocessing.html)
_check_optimize_result("lbfgs", opt_res)
localhost:8888/notebooks/COMPARISON.ipynb 3/5
11/24/24, 3:30 PM COMPARISON - Jupyter Notebook
C:\Users\swp\anaconda3\Lib\site-packages\sklearn\gaussian_process\_gpr.py:65
9: ConvergenceWarning: lbfgs failed to converge (status=2):
ABNORMAL_TERMINATION_IN_LNSRCH.
Increase the number of iterations (max_iter) or scale the data as shown in:
https://scikit-learn.org/stable/modules/preprocessing.html (https://sciki
t-learn.org/stable/modules/preprocessing.html)
_check_optimize_result("lbfgs", opt_res)
localhost:8888/notebooks/COMPARISON.ipynb 4/5
11/24/24, 3:30 PM COMPARISON - Jupyter Notebook
In [ ]:
In [ ]:
In [ ]:
localhost:8888/notebooks/COMPARISON.ipynb 5/5