本文整理匯總了Python中sklearn.base.MetaEstimatorMixin方法的典型用法代碼示例。如果您正苦於以下問題:Python base.MetaEstimatorMixin方法的具體用法?Python base.MetaEstimatorMixin怎麽用?Python base.MetaEstimatorMixin使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類sklearn.base
的用法示例。
在下文中一共展示了base.MetaEstimatorMixin方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: _generate_bases_test
# 需要導入模塊: from sklearn import base [as 別名]
# 或者: from sklearn.base import MetaEstimatorMixin [as 別名]
def _generate_bases_test(est, pd_est):
def test(self):
self.assertTrue(isinstance(pd_est, FrameMixin), pd_est)
self.assertFalse(isinstance(est, FrameMixin))
self.assertTrue(isinstance(pd_est, base.BaseEstimator))
try:
mixins = [
base.ClassifierMixin,
base.ClusterMixin,
base.BiclusterMixin,
base.TransformerMixin,
base.DensityMixin,
base.MetaEstimatorMixin,
base.ClassifierMixin,
base.RegressorMixin]
except:
if _sklearn_ver > 17:
raise
mixins = [
base.ClassifierMixin,
base.ClusterMixin,
base.BiclusterMixin,
base.TransformerMixin,
base.MetaEstimatorMixin,
base.ClassifierMixin,
base.RegressorMixin]
for mixin in mixins:
self.assertEqual(
isinstance(pd_est, mixin),
isinstance(est, mixin),
mixin)
return test