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
- Deploy Machine Learning Model using Flask
- Artificial intelligence vs Machine Learning vs Deep Learning
- How to Start Learning Machine Learning?
- Flask - (Creating first simple application)
- Python | Creating a Simple Drawing App in kivy
- ML | What is Machine Learning ?
- Machine Learning in C++
- An introduction to Machine Learning
- Clustering in Machine Learning
- Stacking in Machine Learning
- How Does NASA Use Machine Learning?
- How Does Google Use 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.