End to End Project - Bikes Assessment - Basic - Train and Analyze the Models - Train Random Forest Model

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.

Tell me your code has ran properly through linear reg and RandomForreg but my code did not make it out.

Please tell me what is wrong in my code ??

Please reply.

@NIRAV_RAJ

Please refer below.

Try to do some debugging by checking the outputs as per the requirements of the task.
some tips are below.

https://towardsdatascience.com/how-to-debug-machine-learning-models-to-catch-issues-early-and-often-5663f2b4383b

All the best!