Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # General Imports
- import pandas as pd
- import numpy as np
- from sklearn.model_selection import train_test_split, KFold
- from sklearn.preprocessing import MinMaxScaler
- from sklearn.metrics import mean_squared_error
- # 1. Linear Regression
- from sklearn.linear_model import LinearRegression
- # 2. Polynomial Regression (using PolynomialFeatures)
- from sklearn.preprocessing import PolynomialFeatures
- # 3. Ridge Regression
- from sklearn.linear_model import Ridge
- # 4. Lasso Regression
- from sklearn.linear_model import Lasso
- # 5. Elastic Net Regression
- from sklearn.linear_model import ElasticNet
- # 6. Bayesian Ridge Regression
- from sklearn.linear_model import BayesianRidge
- # 7. Ordinary Least Squares Regression (OLS)
- # OLS is also implemented by LinearRegression, so no specific import needed
- # 8. Huber Regression
- from sklearn.linear_model import HuberRegressor
- # 9. Theil-Sen Estimator
- from sklearn.linear_model import TheilSenRegressor
- # 10. Quantile Regression
- from sklearn.linear_model import QuantileRegressor
- # 11. Decision Tree Regression
- from sklearn.tree import DecisionTreeRegressor
- # 12. Random Forest Regression
- from sklearn.ensemble import RandomForestRegressor
- # 13. Gradient Boosting Regression
- from sklearn.ensemble import GradientBoostingRegressor
- # 14. XGBoost Regression
- import xgboost as xgb
- # 15. LightGBM Regression
- import lightgbm as lgb
- # 16. CatBoost Regression
- from catboost import CatBoostRegressor
- # 17. Support Vector Regression (SVR)
- from sklearn.svm import SVR
- # 18. K-Nearest Neighbors Regression (KNNR)
- from sklearn.neighbors import KNeighborsRegressor
- # 19. Principal Component Regression (PCR)
- from sklearn.decomposition import PCA
- from sklearn.linear_model import LinearRegression
- # 20. Partial Least Squares Regression (PLSR)
- from sklearn.cross_decomposition import PLSRegression
- # 21. Artificial Neural Networks (ANN) Regression
- from sklearn.neural_network import MLPRegressor
- # 22. Multi-layer Perceptron (MLP) Regression
- from sklearn.neural_network import MLPRegressor
- # 23. Stochastic Gradient Descent (SGD) Regression
- from sklearn.linear_model import SGDRegressor
- # 24. Bayesian Regression
- # This is another term that can refer to several models, including BayesianRidge
- from sklearn.linear_model import BayesianRidge
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement