I did not understand.
When i use my own understanding to solve columns to drop and train_test_split in bike-rental
columnsToDrop = [‘instant’,‘casual’,‘registered’,‘atemp’,‘dteday’]
bikesData = bikesData.drop(columnsToDrop,1)
bikesData=pd.DataFrame(columnsToDrop)
from sklearn.model_selection import train_test_split
bikesData[‘dayCount’] = pd.Series(range(bikesData.shape[0]))/24
train_set, test_set = train_test_split(bikesData, test_size=0.3, random_state=42)
train_set.sort_values(‘dayCount’, axis= 0, inplace=True)
test_set.sort_values(‘dayCount’, axis= 0, inplace=True)
This is the code written by me but it gives me other value and even it took assesment but when i did linear rgression and RandomForestRegressor in my own written code it did not take
But when i copied your code it gives me other value and assesment engine took Each and every Linear and ForestReg
columnsToDrop = [‘instant’,‘casual’,‘registered’,‘atemp’,‘dteday’]
bikesData = bikesData.drop(columnsToDrop,1)
from sklearn.model_selection import train_test_split
bikesData[‘dayCount’] = pd.Series(range(bikesData.shape[0]))/24
train_set, test_set = train_test_split(bikesData, test_size=0.3, random_state=42)
print(len(train_set), “train +”, len(test_set), “test”)
train_set.sort_values(‘dayCount’, axis= 0, inplace=True)
test_set.sort_values(‘dayCount’, axis= 0, inplace=True)
This is your code.
Why my code is giving other answerand your other.
What is the difference between my code and your code??
Please tell me .
What is wrong in my code ??
Please reply.