Hi All,
I am implementing linear regression by Extract the rating as to your target variable ‘y’ and all numerical parameters as your predictors ‘x’. Please find the below steps taken by me
read the CSV into data frame df
extracted 'rating' into y
y=df['rating'].values
df_1=df
df_1.drop(['name','mfr','type','ManufacturerFullName'], axis=1, inplace=True)
df_1.drop(['rating'], axis=1, inplace=True)
x=df_1.values
from sklearn.model_selection import train_test_split
x_train, y_train, x_test, y_test=train_test_split(x,y_rating,test_size=0.75)
from sklearn.linear_model import LinearRegression
model=LinearRegression()
model.fit(x_train,y_train)