Machine Learning is the study of computer algorithms that improve automatically through experience. There are a large number of machine learning algorithms according to the problem and the dataset we are dealing with.

Machine Learning model performance is the most factor in selecting a particular model. In order to select a machine learning model, we can look at certain metrics that can help us select the best model with the highest accuracy and minimum error. Other than all these factors the most important factors which show the model performance are different types of visualizations. We can use visualizations like Prediction Error and Residual Plots to select the best performing model.

Yellowbrick is an open-source python library/package which extends the Scikit-Learn API to make the model selection and hyperparameter tuning easier. Under the hood, it’s using Matplotlib.

In this article, we will explore how we can visualize the model performance of Linear, Ridge, and Lasso Regression using the visualization namely Residual Plots and Prediction Error created using Yellowbrick.

Installing Yellowbrick

Like any other library, we will install yellowbrick using pip.

pip install yellowbrick

Importing Required Libraries

We will be using Linear, Ridge, and Lasso Regression models defined under the sklearn library other than that we will be importing yellowbrick for visualization and pandas to load our dataset.

from sklearn.linear_model import LinearRegression, Lasso, Ridge
from sklearn.preprocessing import StandardScaler
from sklearn.model_selection import train_test_split
from yellowbrick.regressor import PredictionError, ResidualsPlot
import pandas as pd

#machine-learning #data-science #data-visualization #data-analysis #python

Visualizing Linear, Ridge, and Lasso Regression Performance
10.30 GEEK