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
- Using Google Cloud Function to generate data for Machine Learning model
- Artificial intelligence vs Machine Learning vs Deep Learning
- Azure Virtual Machine for Machine 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 ?
- Regularization in Machine Learning
- 30 minutes to machine learning
- How Does NASA 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.