Feat/reorganize core bits #18
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request refactors the way decision tree components are imported and used across multiple Jupyter notebooks, improving clarity and consistency. It also updates import paths for shared parameters and metrics, standardizes how tree visualization is invoked, and makes minor improvements to development notebooks and dependencies.
Refactoring and import improvements:
DecisionTreeClassifier,DecisionTreeRegressor, andshow_treefrom their respective modules, instead of importing the entiredecisiontreemodule asdtree. This clarifies usage and reduces namespace clutter. [1] [2] [3] [4] [5] [6] [7]dtree.show_tree(...)toshow_tree(...)across notebooks for consistency. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14]Parameter and metric import updates:
ThresholdSelectionMethod,ColumnSelectionMethod, andMetricNamesfromrandom_tree_models.utilsorrandom_tree_models.scoringto import them from the newrandom_tree_models.paramsmodule, reflecting recent codebase organization. [1] [2] [3] [4] [5]measure_name=MetricNames.xgboostinstead of a string literal for consistency and clarity. [1] [2]Notebook and dependency improvements:
random_tree_models.decisiontree.__init__.pyforDecisionTreeClassifier,DecisionTreeRegressor,DecisionTreeTemplate,find_leaf_node, andgrow_treeto simplify imports elsewhere.pyproject.tomlto includedirty-equalsandinline-snapshotfor improved testing capabilities.