sb-ai-lab / automlwhitebox Goto Github PK
View Code? Open in Web Editor NEWLibrary for automatic interpretable model building (Whitebox AutoML)
License: Apache License 2.0
Library for automatic interpretable model building (Whitebox AutoML)
License: Apache License 2.0
All feature history from Selector (Metrics, Correlation and L1) are rewriting by last model refit.
Example:
from sklearn.datasets import load_breast_cancer
from autowoe import AutoWoE
X, y = load_breast_cancer(return_X_y=True, as_frame=True)
test_aw = AutoWoE(n_jobs=1, debug=True)
test_aw.fit(pd.concat([X, y], axis=1), 'target')
If we look at test_aw.feature_history
we see a lot of 'Pruned during regression refit' reason and nothing is about selectors. But we know exactly that selector's reason exists. How did I check this:
history = {k: None if v == 'Pruned during regression refit' else v for k, v in test_aw.feature_history.items()}
selector = Selector(
interpreted_model=test_aw.params["interpreted_model"],
task=test_aw.params["task"],
train=test_aw.train_df,
target=test_aw.target,
features_type=test_aw.private_features_type,
n_jobs=test_aw.params["n_jobs"],
cv_split=test_aw._cv_split,
features_mark_values=None,
)
best_features, _sel_result = selector(
history,
pearson_th=test_aw.params["pearson_th"],
metric_th=test_aw.params["metric_th"],
vif_th=test_aw.params["vif_th"],
l1_grid_size=test_aw.params["l1_grid_size"],
l1_exp_scale=test_aw.params['l1_exp_scale'],
metric_tol=test_aw.params["metric_tol"],
)
And if we look at history
now we can see multiply different drop reason
My suggestion is to change third argument for last feature_changing()
in AutoWoE.fit()
from self._private_features_type
to best_features
, because now feature_changing()
thinks that all input features for selectors is features_before for last refit.
This check results in an error:
"module 'numpy' has no attribute 'str'.
np.str
was a deprecated alias for the builtin str
. To avoid this error in existing code, use str
by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.str_
here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.