Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 18 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
<br>
Import Pandas library.

### Step2
<br>
Import Linear_model from sklearn.

### Step3
<br>
Read the csv file using pandas library.

### Step4
<br>
Enter the parameters of the linear function.

### Step5
<br>
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

<br>

## Result
Thus the multivariate linear regression is implemented and predicted the output using python program.
Thus the multivariate linear regression is implemented and predicted the output using python program.