January 2020
Beginner to intermediate
372 pages
10h
English
Let's begin by importing the necessary libraries:
import pandas as pdimport numpy as npimport matplotlib.pyplot as pltimport seaborn as snsfrom sklearn.linear_model import LinearRegression
To proceed with this recipe, let's create a toy dataframe with an x variable that follows a normal distribution and shows a linear relationship with a y variable.
np.random.seed(29)x = np.random.randn(200)
Read now
Unlock full access