Prediction using Supervised ML


First Question comes to mind What is the Supervised Machine Learning (ML) ?

Supervised learning, also known as supervised machine learning, is a subcategory of machine learning and artificial intelligence

It is defined by its use of labeled datasets to train algorithms that to classify data or predict outcomes accurately. As input data is fed into the model, it adjusts its weights until the model has been fitted appropriately, which occurs as part of the cross validation process.

Supervised learning helps organizations solve for a variety of real-world problems at scale, such as classifying spam in a separate folder from your inbox.


Example of Supervised Learning Algorithms:  

  • Linear Regression
  • Logistic Regression
  • Nearest Neighbor
  • Gaussian Naive Bayes
  • Decision Trees
  • Support Vector Machine (SVM)
  • Random Forest
So We are using the Linear Regression for the Assignment .

So What is Linear Regression ?

Linear regression is used to identify the relationship between a dependent variable and one or more independent variables and is typically leveraged to make predictions about future outcomes. 

When there is only one independent variable and one dependent variable, it is known as simple linear regression

As the number of independent variables increases, it is referred to as multiple linear regression. 

For each type of linear regression, it seeks to plot a line of best fit, which is calculated through the method of least squares. However, unlike other regression models, this line is straight when plotted on a graph.
 

Equation Of Linear Regression :-

Y = M*X + C



Datahttp://bit.ly/w-data

Problem Statement:-Predict the percentage of an students based on the number of study hours.

Problem Insight:-

The data was consist of two columns Hours and Percentages

We have seen the Hours of Studies and Precentages are Highly Corelated to each other

Using the Simple Linear Regression Model to predict the future outcome

Building Model:-

two steps is to train and test the model

from Sklearn.model_selection import train_test_splits

x_train ,x_test ,y_train , y_test = train_test_splits(x,y,train_size=0.8, random_state=0)

from sklearn.linear_model import LinearRegression


Conclusion:-


What will be predicted score if a student studies for 9.25 hrs/day?


The students studies who studies for 9.25 hrs/day will get 93.69%




















Code pdf :-  

https://drive.google.com/file/d/1Jb3AR-CoqtlKdkiqQOylyLP4tScEChbR/view?usp=sharing


Linked ID :- 

https://www.linkedin.com/in/raghavcho/


github :-     

https://github.com/dsraghav/Spark-Foundation-Internship-




Feel free to connect to me if any issues with analysis or any suggestion do it.


Thank You.

Comments

Popular posts from this blog