Setup Libraries
Learn.
In this section we will learn how to setup generic libraries (e.g. Math, Plot etc.)
# Import core libraries code for numerical computing, data analysis, visualization, and suppress warnings
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
import warnings
warnings.filterwarnings(‘ignore’)
Next, we’ll setup machine learning model libraries (e.g. Linear regression, Classification etc.)
# import model libraries include
from sklearn.model_selection import train_test_split
from sklearn.linear_model import LinearRegression
from sklearn.linear_model import Ridge ## Ridge regression
from sklearn.linear_model import Lasso ## Lasso regression
from sklearn.linear_model import ElasticNet ## Elastic Net regression
from sklearn.metrics import mean_squared_error, r2_score, mean_absolute_error
note. you can either copy the code from the leaning section or write and execute it in the python notebook on the right.
Tip: Use straight quotes (e.g., “Hello”) instead of curly quotes (e.g., “Hello”). When you copy and paste code, quotes may change automatically and lead to errors.