e6fd1b533326c5f42fb45cac57d5e95f919a8955,dask_ml/model_selection/_normalize.py,,normalize_estimator,#Any#,19
Before Change
Note: Since scikit-learn requires duck-typing, but not sub-typing from
``BaseEstimator``, we sometimes need to call this function directly.
return type(est).__name__, normalize_token(est.get_params())
def normalize_random_state(random_state):
if isinstance(random_state, np.random.RandomState):
After Change
attrs = [x for x in dir(est) if x.endswith("_") and not x.startswith("_")]
exclude = {"cv_results_", "model_history_", "history_", "refit_time_"}
with warnings.catch_warnings():
warnings.simplefilter("ignore", FutureWarning)
for attr in attrs:
if attr in exclude:
continue
try:
val = getattr(est, attr)
except (sklearn.exceptions.NotFittedError, AttributeError):
continue
base.append(val)
return tuple(base)
def normalize_random_state(random_state):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances Project Name: dask/dask-ml
Commit Name: e6fd1b533326c5f42fb45cac57d5e95f919a8955
Time: 2020-05-05
Author: TomAugspurger@users.noreply.github.com
File Name: dask_ml/model_selection/_normalize.py
Class Name:
Method Name: normalize_estimator
Project Name: rlworkgroup/garage
Commit Name: 582c3c56ffc3b60f0b371c77aec170a6b7aa7210
Time: 2019-01-16
Author: ahtsans@gmail.com
File Name: garage/envs/wrappers/resize.py
Class Name: Resize
Method Name: _observation
Project Name: rlworkgroup/garage
Commit Name: 582c3c56ffc3b60f0b371c77aec170a6b7aa7210
Time: 2019-01-16
Author: ahtsans@gmail.com
File Name: garage/envs/wrappers/grayscale.py
Class Name: Grayscale
Method Name: _observation