Skip to content

Create an internal dictionary for BaseDecisionTree #64

@adam2392

Description

@adam2392

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions