You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importpandasaspd, numpyasnpfrompyod.models.ecodimportECODfrompyod.models.suodimportSUODfrompyod.models.lofimportLOFfrompyod.models.iforestimportIForestfrompyod.models.copodimportCOPODfrompyod.models.kpcaimportKPCAfrompyod.utils.utilityimportstandardizerprepared_np=standardizer(prepared_df)
# train SUODclf_name='ensemble'# initialized a group of outlier detectors for accelerationdetector_list= [
LOF(n_neighbors=20),
ECOD,
COPOD(),
IForest(n_estimators=200),
KPCA()
]
# decide the number of parallel process, and the combination methodclf=SUOD(
base_estimators=detector_list,
n_jobs=-1,
combination='average',
verbose=True
)
clf.fit(prepared_np)
And I got this error:
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-3-f2fb948dc9a9> in <module>
1 print('Training...')
2
----> 3 clf.fit(prepared_np)
4
5 scores = clf.decision_scores_ # raw outlier scores
/app/dataiku/design/code-envs/python/SP3/lib/python3.6/site-packages/pyod/models/suod.py in fit(self, X, y)
208
209 # fit the model and then approximate it
--> 210 self.model_.fit(X)
211 self.model_.approximate(X)
212
/app/dataiku/design/code-envs/python/SP3/lib/python3.6/site-packages/suod/models/base.py in fit(self, X)
265 if self.bps_flag:
266 # load the pre-trained cost predictor to forecast the train cost
--> 267 cost_predictor = joblib.load(self.cost_forecast_loc_fit_)
268
269 time_cost_pred = cost_forecast_meta(cost_predictor, X,
/app/dataiku/design/code-envs/python/SP3/lib/python3.6/site-packages/joblib/numpy_pickle.py in load(filename, mmap_mode)
585 return load_compatibility(fobj)
586
--> 587 obj = _unpickle(fobj, filename, mmap_mode)
588 return obj
/app/dataiku/design/code-envs/python/SP3/lib/python3.6/site-packages/joblib/numpy_pickle.py in _unpickle(fobj, filename, mmap_mode)
504 obj = None
505 try:
--> 506 obj = unpickler.load()
507 if unpickler.compat_mode:
508 warnings.warn("The file '%s' has been generated with a "
/usr/lib64/python3.6/pickle.py in load(self)
1048 raise EOFError
1049 assert isinstance(key, bytes_types)
-> 1050 dispatch[key[0]](self)
1051 except _Stop as stopinst:
1052 return stopinst.value
/usr/lib64/python3.6/pickle.py in load_global(self)
1336 module = self.readline()[:-1].decode("utf-8")
1337 name = self.readline()[:-1].decode("utf-8")
-> 1338 klass = self.find_class(module, name)
1339 self.append(klass)
1340 dispatch[GLOBAL[0]] = load_global
/usr/lib64/python3.6/pickle.py in find_class(self, module, name)
1386 elif module in _compat_pickle.IMPORT_MAPPING:
1387 module = _compat_pickle.IMPORT_MAPPING[module]
-> 1388 __import__(module, level=0)
1389 if self.proto >= 4:
1390 return _getattribute(sys.modules[module], name)[0]
ModuleNotFoundError: No module named 'sklearn.ensemble._forest'
Hello,
I tried running suod with the following code:
And I got this error:
I am using the following versions:
Well, my env has more libraries, but I left only the ones that I think might be relevant for the issue.
I would be grateful for any help.
And thanks a lot for your wonderful work!
The text was updated successfully, but these errors were encountered: