diff --git a/README.md b/README.md index 18362d83..b6dcc865 100644 --- a/README.md +++ b/README.md @@ -6,34 +6,37 @@ 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: ``` - - - - - - +import pandas as ps +from sklearn import linear_model +data=ps.read_csv("carsmulti.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/Arun2005-create/Multivariate-Linear-Regression/assets/138849356/6461acb6-3dc0-4665-a80f-3aa89ff8e179) -### 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.