__STYLES__

Task 1: Supervised ML (Simple Linear Regression)

Tools used in this project
Task 1: Supervised ML (Simple Linear Regression)

About this project

  1. Task - To predict a student's percentage score based on their study hours per day
  2. Platform - Google Colab
  3. Language - Python
  4. Algorithm - Simple Linear Regression
  5. GitHub - http://bit.ly/3PjTtyS

Simple linear regression

Simple linear regression is a regression model that estimates the relationship between one independent variable and one dependent variable using a straight line.

Dataset

The dataset used for this project contains two columns: "Hours" (independent variable) and "Scores" (dependent variable). You can access the dataset from here: http://bit.ly/w-data

Steps

Import libraries

undefined

Import dataset

undefined

Plotting the distribution of scores

image

From the graph above, we can clearly see that there is a positive linear relation between the number of hours studied and percentage of score.

Preparing the data

  • Divide the data into "attributes" (inputs) and "labels" (outputs) or X and Y
  • Split the data into training and test sets

Training the Algorithm

undefined

Making Predictions

No of Hours = [[9.25]]

Predicted Score = 93.69173248737539

Evaluating the model

Mean Absolute Error: 4.183859899002982

Discussion and feedback(0 comments)
2000 characters remaining
Cookie SettingsWe use cookies to enhance your experience, analyze site traffic and deliver personalized content. Read our Privacy Policy.