title: How to use Isolation Forest
body: <p>I am trying to detect the outliers to my dataset and I find the sklearn's <a href="http://scikit-learn.org/stable/modules/generated/sklearn.ensemble.IsolationForest.html" rel="noreferrer">Isolation Forest</a>. I can't understand how to work with it. I fit my training data in it and it gives me back a vector with -1 and 1 values.</p>
  
  <p>Can anyone explain to me how it works and provide an example?</p>
  
  <p>How can I know that the outliers are 'real' outliers?</p>
  
  <p>Tuning Parameters?</p>
  
  <p>Here is my code:</p>
  
  <pre><code>clf = IsolationForest(max_samples=10000, random_state=10)
  clf.fit(x_train)
  y_pred_train = clf.predict(x_train)
  y_pred_test = clf.predict(x_test)
  
  [1 1 1 ..., -1 1 1]
  </code></pre>