yzhao062/pyod

specifying categorical features in Python Outlier Detection (PyOD)

Open

#21 geöffnet am 14. Sept. 2018

Auf GitHub ansehen
 (5 Kommentare) (0 Reaktionen) (1 zugewiesene Person)Python (1.308 Forks)batch import
enhancementhelp wanted

Repository-Metriken

Stars
 (7.762 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 4T 17h) (14 gemergte PRs in 30 T)

Beschreibung

How to specify the categorical features in PyOD when using Histogram-based Outlier Detection (HBOS) for anomaly detection ? I've read that HBOS can be used for anomaly detection when there are categorical features involved. I found it's Python implementation here: https://pyod.readthedocs.io/en/latest/pyod.models.html#module-pyod.models.hbos But I can't figure out how should I pass the position or list of names of categorical features of my dataset while training the model. The code I've tried:

clf = HBOS(n_bins=10, alpha=0.1, tol=0.5, contamination=0.1)
clf.fit(train_df)
train_pred = clf.labels_

There is no parameter to mention categorical features while training.

Contributor Guide