pylablanche / gcForest

Python implementation of deep forest method : gcForest
MIT License
418 stars 193 forks source link

ValueError: Input contains NaN, infinity or a value too large for dtype('float64'). #28

Open Ishank-811 opened 4 years ago

Ishank-811 commented 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)

Guanzhou-Ke commented 4 years ago

Are you sure your problem should be posted here? I cannot see any error about gcForest.