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
- Machine Learning Computing at the edge using model artifacts
- Using Google Cloud Function to generate data for Machine Learning model
- Difference Between Artificial Intelligence vs Machine Learning vs Deep Learning
- Artificial intelligence vs Machine Learning vs Deep Learning
- Azure Virtual Machine for Machine Learning
- How to Start Learning Machine Learning?
- Creating a simple browser using PyQt5
- Flask - (Creating first simple application)
- Python | Creating a Simple Drawing App in kivy
- ML | What is Machine Learning ?
- Machine Learning in C++
- Machine Learning - Applications
- Stacking in Machine Learning
- Demystifying 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 firstname.lastname@example.org. 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.