Numpy is a library typically used for mathematical operations. When used in machine learning, the Numpy library is typically used for array modification such as transposing, converting from 1-D to 2-D arrays, etc.
import numpy as np
Matplotlib is a library that is used for visualization. When used in machine learning we can see the regression models and scatter plots of the datasets.
import matplotlib.pyplot as plt
Pandas is a data analysis and manipulation tool. Typically we use pandas as a means to import data from csv files (i.e. spreadsheets) using the read_csv function.
import pandas as pd
The SciKitLearn learn library contains basically all of the tools that we need for creating our regression models.
Encoding Categorical Data
from sklearn.compose import ColumnTransformer |
Splitting the dataset into Training and Test sets
from sklearn.model_selection import train_test_split |
Linear Regression
from sklearn.linear_model import LinearRegression |
Polynomial Regression
from sklearn.preprocessing import PolynomialFeatures |
Feature Scaling
from sklearn.preprocessing import StandardScaler |
Support Vector Regression
from sklearn.svm import SVR |
Contributing authors:
Created by kmacloves on 2020/09/28 22:44.