Repository navigation
Conversation
…zer. The weights are used as the comparison value for operators that works with integers (because in Brush integers correspond to classes). For example, in the node Equals(category, 2), the 2 is data.W
…pring identical to parent
…n constants are useful.
Because we want to use Int as categories, we also need to make sure each category exists in the data, so they can be sampled as terminals. weights_init should help prioritize some of them, and bandits should learn their utilities
previously it was looking only on the predicted classes, which could lead to a simplification that affects the log loss drastically. now it should word fine :
Split nodes are ignoring user defined class weights when finding split thresholds, lets fix that
…ith >10 samples from a pandas dataframe or used defined types
Also, gini scores now take into account weighted samples if the user has provided it
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 introduces several improvements and fixes to the
pybrushestimator code, focusing on more robust feature type handling, enhancements to incremental training (partial_fit), and improved evaluation logic. The changes increase code reliability, make the estimator more flexible with different input types, and clarify documentation for users.Feature type handling and data preparation:
_prepare_feature_typesmethod, improving maintainability and ensuring consistent encoding for both DataFrame and ndarray inputs. Now supports explicitfeature_typesas a parameter, with clear rules for inferring types when unspecified.Incremental training (
partial_fit) enhancements:refitparameter topartial_fit, allowing users to control whether the population is refitted or only reevaluated, and clarified behavior whenmax_gens=0. Now checks for changes inpop_sizeandnum_islandsto prevent inconsistent state.partial_fit, and that final model selection is only run when appropriate.Evaluation and prediction logic:
predictandpredict_probato use the unified_make_datamethod for consistent data preparation, supporting both DataFrame and ndarray inputs.Documentation improvements:
EstimatorInterfaceandBrushClassifier, especially regarding feature types, batching, verbosity, and incremental training behavior.Code cleanup and imports:
EstimatorInterface.pyfor centralization and removed unused imports fromBrushEstimator.py.