Rambatino / CHAID

A python implementation of the common CHAID algorithm
Apache License 2.0
149 stars 50 forks source link

Prediction #128

Closed ondratybl closed 2 years ago

ondratybl commented 2 years ago

how do I predict using this class for data which have not been used for training? I see only model_predictions which only retrieves predictions for the training data... thanks a lot :)

Rambatino commented 2 years ago

Hi @ondratybl, you would like to apply the model to see its f1 score on unseen data, for instance?

That's kinda ML based, and I haven't actually got around to implementing such a thing. I'm not sure how difficult it would be, like it would just be how well that model runs on new data and look at what predictions match and what don't.

If you want to submit a PR please feel free to do so.

Rambatino commented 2 years ago

I think this may be what you're after: https://github.com/Rambatino/CHAID/pull/91

ondratybl commented 2 years ago

@Rambatino thanks a lot. It seems to be what I need. tree.predict() has been removed for some reason in the current version?

Rambatino commented 2 years ago

Yeah it never got merged, I dunno there may have been some issues with it, will have a look back into it when I get some free time