Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
MLD3
FIDDLE
Commits
70075a91
Commit
70075a91
authored
Dec 16, 2019
by
Shengpu Tang (tangsp)
Browse files
fix error from sklearn update
parent
2dcb6ae3
Changes
1
Hide whitespace changes
Inline
Side-by-side
FIDDLE/helpers.py
View file @
70075a91
...
...
@@ -234,10 +234,14 @@ def check_imputed_output(df_v):
######
# Post-filter: feature selection classes
######
try
:
from
sklearn.feature_selection.base
import
SelectorMixin
except
:
from
sklearn.feature_selection._base
import
SelectorMixin
class
FrequencyThreshold_temporal
(
sklearn
.
base
.
BaseEstimator
,
sklearn
.
feature_selection
.
base
.
SelectorMixin
SelectorMixin
):
def
__init__
(
self
,
threshold
=
0.
,
L
=
None
):
assert
L
is
not
None
...
...
@@ -271,7 +275,7 @@ class FrequencyThreshold_temporal(
# Keep only first feature in a pairwise perfectly correlated feature group
class
CorrelationSelector
(
sklearn
.
base
.
BaseEstimator
,
sklearn
.
feature_selection
.
base
.
SelectorMixin
,
SelectorMixin
,
):
def
__init__
(
self
):
super
().
__init__
()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment