Skip to main content
1 of 2
nimar
  • 758
  • 3
  • 8
  1. split the data into train and test
  2. fit your imputer based on the train data set (use just fit)
  3. use the fitted imputer and fill missing value in the training dataset (use transform)
  4. Train you decision tree based on the training dataset

Now you are done with the training step. start testing a follows

  1. Use imputer trained in step 2 and transform function to replace missing values in the test dataset
  2. Use the trained decision tree for test prediction and evaluating the performance of your model on the unseen test dataset
nimar
  • 758
  • 3
  • 8