Advertisement
mayankjoin3

imports 24

Nov 8th, 2024
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.30 KB | None | 0 0
  1. # General Imports
  2. import pandas as pd
  3. import numpy as np
  4. from sklearn.model_selection import train_test_split, KFold
  5. from sklearn.preprocessing import MinMaxScaler
  6. from sklearn.metrics import mean_squared_error
  7.  
  8. # 1. Linear Regression
  9. from sklearn.linear_model import LinearRegression
  10.  
  11. # 2. Polynomial Regression (using PolynomialFeatures)
  12. from sklearn.preprocessing import PolynomialFeatures
  13.  
  14. # 3. Ridge Regression
  15. from sklearn.linear_model import Ridge
  16.  
  17. # 4. Lasso Regression
  18. from sklearn.linear_model import Lasso
  19.  
  20. # 5. Elastic Net Regression
  21. from sklearn.linear_model import ElasticNet
  22.  
  23. # 6. Bayesian Ridge Regression
  24. from sklearn.linear_model import BayesianRidge
  25.  
  26. # 7. Ordinary Least Squares Regression (OLS)
  27. # OLS is also implemented by LinearRegression, so no specific import needed
  28.  
  29. # 8. Huber Regression
  30. from sklearn.linear_model import HuberRegressor
  31.  
  32. # 9. Theil-Sen Estimator
  33. from sklearn.linear_model import TheilSenRegressor
  34.  
  35. # 10. Quantile Regression
  36. from sklearn.linear_model import QuantileRegressor
  37.  
  38. # 11. Decision Tree Regression
  39. from sklearn.tree import DecisionTreeRegressor
  40.  
  41. # 12. Random Forest Regression
  42. from sklearn.ensemble import RandomForestRegressor
  43.  
  44. # 13. Gradient Boosting Regression
  45. from sklearn.ensemble import GradientBoostingRegressor
  46.  
  47. # 14. XGBoost Regression
  48. import xgboost as xgb
  49.  
  50. # 15. LightGBM Regression
  51. import lightgbm as lgb
  52.  
  53. # 16. CatBoost Regression
  54. from catboost import CatBoostRegressor
  55.  
  56. # 17. Support Vector Regression (SVR)
  57. from sklearn.svm import SVR
  58.  
  59. # 18. K-Nearest Neighbors Regression (KNNR)
  60. from sklearn.neighbors import KNeighborsRegressor
  61.  
  62. # 19. Principal Component Regression (PCR)
  63. from sklearn.decomposition import PCA
  64. from sklearn.linear_model import LinearRegression
  65.  
  66. # 20. Partial Least Squares Regression (PLSR)
  67. from sklearn.cross_decomposition import PLSRegression
  68.  
  69. # 21. Artificial Neural Networks (ANN) Regression
  70. from sklearn.neural_network import MLPRegressor
  71.  
  72. # 22. Multi-layer Perceptron (MLP) Regression
  73. from sklearn.neural_network import MLPRegressor
  74.  
  75. # 23. Stochastic Gradient Descent (SGD) Regression
  76. from sklearn.linear_model import SGDRegressor
  77.  
  78. # 24. Bayesian Regression
  79. # This is another term that can refer to several models, including BayesianRidge
  80. from sklearn.linear_model import BayesianRidge
  81.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement