Commit 70075a91 authored by Shengpu Tang (tangsp)'s avatar Shengpu Tang (tangsp)
Browse files

fix error from sklearn update

parent 2dcb6ae3
...@@ -234,10 +234,14 @@ def check_imputed_output(df_v): ...@@ -234,10 +234,14 @@ def check_imputed_output(df_v):
###### ######
# Post-filter: feature selection classes # Post-filter: feature selection classes
###### ######
try:
from sklearn.feature_selection.base import SelectorMixin
except:
from sklearn.feature_selection._base import SelectorMixin
class FrequencyThreshold_temporal( class FrequencyThreshold_temporal(
sklearn.base.BaseEstimator, sklearn.base.BaseEstimator,
sklearn.feature_selection.base.SelectorMixin SelectorMixin
): ):
def __init__(self, threshold=0., L=None): def __init__(self, threshold=0., L=None):
assert L is not None assert L is not None
...@@ -271,7 +275,7 @@ class FrequencyThreshold_temporal( ...@@ -271,7 +275,7 @@ class FrequencyThreshold_temporal(
# Keep only first feature in a pairwise perfectly correlated feature group # Keep only first feature in a pairwise perfectly correlated feature group
class CorrelationSelector( class CorrelationSelector(
sklearn.base.BaseEstimator, sklearn.base.BaseEstimator,
sklearn.feature_selection.base.SelectorMixin, SelectorMixin,
): ):
def __init__(self): def __init__(self):
super().__init__() super().__init__()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment