ctlab/ITMO_FS

AttributeError: 'UnivariateFilter' object has no attribute 'run'

yusufmet opened this issue · 2 comments

Hi,
I installed ITMO_FS successfully both Win10-python 3.7 and also Google Colab.

Run your code at both README.rst and also your paper (Future Internet 2020, 12, 54; doi:10.3390/fi12030054).

They gave the same error:
AttributeError: 'UnivariateFilter' object has no attribute 'run'

Any suggestion?

Replace "run" by "fit_transform", it should work.

from sklearn.datasets import load_iris
from ITMO_FS.filters import UnivariateFilter, spearman_corr, select_best_by_value # provides you a filter class, basic measures and cutting rules

data, target = load_iris(True)
res = UnivariateFilter(spearman_corr, select_best_by_value(0.9999)).fit_transform(data, target)
print("SpearmanCorr:", data.shape, '--->', res.shape)

Hi, yusufmet,
Yes we moved to fit_transform method and made some valid documentation here
https://itmo-fs.readthedocs.io/en/latest/