Created
March 5, 2019 13:41
-
-
Save wmlba/767efb617ebd3dd50555bfe60c384a21 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sklearn.ensemble import IsolationForest | |
import numpy as np | |
np.random.seed(1) | |
random_data = np.random.randn(50000,2) * 20 + 20 | |
clf = IsolationForest( behaviour = 'new', max_samples=100, random_state = 1, contamination= 'auto') | |
preds = clf.fit_predict(random_data) | |
preds |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment