From 0db0b4f6b2961ac1a54ba671353fb4e381f6cc10 Mon Sep 17 00:00:00 2001 From: GANESH23012861 <147139861+GANESH23012861@users.noreply.github.com> Date: Sun, 31 Dec 2023 14:57:02 +0530 Subject: [PATCH] Update README.md --- README.md | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 18362d83..854cf65b 100644 --- a/README.md +++ b/README.md @@ -6,34 +6,40 @@ To write a python program to implement multivariate linear regression and predic 2. Anaconda – Python 3.7 Installation / Moodle-Code Runner ## Algorithm: ### Step1 -
+Import Pandas library. ### Step2 -
+Import Linear_model from sklearn. ### Step3 -
+Read the csv file using pandas library. ### Step4 -
+Enter the parameters of the linear function. ### Step5 -
+Print the parameters of the linear function. ## Program: ``` - - - - - - +#program to implement multivariate linear regression and predict the output. +#Developed by : Selvaganesh +#RegisterNumaber : 23012861 +import pandas as ps +from sklearn import linear_model +data=ps.read_csv("multi.csv") +x=data[['Weight','Volume']] +y=data[['CO2']] +regr=linear_model.LinearRegression() +regr.fit(x,y) +print('Coefficients:',regr.coef_) +print('Intercept:',regr.intercept_) +predict=regr.predict([[3300,1300]]) +print('Predicted CO2 for for the corresponding weight and volume',predict) ``` ## Output: +![image](https://github.com/etjabajasphin/Multivariate-Linear-Regression/assets/147139861/18ae37db-999b-4609-9264-ccb4845754ed) -### Insert your output - -
## Result -Thus the multivariate linear regression is implemented and predicted the output using python program. \ No newline at end of file +Thus the multivariate linear regression is implemented and predicted the output using python program.