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
- seq2seq model in Machine Learning
- Saving a machine learning Model
- 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
- Machine Learning in C++
- ML | What is Machine Learning ?
- An introduction to Machine Learning
- How Does NASA Use Machine Learning?
- Clustering in Machine Learning
- How Does Google Use 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.