本文整理汇总了Python中sklearn.externals.joblib.Memory.clear方法的典型用法代码示例。如果您正苦于以下问题:Python Memory.clear方法的具体用法?Python Memory.clear怎么用?Python Memory.clear使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sklearn.externals.joblib.Memory
的用法示例。
在下文中一共展示了Memory.clear方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: import
# 需要导入模块: from sklearn.externals.joblib import Memory [as 别名]
# 或者: from sklearn.externals.joblib.Memory import clear [as 别名]
import mne
from mne import pick_types
from sklearn.base import BaseEstimator
from sklearn.model_selection import RandomizedSearchCV
from sklearn.cross_validation import KFold, StratifiedShuffleSplit
from sklearn.cross_validation import cross_val_score
from sklearn.externals.joblib import Memory, Parallel, delayed
from .utils import (clean_by_interp, interpolate_bads, _get_epochs_type, _pbar,
_handle_picks, _check_data, _get_ch_type_from_picks,
_check_sub_picks)
from .bayesopt import expected_improvement, bayes_opt
mem = Memory(cachedir='cachedir')
mem.clear(warn=False)
def _slicemean(obj, this_slice, axis):
mean = np.nan
if len(obj[this_slice]) > 0:
mean = np.mean(obj[this_slice], axis=axis)
return mean
def validation_curve(estimator, epochs, y, param_name, param_range, cv=None):
"""Validation curve on epochs.
Parameters
----------
estimator : object that implements "fit" and "predict" method.