Linear regression
is one of the fundamental statistical and machine learning techniques.
Regression
searches for relationships among variables.
Scikit-learn
is a powerful Python module for machine learning.
First import libraries into ipynb -
import numpy as np
import pandas as pd
import scipy.stats as stats
import matplotlib.pyplot as plt
import sklearn
you can do train-test split by dividing your data sets randomly. Scikit learn provides a function called train_test_split to do this.
Residual plots are a good way to visualize the errors in your data.