Merged
Conversation
This method provide a similar functionality like the one we get with BinningProcess.transform(), but return the score contribution for each feature. Here is the link to the idea #345 (comment) Here is an example of usage. ```python import pandas as pd from optbinning import Scorecard, BinningProcess from sklearn.datasets import load_breast_cancer data = load_breast_cancer() X_train = pd.DataFrame( data=data.data, columns=data.feature_names ) y_train = data.target model = Scorecard( binning_process=BinningProcess(variable_names=data.feature_names), estimator=LogisticRegression(random_state=34), rounding=True, scaling_method="min_max", scaling_method_params={"min": 0, "max": 250} ) model.fit(X_train, y_train) print(model.transform(X_train.head())) ```
Added method to provide .transform to the Scorecard Class
…ameters when sample_weight provided
Return expected number of values in compute_prebins for ContinuousOptimalBinning
Fix std in the summary statistics
Use weighted min_bin_size and max_bin_size when sample_weight provided
…csv to boston_housing.csv
Move Boston Dataset from External URL to Repository
…ce_all_finite and update scikit-learn to version 1.6.0
…nsure-all-finite Replace deprecated force_all_finite parameter and update scikit-learn version requirement
feat: add to_dict method for binning table serialization
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.
Updates for version 0.21
transformmethod in scorecard Added method to provide .transform to the Scorecard Class #346.to_dictmethod for binning table serialization feat: add to_dict method for binning table serialization #371.