| |
| <!DOCTYPE html> |
| |
| <html> |
| <head> |
| <meta charset="utf-8" /> |
| <title>BinaryRandomForestClassificationSummary — PySpark 3.3.1 documentation</title> |
| |
| <link rel="stylesheet" href="../../_static/css/index.73d71520a4ca3b99cfee5594769eaaae.css"> |
| |
| |
| <link rel="stylesheet" |
| href="../../_static/vendor/fontawesome/5.13.0/css/all.min.css"> |
| <link rel="preload" as="font" type="font/woff2" crossorigin |
| href="../../_static/vendor/fontawesome/5.13.0/webfonts/fa-solid-900.woff2"> |
| <link rel="preload" as="font" type="font/woff2" crossorigin |
| href="../../_static/vendor/fontawesome/5.13.0/webfonts/fa-brands-400.woff2"> |
| |
| |
| |
| <link rel="stylesheet" |
| href="../../_static/vendor/open-sans_all/1.44.1/index.css"> |
| <link rel="stylesheet" |
| href="../../_static/vendor/lato_latin-ext/1.44.1/index.css"> |
| |
| |
| <link rel="stylesheet" href="../../_static/basic.css" type="text/css" /> |
| <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" /> |
| <link rel="stylesheet" type="text/css" href="../../_static/css/pyspark.css" /> |
| |
| <link rel="preload" as="script" href="../../_static/js/index.3da636dd464baa7582d2.js"> |
| |
| <script id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script> |
| <script src="../../_static/jquery.js"></script> |
| <script src="../../_static/underscore.js"></script> |
| <script src="../../_static/doctools.js"></script> |
| <script src="../../_static/language_data.js"></script> |
| <script src="../../_static/copybutton.js"></script> |
| <script crossorigin="anonymous" integrity="sha256-Ae2Vz/4ePdIu6ZyI/5ZGsYnb+m0JlOmKPjt6XZ9JJkA=" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"></script> |
| <script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script> |
| <script type="text/x-mathjax-config">MathJax.Hub.Config({"tex2jax": {"inlineMath": [["$", "$"], ["\\(", "\\)"]], "processEscapes": true, "ignoreClass": "document", "processClass": "math|output_area"}})</script> |
| <link rel="search" title="Search" href="../../search.html" /> |
| <link rel="next" title="BinaryRandomForestClassificationTrainingSummary" href="pyspark.ml.classification.BinaryRandomForestClassificationTrainingSummary.html" /> |
| <link rel="prev" title="RandomForestClassificationTrainingSummary" href="pyspark.ml.classification.RandomForestClassificationTrainingSummary.html" /> |
| <meta name="viewport" content="width=device-width, initial-scale=1" /> |
| <meta name="docsearch:language" content="en" /> |
| </head> |
| <body data-spy="scroll" data-target="#bd-toc-nav" data-offset="80"> |
| |
| <nav class="navbar navbar-light navbar-expand-lg bg-light fixed-top bd-navbar" id="navbar-main"> |
| <div class="container-xl"> |
| |
| <a class="navbar-brand" href="../../index.html"> |
| |
| <img src="../../_static/spark-logo-reverse.png" class="logo" alt="logo" /> |
| |
| </a> |
| <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbar-menu" aria-controls="navbar-menu" aria-expanded="false" aria-label="Toggle navigation"> |
| <span class="navbar-toggler-icon"></span> |
| </button> |
| |
| <div id="navbar-menu" class="col-lg-9 collapse navbar-collapse"> |
| <ul id="navbar-main-elements" class="navbar-nav mr-auto"> |
| |
| |
| <li class="nav-item "> |
| <a class="nav-link" href="../../getting_started/index.html">Getting Started</a> |
| </li> |
| |
| <li class="nav-item "> |
| <a class="nav-link" href="../../user_guide/index.html">User Guide</a> |
| </li> |
| |
| <li class="nav-item active"> |
| <a class="nav-link" href="../index.html">API Reference</a> |
| </li> |
| |
| <li class="nav-item "> |
| <a class="nav-link" href="../../development/index.html">Development</a> |
| </li> |
| |
| <li class="nav-item "> |
| <a class="nav-link" href="../../migration_guide/index.html">Migration Guide</a> |
| </li> |
| |
| |
| </ul> |
| |
| |
| |
| |
| <ul class="navbar-nav"> |
| |
| |
| </ul> |
| </div> |
| </div> |
| </nav> |
| |
| |
| <div class="container-xl"> |
| <div class="row"> |
| |
| <div class="col-12 col-md-3 bd-sidebar"><form class="bd-search d-flex align-items-center" action="../../search.html" method="get"> |
| <i class="icon fas fa-search"></i> |
| <input type="search" class="form-control" name="q" id="search-input" placeholder="Search the docs ..." aria-label="Search the docs ..." autocomplete="off" > |
| </form> |
| <nav class="bd-links" id="bd-docs-nav" aria-label="Main navigation"> |
| |
| <div class="bd-toc-item active"> |
| |
| |
| <ul class="nav bd-sidenav"> |
| |
| |
| |
| |
| |
| |
| |
| |
| <li class=""> |
| <a href="../pyspark.sql/index.html">Spark SQL</a> |
| </li> |
| |
| |
| |
| <li class=""> |
| <a href="../pyspark.pandas/index.html">Pandas API on Spark</a> |
| </li> |
| |
| |
| |
| <li class=""> |
| <a href="../pyspark.ss/index.html">Structured Streaming</a> |
| </li> |
| |
| |
| |
| <li class="active"> |
| <a href="../pyspark.ml.html">MLlib (DataFrame-based)</a> |
| </li> |
| |
| |
| |
| <li class=""> |
| <a href="../pyspark.streaming.html">Spark Streaming</a> |
| </li> |
| |
| |
| |
| <li class=""> |
| <a href="../pyspark.mllib.html">MLlib (RDD-based)</a> |
| </li> |
| |
| |
| |
| <li class=""> |
| <a href="../pyspark.html">Spark Core</a> |
| </li> |
| |
| |
| |
| <li class=""> |
| <a href="../pyspark.resource.html">Resource Management</a> |
| </li> |
| |
| |
| |
| |
| |
| |
| |
| |
| </ul> |
| |
| </nav> |
| </div> |
| |
| |
| |
| <div class="d-none d-xl-block col-xl-2 bd-toc"> |
| |
| |
| <nav id="bd-toc-nav"> |
| <ul class="nav section-nav flex-column"> |
| |
| </ul> |
| </nav> |
| |
| |
| |
| </div> |
| |
| |
| |
| <main class="col-12 col-md-9 col-xl-7 py-md-5 pl-md-5 pr-md-4 bd-content" role="main"> |
| |
| <div> |
| |
| <div class="section" id="binaryrandomforestclassificationsummary"> |
| <h1>BinaryRandomForestClassificationSummary<a class="headerlink" href="#binaryrandomforestclassificationsummary" title="Permalink to this headline">¶</a></h1> |
| <dl class="py class"> |
| <dt id="pyspark.ml.classification.BinaryRandomForestClassificationSummary"> |
| <em class="property">class </em><code class="sig-prename descclassname">pyspark.ml.classification.</code><code class="sig-name descname">BinaryRandomForestClassificationSummary</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">java_obj</span><span class="p">:</span> <span class="n">Optional<span class="p">[</span>JavaObject<span class="p">]</span></span> <span class="o">=</span> <span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/pyspark/ml/classification.html#BinaryRandomForestClassificationSummary"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyspark.ml.classification.BinaryRandomForestClassificationSummary" title="Permalink to this definition">¶</a></dt> |
| <dd><p>BinaryRandomForestClassification results for a given model.</p> |
| <div class="versionadded"> |
| <p><span class="versionmodified added">New in version 3.1.0.</span></p> |
| </div> |
| <p class="rubric">Methods</p> |
| <table class="longtable table autosummary"> |
| <colgroup> |
| <col style="width: 10%" /> |
| <col style="width: 90%" /> |
| </colgroup> |
| <tbody> |
| <tr class="row-odd"><td><p><a class="reference internal" href="#pyspark.ml.classification.BinaryRandomForestClassificationSummary.fMeasureByLabel" title="pyspark.ml.classification.BinaryRandomForestClassificationSummary.fMeasureByLabel"><code class="xref py py-obj docutils literal notranslate"><span class="pre">fMeasureByLabel</span></code></a>([beta])</p></td> |
| <td><p>Returns f-measure for each label (category).</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="#pyspark.ml.classification.BinaryRandomForestClassificationSummary.weightedFMeasure" title="pyspark.ml.classification.BinaryRandomForestClassificationSummary.weightedFMeasure"><code class="xref py py-obj docutils literal notranslate"><span class="pre">weightedFMeasure</span></code></a>([beta])</p></td> |
| <td><p>Returns weighted averaged f-measure.</p></td> |
| </tr> |
| </tbody> |
| </table> |
| <p class="rubric">Attributes</p> |
| <table class="longtable table autosummary"> |
| <colgroup> |
| <col style="width: 10%" /> |
| <col style="width: 90%" /> |
| </colgroup> |
| <tbody> |
| <tr class="row-odd"><td><p><a class="reference internal" href="#pyspark.ml.classification.BinaryRandomForestClassificationSummary.accuracy" title="pyspark.ml.classification.BinaryRandomForestClassificationSummary.accuracy"><code class="xref py py-obj docutils literal notranslate"><span class="pre">accuracy</span></code></a></p></td> |
| <td><p>Returns accuracy.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="#pyspark.ml.classification.BinaryRandomForestClassificationSummary.areaUnderROC" title="pyspark.ml.classification.BinaryRandomForestClassificationSummary.areaUnderROC"><code class="xref py py-obj docutils literal notranslate"><span class="pre">areaUnderROC</span></code></a></p></td> |
| <td><p>Computes the area under the receiver operating characteristic (ROC) curve.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="#pyspark.ml.classification.BinaryRandomForestClassificationSummary.fMeasureByThreshold" title="pyspark.ml.classification.BinaryRandomForestClassificationSummary.fMeasureByThreshold"><code class="xref py py-obj docutils literal notranslate"><span class="pre">fMeasureByThreshold</span></code></a></p></td> |
| <td><p>Returns a dataframe with two fields (threshold, F-Measure) curve with beta = 1.0.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="#pyspark.ml.classification.BinaryRandomForestClassificationSummary.falsePositiveRateByLabel" title="pyspark.ml.classification.BinaryRandomForestClassificationSummary.falsePositiveRateByLabel"><code class="xref py py-obj docutils literal notranslate"><span class="pre">falsePositiveRateByLabel</span></code></a></p></td> |
| <td><p>Returns false positive rate for each label (category).</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="#pyspark.ml.classification.BinaryRandomForestClassificationSummary.labelCol" title="pyspark.ml.classification.BinaryRandomForestClassificationSummary.labelCol"><code class="xref py py-obj docutils literal notranslate"><span class="pre">labelCol</span></code></a></p></td> |
| <td><p>Field in “predictions” which gives the true label of each instance.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="#pyspark.ml.classification.BinaryRandomForestClassificationSummary.labels" title="pyspark.ml.classification.BinaryRandomForestClassificationSummary.labels"><code class="xref py py-obj docutils literal notranslate"><span class="pre">labels</span></code></a></p></td> |
| <td><p>Returns the sequence of labels in ascending order.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="#pyspark.ml.classification.BinaryRandomForestClassificationSummary.pr" title="pyspark.ml.classification.BinaryRandomForestClassificationSummary.pr"><code class="xref py py-obj docutils literal notranslate"><span class="pre">pr</span></code></a></p></td> |
| <td><p>Returns the precision-recall curve, which is a Dataframe containing two fields recall, precision with (0.0, 1.0) prepended to it.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="#pyspark.ml.classification.BinaryRandomForestClassificationSummary.precisionByLabel" title="pyspark.ml.classification.BinaryRandomForestClassificationSummary.precisionByLabel"><code class="xref py py-obj docutils literal notranslate"><span class="pre">precisionByLabel</span></code></a></p></td> |
| <td><p>Returns precision for each label (category).</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="#pyspark.ml.classification.BinaryRandomForestClassificationSummary.precisionByThreshold" title="pyspark.ml.classification.BinaryRandomForestClassificationSummary.precisionByThreshold"><code class="xref py py-obj docutils literal notranslate"><span class="pre">precisionByThreshold</span></code></a></p></td> |
| <td><p>Returns a dataframe with two fields (threshold, precision) curve.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="#pyspark.ml.classification.BinaryRandomForestClassificationSummary.predictionCol" title="pyspark.ml.classification.BinaryRandomForestClassificationSummary.predictionCol"><code class="xref py py-obj docutils literal notranslate"><span class="pre">predictionCol</span></code></a></p></td> |
| <td><p>Field in “predictions” which gives the prediction of each class.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="#pyspark.ml.classification.BinaryRandomForestClassificationSummary.predictions" title="pyspark.ml.classification.BinaryRandomForestClassificationSummary.predictions"><code class="xref py py-obj docutils literal notranslate"><span class="pre">predictions</span></code></a></p></td> |
| <td><p>Dataframe outputted by the model’s <cite>transform</cite> method.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="#pyspark.ml.classification.BinaryRandomForestClassificationSummary.recallByLabel" title="pyspark.ml.classification.BinaryRandomForestClassificationSummary.recallByLabel"><code class="xref py py-obj docutils literal notranslate"><span class="pre">recallByLabel</span></code></a></p></td> |
| <td><p>Returns recall for each label (category).</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="#pyspark.ml.classification.BinaryRandomForestClassificationSummary.recallByThreshold" title="pyspark.ml.classification.BinaryRandomForestClassificationSummary.recallByThreshold"><code class="xref py py-obj docutils literal notranslate"><span class="pre">recallByThreshold</span></code></a></p></td> |
| <td><p>Returns a dataframe with two fields (threshold, recall) curve.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="#pyspark.ml.classification.BinaryRandomForestClassificationSummary.roc" title="pyspark.ml.classification.BinaryRandomForestClassificationSummary.roc"><code class="xref py py-obj docutils literal notranslate"><span class="pre">roc</span></code></a></p></td> |
| <td><p>Returns the receiver operating characteristic (ROC) curve, which is a Dataframe having two fields (FPR, TPR) with (0.0, 0.0) prepended and (1.0, 1.0) appended to it.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="#pyspark.ml.classification.BinaryRandomForestClassificationSummary.scoreCol" title="pyspark.ml.classification.BinaryRandomForestClassificationSummary.scoreCol"><code class="xref py py-obj docutils literal notranslate"><span class="pre">scoreCol</span></code></a></p></td> |
| <td><p>Field in “predictions” which gives the probability or raw prediction of each class as a vector.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="#pyspark.ml.classification.BinaryRandomForestClassificationSummary.truePositiveRateByLabel" title="pyspark.ml.classification.BinaryRandomForestClassificationSummary.truePositiveRateByLabel"><code class="xref py py-obj docutils literal notranslate"><span class="pre">truePositiveRateByLabel</span></code></a></p></td> |
| <td><p>Returns true positive rate for each label (category).</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="#pyspark.ml.classification.BinaryRandomForestClassificationSummary.weightCol" title="pyspark.ml.classification.BinaryRandomForestClassificationSummary.weightCol"><code class="xref py py-obj docutils literal notranslate"><span class="pre">weightCol</span></code></a></p></td> |
| <td><p>Field in “predictions” which gives the weight of each instance as a vector.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="#pyspark.ml.classification.BinaryRandomForestClassificationSummary.weightedFalsePositiveRate" title="pyspark.ml.classification.BinaryRandomForestClassificationSummary.weightedFalsePositiveRate"><code class="xref py py-obj docutils literal notranslate"><span class="pre">weightedFalsePositiveRate</span></code></a></p></td> |
| <td><p>Returns weighted false positive rate.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="#pyspark.ml.classification.BinaryRandomForestClassificationSummary.weightedPrecision" title="pyspark.ml.classification.BinaryRandomForestClassificationSummary.weightedPrecision"><code class="xref py py-obj docutils literal notranslate"><span class="pre">weightedPrecision</span></code></a></p></td> |
| <td><p>Returns weighted averaged precision.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="#pyspark.ml.classification.BinaryRandomForestClassificationSummary.weightedRecall" title="pyspark.ml.classification.BinaryRandomForestClassificationSummary.weightedRecall"><code class="xref py py-obj docutils literal notranslate"><span class="pre">weightedRecall</span></code></a></p></td> |
| <td><p>Returns weighted averaged recall.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="#pyspark.ml.classification.BinaryRandomForestClassificationSummary.weightedTruePositiveRate" title="pyspark.ml.classification.BinaryRandomForestClassificationSummary.weightedTruePositiveRate"><code class="xref py py-obj docutils literal notranslate"><span class="pre">weightedTruePositiveRate</span></code></a></p></td> |
| <td><p>Returns weighted true positive rate.</p></td> |
| </tr> |
| </tbody> |
| </table> |
| <p class="rubric">Methods Documentation</p> |
| <dl class="py method"> |
| <dt id="pyspark.ml.classification.BinaryRandomForestClassificationSummary.fMeasureByLabel"> |
| <code class="sig-name descname">fMeasureByLabel</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">beta</span><span class="p">:</span> <span class="n">float</span> <span class="o">=</span> <span class="default_value">1.0</span></em><span class="sig-paren">)</span> → List<span class="p">[</span>float<span class="p">]</span><a class="headerlink" href="#pyspark.ml.classification.BinaryRandomForestClassificationSummary.fMeasureByLabel" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Returns f-measure for each label (category).</p> |
| <div class="versionadded"> |
| <p><span class="versionmodified added">New in version 3.1.0.</span></p> |
| </div> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="pyspark.ml.classification.BinaryRandomForestClassificationSummary.weightedFMeasure"> |
| <code class="sig-name descname">weightedFMeasure</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">beta</span><span class="p">:</span> <span class="n">float</span> <span class="o">=</span> <span class="default_value">1.0</span></em><span class="sig-paren">)</span> → float<a class="headerlink" href="#pyspark.ml.classification.BinaryRandomForestClassificationSummary.weightedFMeasure" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Returns weighted averaged f-measure.</p> |
| <div class="versionadded"> |
| <p><span class="versionmodified added">New in version 3.1.0.</span></p> |
| </div> |
| </dd></dl> |
| |
| <p class="rubric">Attributes Documentation</p> |
| <dl class="py attribute"> |
| <dt id="pyspark.ml.classification.BinaryRandomForestClassificationSummary.accuracy"> |
| <code class="sig-name descname">accuracy</code><a class="headerlink" href="#pyspark.ml.classification.BinaryRandomForestClassificationSummary.accuracy" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Returns accuracy. |
| (equals to the total number of correctly classified instances |
| out of the total number of instances.)</p> |
| <div class="versionadded"> |
| <p><span class="versionmodified added">New in version 3.1.0.</span></p> |
| </div> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="pyspark.ml.classification.BinaryRandomForestClassificationSummary.areaUnderROC"> |
| <code class="sig-name descname">areaUnderROC</code><a class="headerlink" href="#pyspark.ml.classification.BinaryRandomForestClassificationSummary.areaUnderROC" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Computes the area under the receiver operating characteristic |
| (ROC) curve.</p> |
| <div class="versionadded"> |
| <p><span class="versionmodified added">New in version 3.1.0.</span></p> |
| </div> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="pyspark.ml.classification.BinaryRandomForestClassificationSummary.fMeasureByThreshold"> |
| <code class="sig-name descname">fMeasureByThreshold</code><a class="headerlink" href="#pyspark.ml.classification.BinaryRandomForestClassificationSummary.fMeasureByThreshold" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Returns a dataframe with two fields (threshold, F-Measure) curve |
| with beta = 1.0.</p> |
| <div class="versionadded"> |
| <p><span class="versionmodified added">New in version 3.1.0.</span></p> |
| </div> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="pyspark.ml.classification.BinaryRandomForestClassificationSummary.falsePositiveRateByLabel"> |
| <code class="sig-name descname">falsePositiveRateByLabel</code><a class="headerlink" href="#pyspark.ml.classification.BinaryRandomForestClassificationSummary.falsePositiveRateByLabel" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Returns false positive rate for each label (category).</p> |
| <div class="versionadded"> |
| <p><span class="versionmodified added">New in version 3.1.0.</span></p> |
| </div> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="pyspark.ml.classification.BinaryRandomForestClassificationSummary.labelCol"> |
| <code class="sig-name descname">labelCol</code><a class="headerlink" href="#pyspark.ml.classification.BinaryRandomForestClassificationSummary.labelCol" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Field in “predictions” which gives the true label of each |
| instance.</p> |
| <div class="versionadded"> |
| <p><span class="versionmodified added">New in version 3.1.0.</span></p> |
| </div> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="pyspark.ml.classification.BinaryRandomForestClassificationSummary.labels"> |
| <code class="sig-name descname">labels</code><a class="headerlink" href="#pyspark.ml.classification.BinaryRandomForestClassificationSummary.labels" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Returns the sequence of labels in ascending order. This order matches the order used |
| in metrics which are specified as arrays over labels, e.g., truePositiveRateByLabel.</p> |
| <div class="versionadded"> |
| <p><span class="versionmodified added">New in version 3.1.0.</span></p> |
| </div> |
| <p class="rubric">Notes</p> |
| <p>In most cases, it will be values {0.0, 1.0, …, numClasses-1}, However, if the |
| training set is missing a label, then all of the arrays over labels |
| (e.g., from truePositiveRateByLabel) will be of length numClasses-1 instead of the |
| expected numClasses.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="pyspark.ml.classification.BinaryRandomForestClassificationSummary.pr"> |
| <code class="sig-name descname">pr</code><a class="headerlink" href="#pyspark.ml.classification.BinaryRandomForestClassificationSummary.pr" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Returns the precision-recall curve, which is a Dataframe |
| containing two fields recall, precision with (0.0, 1.0) prepended |
| to it.</p> |
| <div class="versionadded"> |
| <p><span class="versionmodified added">New in version 3.1.0.</span></p> |
| </div> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="pyspark.ml.classification.BinaryRandomForestClassificationSummary.precisionByLabel"> |
| <code class="sig-name descname">precisionByLabel</code><a class="headerlink" href="#pyspark.ml.classification.BinaryRandomForestClassificationSummary.precisionByLabel" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Returns precision for each label (category).</p> |
| <div class="versionadded"> |
| <p><span class="versionmodified added">New in version 3.1.0.</span></p> |
| </div> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="pyspark.ml.classification.BinaryRandomForestClassificationSummary.precisionByThreshold"> |
| <code class="sig-name descname">precisionByThreshold</code><a class="headerlink" href="#pyspark.ml.classification.BinaryRandomForestClassificationSummary.precisionByThreshold" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Returns a dataframe with two fields (threshold, precision) curve. |
| Every possible probability obtained in transforming the dataset |
| are used as thresholds used in calculating the precision.</p> |
| <div class="versionadded"> |
| <p><span class="versionmodified added">New in version 3.1.0.</span></p> |
| </div> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="pyspark.ml.classification.BinaryRandomForestClassificationSummary.predictionCol"> |
| <code class="sig-name descname">predictionCol</code><a class="headerlink" href="#pyspark.ml.classification.BinaryRandomForestClassificationSummary.predictionCol" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Field in “predictions” which gives the prediction of each class.</p> |
| <div class="versionadded"> |
| <p><span class="versionmodified added">New in version 3.1.0.</span></p> |
| </div> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="pyspark.ml.classification.BinaryRandomForestClassificationSummary.predictions"> |
| <code class="sig-name descname">predictions</code><a class="headerlink" href="#pyspark.ml.classification.BinaryRandomForestClassificationSummary.predictions" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Dataframe outputted by the model’s <cite>transform</cite> method.</p> |
| <div class="versionadded"> |
| <p><span class="versionmodified added">New in version 3.1.0.</span></p> |
| </div> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="pyspark.ml.classification.BinaryRandomForestClassificationSummary.recallByLabel"> |
| <code class="sig-name descname">recallByLabel</code><a class="headerlink" href="#pyspark.ml.classification.BinaryRandomForestClassificationSummary.recallByLabel" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Returns recall for each label (category).</p> |
| <div class="versionadded"> |
| <p><span class="versionmodified added">New in version 3.1.0.</span></p> |
| </div> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="pyspark.ml.classification.BinaryRandomForestClassificationSummary.recallByThreshold"> |
| <code class="sig-name descname">recallByThreshold</code><a class="headerlink" href="#pyspark.ml.classification.BinaryRandomForestClassificationSummary.recallByThreshold" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Returns a dataframe with two fields (threshold, recall) curve. |
| Every possible probability obtained in transforming the dataset |
| are used as thresholds used in calculating the recall.</p> |
| <div class="versionadded"> |
| <p><span class="versionmodified added">New in version 3.1.0.</span></p> |
| </div> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="pyspark.ml.classification.BinaryRandomForestClassificationSummary.roc"> |
| <code class="sig-name descname">roc</code><a class="headerlink" href="#pyspark.ml.classification.BinaryRandomForestClassificationSummary.roc" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Returns the receiver operating characteristic (ROC) curve, |
| which is a Dataframe having two fields (FPR, TPR) with |
| (0.0, 0.0) prepended and (1.0, 1.0) appended to it.</p> |
| <div class="versionadded"> |
| <p><span class="versionmodified added">New in version 3.1.0.</span></p> |
| </div> |
| <p class="rubric">Notes</p> |
| <p><a class="reference external" href="http://en.wikipedia.org/wiki/Receiver_operating_characteristic">Wikipedia reference</a></p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="pyspark.ml.classification.BinaryRandomForestClassificationSummary.scoreCol"> |
| <code class="sig-name descname">scoreCol</code><a class="headerlink" href="#pyspark.ml.classification.BinaryRandomForestClassificationSummary.scoreCol" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Field in “predictions” which gives the probability or raw prediction |
| of each class as a vector.</p> |
| <div class="versionadded"> |
| <p><span class="versionmodified added">New in version 3.1.0.</span></p> |
| </div> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="pyspark.ml.classification.BinaryRandomForestClassificationSummary.truePositiveRateByLabel"> |
| <code class="sig-name descname">truePositiveRateByLabel</code><a class="headerlink" href="#pyspark.ml.classification.BinaryRandomForestClassificationSummary.truePositiveRateByLabel" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Returns true positive rate for each label (category).</p> |
| <div class="versionadded"> |
| <p><span class="versionmodified added">New in version 3.1.0.</span></p> |
| </div> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="pyspark.ml.classification.BinaryRandomForestClassificationSummary.weightCol"> |
| <code class="sig-name descname">weightCol</code><a class="headerlink" href="#pyspark.ml.classification.BinaryRandomForestClassificationSummary.weightCol" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Field in “predictions” which gives the weight of each instance |
| as a vector.</p> |
| <div class="versionadded"> |
| <p><span class="versionmodified added">New in version 3.1.0.</span></p> |
| </div> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="pyspark.ml.classification.BinaryRandomForestClassificationSummary.weightedFalsePositiveRate"> |
| <code class="sig-name descname">weightedFalsePositiveRate</code><a class="headerlink" href="#pyspark.ml.classification.BinaryRandomForestClassificationSummary.weightedFalsePositiveRate" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Returns weighted false positive rate.</p> |
| <div class="versionadded"> |
| <p><span class="versionmodified added">New in version 3.1.0.</span></p> |
| </div> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="pyspark.ml.classification.BinaryRandomForestClassificationSummary.weightedPrecision"> |
| <code class="sig-name descname">weightedPrecision</code><a class="headerlink" href="#pyspark.ml.classification.BinaryRandomForestClassificationSummary.weightedPrecision" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Returns weighted averaged precision.</p> |
| <div class="versionadded"> |
| <p><span class="versionmodified added">New in version 3.1.0.</span></p> |
| </div> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="pyspark.ml.classification.BinaryRandomForestClassificationSummary.weightedRecall"> |
| <code class="sig-name descname">weightedRecall</code><a class="headerlink" href="#pyspark.ml.classification.BinaryRandomForestClassificationSummary.weightedRecall" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Returns weighted averaged recall. |
| (equals to precision, recall and f-measure)</p> |
| <div class="versionadded"> |
| <p><span class="versionmodified added">New in version 3.1.0.</span></p> |
| </div> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="pyspark.ml.classification.BinaryRandomForestClassificationSummary.weightedTruePositiveRate"> |
| <code class="sig-name descname">weightedTruePositiveRate</code><a class="headerlink" href="#pyspark.ml.classification.BinaryRandomForestClassificationSummary.weightedTruePositiveRate" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Returns weighted true positive rate. |
| (equals to precision, recall and f-measure)</p> |
| <div class="versionadded"> |
| <p><span class="versionmodified added">New in version 3.1.0.</span></p> |
| </div> |
| </dd></dl> |
| |
| </dd></dl> |
| |
| </div> |
| |
| |
| </div> |
| |
| |
| <div class='prev-next-bottom'> |
| |
| <a class='left-prev' id="prev-link" href="pyspark.ml.classification.RandomForestClassificationTrainingSummary.html" title="previous page">RandomForestClassificationTrainingSummary</a> |
| <a class='right-next' id="next-link" href="pyspark.ml.classification.BinaryRandomForestClassificationTrainingSummary.html" title="next page">BinaryRandomForestClassificationTrainingSummary</a> |
| |
| </div> |
| |
| </main> |
| |
| |
| </div> |
| </div> |
| |
| |
| <script src="../../_static/js/index.3da636dd464baa7582d2.js"></script> |
| |
| |
| <footer class="footer mt-5 mt-md-0"> |
| <div class="container"> |
| <p> |
| © Copyright .<br/> |
| Created using <a href="http://sphinx-doc.org/">Sphinx</a> 3.0.4.<br/> |
| </p> |
| </div> |
| </footer> |
| </body> |
| </html> |