Open Ishank-811 opened 4 years ago
import pandas as pd import numpy as np from sklearn import datasets , linear_model from sklearn.linear_model import LogisticRegression df = pd.read_csv('Data_Train.csv') pd.isnull(df).sum() > 0 data=df.describe() df.isnull() df.describe().columns x1 = df[['Year', 'Seats']].values y1= df[['Price']] from sklearn.model_selection import train_test_split x_train , x_test , y_train , y_test = train_test_split(x1, y1) x_train.shape , x_test.shape , y_train.shape , y_test.shape from sklearn.linear_model import LinearRegression linreg = LinearRegression(); from sklearn.neighbors import KNeighborsClassifier knn= KNeighborsClassifier() knn.fit(x_train,y_train)
Are you sure your problem should be posted here? I cannot see any error about gcForest.
gcForest
import pandas as pd import numpy as np from sklearn import datasets , linear_model from sklearn.linear_model import LogisticRegression df = pd.read_csv('Data_Train.csv') pd.isnull(df).sum() > 0 data=df.describe() df.isnull() df.describe().columns x1 = df[['Year', 'Seats']].values y1= df[['Price']] from sklearn.model_selection import train_test_split x_train , x_test , y_train , y_test = train_test_split(x1, y1) x_train.shape , x_test.shape , y_train.shape , y_test.shape from sklearn.linear_model import LinearRegression linreg = LinearRegression(); from sklearn.neighbors import KNeighborsClassifier knn= KNeighborsClassifier() knn.fit(x_train,y_train)