You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p>Create a decision tree classifier with a maximum depth of 2 levels and fit the
725
-
training data. Once this classifier trained, plot the data and the decision
726
-
boundary to see the benefit of increasing the depth. To plot the decision
727
-
boundary, you should import the class <codeclass="docutils literal notranslate"><spanclass="pre">DecisionBoundaryDisplay</span></code> from the
728
-
module <codeclass="docutils literal notranslate"><spanclass="pre">sklearn.inspection</span></code> as shown in the previous course notebook.</p>
721
+
training data.</p>
722
+
<divclass="cell docutils container">
723
+
<divclass="cell_input docutils container">
724
+
<divclass="highlight-ipython3 notranslate"><divclass="highlight"><pre><span></span><spanclass="c1"># Write your code here.</span>
725
+
</pre></div>
726
+
</div>
727
+
</div>
728
+
</div>
729
+
<p>Now plot the data and the decision boundary of the trained classifier to see
730
+
the effect of increasing the depth of the tree.</p>
731
+
<p>Hint: Use the class <codeclass="docutils literal notranslate"><spanclass="pre">DecisionBoundaryDisplay</span></code> from the module
732
+
<codeclass="docutils literal notranslate"><spanclass="pre">sklearn.inspection</span></code> as shown in previous course notebooks.</p>
733
+
<divclass="admonition warning">
734
+
<pclass="admonition-title">Warning</p>
735
+
<p>At this time, it is not possible to use <codeclass="docutils literal notranslate"><spanclass="pre">response_method="predict_proba"</span></code> for
736
+
multiclass problems. This is a planned feature for a future version of
737
+
scikit-learn. In the mean time, you can use <codeclass="docutils literal notranslate"><spanclass="pre">response_method="predict"</span></code>
738
+
instead.</p>
739
+
</div>
729
740
<divclass="cell docutils container">
730
741
<divclass="cell_input docutils container">
731
742
<divclass="highlight-ipython3 notranslate"><divclass="highlight"><pre><span></span><spanclass="c1"># Write your code here.</span>
0 commit comments