Not Fitted Error when using Sklearn's graphviz : <p>when I am trying to export a random forest graph using the following command:</p>

<pre><code>tree.export_graphviz(rnd_clf, out_file = None, feature_names = X_test[::1])
</code></pre>

<p>I receive the following error:</p>

<pre><code>NotFittedError: This RandomForestClassifier instance is not fitted yet. 
Call 'fit' with appropriate arguments before using this method.
</code></pre>

<p>What I don't understand is why it keeps telling me this, even though I have fitted the random forest classifier using:</p>

<pre><code>rnd_clf = RandomForestClassifier(  
             n_estimators=120,
             criterion='gini',
             max_features= None, 
             max_depth = 14 )

rnd_clf.fit(X_train, y_train)
</code></pre>

<p>and it works perfectly fine.</p>
