Sitemap
Geek Culture

A new tech publication by Start it up (https://medium.com/swlh).

Member-only story

Machine Learning: Evaluate your Linear Regression model

5 min readMay 11, 2023

--

With methods such as the Mean squared error and coefficient of determination.

Image by FloMagia on Pixabay

Introduction

A linear regression model attempts to find a linear relationship between the dependent and independent variables.
Mostly, it is to predict a value based on historical data.
Before that, you need to build a model, train and test it.

We will dive into the methodologies to test your linear regression model. Note the tools used may serve other models.

This article’s purpose is to explain how to estimate your model quality.
It does not detail the build and train model
steps.

Prerequisites

First of all, we have to install some tools.
matplotlib is a Python library to trace and visualise data.
You can install it with the following.

pip install matplotlib

scikit-learn is a machine learning library built besides SciPy providing model fitting, data preprocessing, model selection and whatnot.

pip install -U scikit-learn

Then Jupyter Notebook to code in Python

--

--

Flo
Flo

Written by Flo

Talk about Data Science, Machine Learning and Engineering

Responses (2)