Cleans up some TODO's and makes the CVEvaluator more flexible for experienced users.
Docstrings provided.
pipeline = Component(
RandomForestClassifier,
config={
# Allow it to be configured with n_jobs
"n_jobs": request("n_jobs", default=None)
},
space={"n_estimators": (10, 100), "criterion": ["gini", "entropy"]},
)
evaluator = CVEvaluation(
X,
y,
# Use the `configure` keyword in params to pass to the `n_jobs`
# Anything in the pipeline requesting `n_jobs` will get the value
params={"configure": {"n_jobs": 2}}
)
history = pipeline.optimize(...)
Same can be done to interact with build(), for example, to build with an ImblearnPipeline or use your own custom builder.
from imblearn.pipeline import Pipeline as ImbalancedPipeline
CVEvaluator(
...,
params={
"build": {
"builder": "sklearn",
"pipeline_type": ImbalancedPipeline
}
}
)
Cleans up some TODO's and makes the CVEvaluator more flexible for experienced users. Docstrings provided.
Same can be done to interact with
build()
, for example, to build with anImblearnPipeline
or use your own custom builder.Same exmaples given in docstrings