Create a Linear Regression Model in Python using a randomly created data set.
Linear Regression Model
Linear regression geeks for geeks
Generating the Training Set
Machine Learning Model – Linear Regression
The Model can be created in two steps:-
1. Training the model with Training Data
2. Testing the model with Test Data
Training the Model
The data that was created using the above code is used to train the model
Testing the Data
The testing is done Manually. Testing can be done using some random data and testing if the model gives the correct result for the input data.
The Outcome of the above provided test-data should be, 10 + 20*2 + 30*3 = 140.
Outcome : [ 140.] Coefficients : [ 1. 2. 3.]
- Learning Model Building in Scikit-learn : A Python Machine Learning Library
- Saving a machine learning Model
- seq2seq model in Machine Learning
- Artificial intelligence vs Machine Learning vs Deep Learning
- Flask - (Creating first simple application)
- ML | What is Machine Learning ?
- Machine Learning in C++
- Machine Learning | Outlier
- Clustering in Machine Learning
- An introduction to Machine Learning
- Getting started with Machine Learning
- Regularization in Machine Learning
- Demystifying Machine Learning
- Stacking in Machine Learning
- 30 minutes to machine learning
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.