2
$\begingroup$

is it possible to use the train result as another feature and retrain?
for example I make prediction with classification and
add this result to the table and train xgboost?

$\endgroup$
2
$\begingroup$

Yes but there are two issues:

  • Is it really useful? If the prediction is just added to the features on which it's based, it's unlikely to improve performance. However there are cases where this is useful, e.g. stacked learners.
  • You need to split the training set into two parts t1 and t2:
    • t1 is the regular training set used to produce the first model
    • t2 is the data used to predict the new "feature" and train the second model with this new feature.

It would be a bad idea to use the same training set for the two models because the predictions used in the second model would be obtained on the training set, so they would be unrealistically good.

$\endgroup$
2
  • $\begingroup$ if i'm doing kmeans clustering with different k values. result will be different can it be useful to use this new feature for next model? $\endgroup$ – slowmonk Dec 15 '19 at 2:45
  • $\begingroup$ @monk: it might be useful indeed, of course it depends on your data but it's worth trying. in the question you were talking about classification so I thought both steps were supervised learning. With clustering I think you don't even need to split the training set, since it's unsupervised. of course you will need to predict the cluster(s) for each instance in your test set based on the model(s) obtained on the training set. $\endgroup$ – Erwan Dec 15 '19 at 12:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.