Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create an internal dictionary for BaseDecisionTree #64

Open
adam2392 opened this issue Apr 3, 2024 · 0 comments
Open

Create an internal dictionary for BaseDecisionTree #64

adam2392 opened this issue Apr 3, 2024 · 0 comments

Comments

@adam2392
Copy link
Collaborator

adam2392 commented Apr 3, 2024

problem

Rn, we have to override and copy a lot of custom code to make fit and partial_fit work in subclasses of BaseDecisionTree inside sktree.

possible soln

We should track the kwarg parameters needed to instantiate the:

  • criterion
  • splitter
  • tree

These should be then easily accessible in subclasses. E.g.

class BaseDecisionTree
      _criterion_kwargs = ['n_samples', ...']
      _splitter_kwargs = ['criterion', 'max_features', ...]
...

Then ideally a subclass just has to add these additional kwargs to the __init__ structure and then override the corresponding _criterion/splitter/tree_kwargs.

cc: @PSSF23 from our discussion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant