| |
| <!DOCTYPE html> |
| |
| <html> |
| <head> |
| <meta charset="utf-8" /> |
| <title>LinearSVC — PySpark 3.1.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="canonical" href="https://spark.apache.org/docs/latest/api/python/reference/api/pyspark.ml.classification.LinearSVC.html" /> |
| <link rel="search" title="Search" href="../../search.html" /> |
| <link rel="next" title="LinearSVCModel" href="pyspark.ml.classification.LinearSVCModel.html" /> |
| <link rel="prev" title="Word2VecModel" href="pyspark.ml.feature.Word2VecModel.html" /> |
| <meta name="viewport" content="width=device-width, initial-scale=1" /> |
| <meta name="docsearch:language" content="en" /> |
| <!-- Matomo --> |
| <script type="text/javascript"> |
| var _paq = window._paq = window._paq || []; |
| /* tracker methods like "setCustomDimension" should be called before "trackPageView" */ |
| _paq.push(["disableCookies"]); |
| _paq.push(['trackPageView']); |
| _paq.push(['enableLinkTracking']); |
| (function() { |
| var u="https://analytics.apache.org/"; |
| _paq.push(['setTrackerUrl', u+'matomo.php']); |
| _paq.push(['setSiteId', '40']); |
| var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; |
| g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s); |
| })(); |
| </script> |
| <!-- End Matomo Code --> |
| </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.html">Spark SQL</a> |
| </li> |
| |
| |
| |
| <li class=""> |
| <a href="../pyspark.ss.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="linearsvc"> |
| <h1>LinearSVC<a class="headerlink" href="#linearsvc" title="Permalink to this headline">¶</a></h1> |
| <dl class="py class"> |
| <dt id="pyspark.ml.classification.LinearSVC"> |
| <em class="property">class </em><code class="sig-prename descclassname">pyspark.ml.classification.</code><code class="sig-name descname">LinearSVC</code><span class="sig-paren">(</span><em class="sig-param"><span class="o">*</span></em>, <em class="sig-param"><span class="n">featuresCol</span><span class="o">=</span><span class="default_value">'features'</span></em>, <em class="sig-param"><span class="n">labelCol</span><span class="o">=</span><span class="default_value">'label'</span></em>, <em class="sig-param"><span class="n">predictionCol</span><span class="o">=</span><span class="default_value">'prediction'</span></em>, <em class="sig-param"><span class="n">maxIter</span><span class="o">=</span><span class="default_value">100</span></em>, <em class="sig-param"><span class="n">regParam</span><span class="o">=</span><span class="default_value">0.0</span></em>, <em class="sig-param"><span class="n">tol</span><span class="o">=</span><span class="default_value">1e-06</span></em>, <em class="sig-param"><span class="n">rawPredictionCol</span><span class="o">=</span><span class="default_value">'rawPrediction'</span></em>, <em class="sig-param"><span class="n">fitIntercept</span><span class="o">=</span><span class="default_value">True</span></em>, <em class="sig-param"><span class="n">standardization</span><span class="o">=</span><span class="default_value">True</span></em>, <em class="sig-param"><span class="n">threshold</span><span class="o">=</span><span class="default_value">0.0</span></em>, <em class="sig-param"><span class="n">weightCol</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">aggregationDepth</span><span class="o">=</span><span class="default_value">2</span></em>, <em class="sig-param"><span class="n">maxBlockSizeInMB</span><span class="o">=</span><span class="default_value">0.0</span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/pyspark/ml/classification.html#LinearSVC"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyspark.ml.classification.LinearSVC" title="Permalink to this definition">¶</a></dt> |
| <dd><p>This binary classifier optimizes the Hinge Loss using the OWLQN optimizer. |
| Only supports L2 regularization currently.</p> |
| <div class="versionadded"> |
| <p><span class="versionmodified added">New in version 2.2.0.</span></p> |
| </div> |
| <p class="rubric">Notes</p> |
| <p><a class="reference external" href="https://en.wikipedia.org/wiki/Support_vector_machine#Linear_SVM">Linear SVM Classifier</a></p> |
| <p class="rubric">Examples</p> |
| <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="kn">from</span> <span class="nn">pyspark.sql</span> <span class="kn">import</span> <span class="n">Row</span> |
| <span class="gp">>>> </span><span class="kn">from</span> <span class="nn">pyspark.ml.linalg</span> <span class="kn">import</span> <span class="n">Vectors</span> |
| <span class="gp">>>> </span><span class="n">df</span> <span class="o">=</span> <span class="n">sc</span><span class="o">.</span><span class="n">parallelize</span><span class="p">([</span> |
| <span class="gp">... </span> <span class="n">Row</span><span class="p">(</span><span class="n">label</span><span class="o">=</span><span class="mf">1.0</span><span class="p">,</span> <span class="n">features</span><span class="o">=</span><span class="n">Vectors</span><span class="o">.</span><span class="n">dense</span><span class="p">(</span><span class="mf">1.0</span><span class="p">,</span> <span class="mf">1.0</span><span class="p">,</span> <span class="mf">1.0</span><span class="p">)),</span> |
| <span class="gp">... </span> <span class="n">Row</span><span class="p">(</span><span class="n">label</span><span class="o">=</span><span class="mf">0.0</span><span class="p">,</span> <span class="n">features</span><span class="o">=</span><span class="n">Vectors</span><span class="o">.</span><span class="n">dense</span><span class="p">(</span><span class="mf">1.0</span><span class="p">,</span> <span class="mf">2.0</span><span class="p">,</span> <span class="mf">3.0</span><span class="p">))])</span><span class="o">.</span><span class="n">toDF</span><span class="p">()</span> |
| <span class="gp">>>> </span><span class="n">svm</span> <span class="o">=</span> <span class="n">LinearSVC</span><span class="p">()</span> |
| <span class="gp">>>> </span><span class="n">svm</span><span class="o">.</span><span class="n">getMaxIter</span><span class="p">()</span> |
| <span class="go">100</span> |
| <span class="gp">>>> </span><span class="n">svm</span><span class="o">.</span><span class="n">setMaxIter</span><span class="p">(</span><span class="mi">5</span><span class="p">)</span> |
| <span class="go">LinearSVC...</span> |
| <span class="gp">>>> </span><span class="n">svm</span><span class="o">.</span><span class="n">getMaxIter</span><span class="p">()</span> |
| <span class="go">5</span> |
| <span class="gp">>>> </span><span class="n">svm</span><span class="o">.</span><span class="n">getRegParam</span><span class="p">()</span> |
| <span class="go">0.0</span> |
| <span class="gp">>>> </span><span class="n">svm</span><span class="o">.</span><span class="n">setRegParam</span><span class="p">(</span><span class="mf">0.01</span><span class="p">)</span> |
| <span class="go">LinearSVC...</span> |
| <span class="gp">>>> </span><span class="n">svm</span><span class="o">.</span><span class="n">getRegParam</span><span class="p">()</span> |
| <span class="go">0.01</span> |
| <span class="gp">>>> </span><span class="n">model</span> <span class="o">=</span> <span class="n">svm</span><span class="o">.</span><span class="n">fit</span><span class="p">(</span><span class="n">df</span><span class="p">)</span> |
| <span class="gp">>>> </span><span class="n">model</span><span class="o">.</span><span class="n">setPredictionCol</span><span class="p">(</span><span class="s2">"newPrediction"</span><span class="p">)</span> |
| <span class="go">LinearSVCModel...</span> |
| <span class="gp">>>> </span><span class="n">model</span><span class="o">.</span><span class="n">getPredictionCol</span><span class="p">()</span> |
| <span class="go">'newPrediction'</span> |
| <span class="gp">>>> </span><span class="n">model</span><span class="o">.</span><span class="n">setThreshold</span><span class="p">(</span><span class="mf">0.5</span><span class="p">)</span> |
| <span class="go">LinearSVCModel...</span> |
| <span class="gp">>>> </span><span class="n">model</span><span class="o">.</span><span class="n">getThreshold</span><span class="p">()</span> |
| <span class="go">0.5</span> |
| <span class="gp">>>> </span><span class="n">model</span><span class="o">.</span><span class="n">getMaxBlockSizeInMB</span><span class="p">()</span> |
| <span class="go">0.0</span> |
| <span class="gp">>>> </span><span class="n">model</span><span class="o">.</span><span class="n">coefficients</span> |
| <span class="go">DenseVector([0.0, -0.2792, -0.1833])</span> |
| <span class="gp">>>> </span><span class="n">model</span><span class="o">.</span><span class="n">intercept</span> |
| <span class="go">1.0206118982229047</span> |
| <span class="gp">>>> </span><span class="n">model</span><span class="o">.</span><span class="n">numClasses</span> |
| <span class="go">2</span> |
| <span class="gp">>>> </span><span class="n">model</span><span class="o">.</span><span class="n">numFeatures</span> |
| <span class="go">3</span> |
| <span class="gp">>>> </span><span class="n">test0</span> <span class="o">=</span> <span class="n">sc</span><span class="o">.</span><span class="n">parallelize</span><span class="p">([</span><span class="n">Row</span><span class="p">(</span><span class="n">features</span><span class="o">=</span><span class="n">Vectors</span><span class="o">.</span><span class="n">dense</span><span class="p">(</span><span class="o">-</span><span class="mf">1.0</span><span class="p">,</span> <span class="o">-</span><span class="mf">1.0</span><span class="p">,</span> <span class="o">-</span><span class="mf">1.0</span><span class="p">))])</span><span class="o">.</span><span class="n">toDF</span><span class="p">()</span> |
| <span class="gp">>>> </span><span class="n">model</span><span class="o">.</span><span class="n">predict</span><span class="p">(</span><span class="n">test0</span><span class="o">.</span><span class="n">head</span><span class="p">()</span><span class="o">.</span><span class="n">features</span><span class="p">)</span> |
| <span class="go">1.0</span> |
| <span class="gp">>>> </span><span class="n">model</span><span class="o">.</span><span class="n">predictRaw</span><span class="p">(</span><span class="n">test0</span><span class="o">.</span><span class="n">head</span><span class="p">()</span><span class="o">.</span><span class="n">features</span><span class="p">)</span> |
| <span class="go">DenseVector([-1.4831, 1.4831])</span> |
| <span class="gp">>>> </span><span class="n">result</span> <span class="o">=</span> <span class="n">model</span><span class="o">.</span><span class="n">transform</span><span class="p">(</span><span class="n">test0</span><span class="p">)</span><span class="o">.</span><span class="n">head</span><span class="p">()</span> |
| <span class="gp">>>> </span><span class="n">result</span><span class="o">.</span><span class="n">newPrediction</span> |
| <span class="go">1.0</span> |
| <span class="gp">>>> </span><span class="n">result</span><span class="o">.</span><span class="n">rawPrediction</span> |
| <span class="go">DenseVector([-1.4831, 1.4831])</span> |
| <span class="gp">>>> </span><span class="n">svm_path</span> <span class="o">=</span> <span class="n">temp_path</span> <span class="o">+</span> <span class="s2">"/svm"</span> |
| <span class="gp">>>> </span><span class="n">svm</span><span class="o">.</span><span class="n">save</span><span class="p">(</span><span class="n">svm_path</span><span class="p">)</span> |
| <span class="gp">>>> </span><span class="n">svm2</span> <span class="o">=</span> <span class="n">LinearSVC</span><span class="o">.</span><span class="n">load</span><span class="p">(</span><span class="n">svm_path</span><span class="p">)</span> |
| <span class="gp">>>> </span><span class="n">svm2</span><span class="o">.</span><span class="n">getMaxIter</span><span class="p">()</span> |
| <span class="go">5</span> |
| <span class="gp">>>> </span><span class="n">model_path</span> <span class="o">=</span> <span class="n">temp_path</span> <span class="o">+</span> <span class="s2">"/svm_model"</span> |
| <span class="gp">>>> </span><span class="n">model</span><span class="o">.</span><span class="n">save</span><span class="p">(</span><span class="n">model_path</span><span class="p">)</span> |
| <span class="gp">>>> </span><span class="n">model2</span> <span class="o">=</span> <span class="n">LinearSVCModel</span><span class="o">.</span><span class="n">load</span><span class="p">(</span><span class="n">model_path</span><span class="p">)</span> |
| <span class="gp">>>> </span><span class="n">model</span><span class="o">.</span><span class="n">coefficients</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="n">model2</span><span class="o">.</span><span class="n">coefficients</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> |
| <span class="go">True</span> |
| <span class="gp">>>> </span><span class="n">model</span><span class="o">.</span><span class="n">intercept</span> <span class="o">==</span> <span class="n">model2</span><span class="o">.</span><span class="n">intercept</span> |
| <span class="go">True</span> |
| <span class="gp">>>> </span><span class="n">model</span><span class="o">.</span><span class="n">transform</span><span class="p">(</span><span class="n">test0</span><span class="p">)</span><span class="o">.</span><span class="n">take</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span> <span class="o">==</span> <span class="n">model2</span><span class="o">.</span><span class="n">transform</span><span class="p">(</span><span class="n">test0</span><span class="p">)</span><span class="o">.</span><span class="n">take</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span> |
| <span class="go">True</span> |
| </pre></div> |
| </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.LinearSVC.clear" title="pyspark.ml.classification.LinearSVC.clear"><code class="xref py py-obj docutils literal notranslate"><span class="pre">clear</span></code></a>(param)</p></td> |
| <td><p>Clears a param from the param map if it has been explicitly set.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="#pyspark.ml.classification.LinearSVC.copy" title="pyspark.ml.classification.LinearSVC.copy"><code class="xref py py-obj docutils literal notranslate"><span class="pre">copy</span></code></a>([extra])</p></td> |
| <td><p>Creates a copy of this instance with the same uid and some extra params.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="#pyspark.ml.classification.LinearSVC.explainParam" title="pyspark.ml.classification.LinearSVC.explainParam"><code class="xref py py-obj docutils literal notranslate"><span class="pre">explainParam</span></code></a>(param)</p></td> |
| <td><p>Explains a single param and returns its name, doc, and optional default value and user-supplied value in a string.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="#pyspark.ml.classification.LinearSVC.explainParams" title="pyspark.ml.classification.LinearSVC.explainParams"><code class="xref py py-obj docutils literal notranslate"><span class="pre">explainParams</span></code></a>()</p></td> |
| <td><p>Returns the documentation of all params with their optionally default values and user-supplied values.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="#pyspark.ml.classification.LinearSVC.extractParamMap" title="pyspark.ml.classification.LinearSVC.extractParamMap"><code class="xref py py-obj docutils literal notranslate"><span class="pre">extractParamMap</span></code></a>([extra])</p></td> |
| <td><p>Extracts the embedded default param values and user-supplied values, and then merges them with extra values from input into a flat param map, where the latter value is used if there exist conflicts, i.e., with ordering: default param values < user-supplied values < extra.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="#pyspark.ml.classification.LinearSVC.fit" title="pyspark.ml.classification.LinearSVC.fit"><code class="xref py py-obj docutils literal notranslate"><span class="pre">fit</span></code></a>(dataset[, params])</p></td> |
| <td><p>Fits a model to the input dataset with optional parameters.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="#pyspark.ml.classification.LinearSVC.fitMultiple" title="pyspark.ml.classification.LinearSVC.fitMultiple"><code class="xref py py-obj docutils literal notranslate"><span class="pre">fitMultiple</span></code></a>(dataset, paramMaps)</p></td> |
| <td><p>Fits a model to the input dataset for each param map in <cite>paramMaps</cite>.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="#pyspark.ml.classification.LinearSVC.getAggregationDepth" title="pyspark.ml.classification.LinearSVC.getAggregationDepth"><code class="xref py py-obj docutils literal notranslate"><span class="pre">getAggregationDepth</span></code></a>()</p></td> |
| <td><p>Gets the value of aggregationDepth or its default value.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="#pyspark.ml.classification.LinearSVC.getFeaturesCol" title="pyspark.ml.classification.LinearSVC.getFeaturesCol"><code class="xref py py-obj docutils literal notranslate"><span class="pre">getFeaturesCol</span></code></a>()</p></td> |
| <td><p>Gets the value of featuresCol or its default value.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="#pyspark.ml.classification.LinearSVC.getFitIntercept" title="pyspark.ml.classification.LinearSVC.getFitIntercept"><code class="xref py py-obj docutils literal notranslate"><span class="pre">getFitIntercept</span></code></a>()</p></td> |
| <td><p>Gets the value of fitIntercept or its default value.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="#pyspark.ml.classification.LinearSVC.getLabelCol" title="pyspark.ml.classification.LinearSVC.getLabelCol"><code class="xref py py-obj docutils literal notranslate"><span class="pre">getLabelCol</span></code></a>()</p></td> |
| <td><p>Gets the value of labelCol or its default value.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="#pyspark.ml.classification.LinearSVC.getMaxBlockSizeInMB" title="pyspark.ml.classification.LinearSVC.getMaxBlockSizeInMB"><code class="xref py py-obj docutils literal notranslate"><span class="pre">getMaxBlockSizeInMB</span></code></a>()</p></td> |
| <td><p>Gets the value of maxBlockSizeInMB or its default value.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="#pyspark.ml.classification.LinearSVC.getMaxIter" title="pyspark.ml.classification.LinearSVC.getMaxIter"><code class="xref py py-obj docutils literal notranslate"><span class="pre">getMaxIter</span></code></a>()</p></td> |
| <td><p>Gets the value of maxIter or its default value.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="#pyspark.ml.classification.LinearSVC.getOrDefault" title="pyspark.ml.classification.LinearSVC.getOrDefault"><code class="xref py py-obj docutils literal notranslate"><span class="pre">getOrDefault</span></code></a>(param)</p></td> |
| <td><p>Gets the value of a param in the user-supplied param map or its default value.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="#pyspark.ml.classification.LinearSVC.getParam" title="pyspark.ml.classification.LinearSVC.getParam"><code class="xref py py-obj docutils literal notranslate"><span class="pre">getParam</span></code></a>(paramName)</p></td> |
| <td><p>Gets a param by its name.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="#pyspark.ml.classification.LinearSVC.getPredictionCol" title="pyspark.ml.classification.LinearSVC.getPredictionCol"><code class="xref py py-obj docutils literal notranslate"><span class="pre">getPredictionCol</span></code></a>()</p></td> |
| <td><p>Gets the value of predictionCol or its default value.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="#pyspark.ml.classification.LinearSVC.getRawPredictionCol" title="pyspark.ml.classification.LinearSVC.getRawPredictionCol"><code class="xref py py-obj docutils literal notranslate"><span class="pre">getRawPredictionCol</span></code></a>()</p></td> |
| <td><p>Gets the value of rawPredictionCol or its default value.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="#pyspark.ml.classification.LinearSVC.getRegParam" title="pyspark.ml.classification.LinearSVC.getRegParam"><code class="xref py py-obj docutils literal notranslate"><span class="pre">getRegParam</span></code></a>()</p></td> |
| <td><p>Gets the value of regParam or its default value.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="#pyspark.ml.classification.LinearSVC.getStandardization" title="pyspark.ml.classification.LinearSVC.getStandardization"><code class="xref py py-obj docutils literal notranslate"><span class="pre">getStandardization</span></code></a>()</p></td> |
| <td><p>Gets the value of standardization or its default value.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="#pyspark.ml.classification.LinearSVC.getThreshold" title="pyspark.ml.classification.LinearSVC.getThreshold"><code class="xref py py-obj docutils literal notranslate"><span class="pre">getThreshold</span></code></a>()</p></td> |
| <td><p>Gets the value of threshold or its default value.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="#pyspark.ml.classification.LinearSVC.getTol" title="pyspark.ml.classification.LinearSVC.getTol"><code class="xref py py-obj docutils literal notranslate"><span class="pre">getTol</span></code></a>()</p></td> |
| <td><p>Gets the value of tol or its default value.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="#pyspark.ml.classification.LinearSVC.getWeightCol" title="pyspark.ml.classification.LinearSVC.getWeightCol"><code class="xref py py-obj docutils literal notranslate"><span class="pre">getWeightCol</span></code></a>()</p></td> |
| <td><p>Gets the value of weightCol or its default value.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="#pyspark.ml.classification.LinearSVC.hasDefault" title="pyspark.ml.classification.LinearSVC.hasDefault"><code class="xref py py-obj docutils literal notranslate"><span class="pre">hasDefault</span></code></a>(param)</p></td> |
| <td><p>Checks whether a param has a default value.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="#pyspark.ml.classification.LinearSVC.hasParam" title="pyspark.ml.classification.LinearSVC.hasParam"><code class="xref py py-obj docutils literal notranslate"><span class="pre">hasParam</span></code></a>(paramName)</p></td> |
| <td><p>Tests whether this instance contains a param with a given (string) name.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="#pyspark.ml.classification.LinearSVC.isDefined" title="pyspark.ml.classification.LinearSVC.isDefined"><code class="xref py py-obj docutils literal notranslate"><span class="pre">isDefined</span></code></a>(param)</p></td> |
| <td><p>Checks whether a param is explicitly set by user or has a default value.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="#pyspark.ml.classification.LinearSVC.isSet" title="pyspark.ml.classification.LinearSVC.isSet"><code class="xref py py-obj docutils literal notranslate"><span class="pre">isSet</span></code></a>(param)</p></td> |
| <td><p>Checks whether a param is explicitly set by user.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="#pyspark.ml.classification.LinearSVC.load" title="pyspark.ml.classification.LinearSVC.load"><code class="xref py py-obj docutils literal notranslate"><span class="pre">load</span></code></a>(path)</p></td> |
| <td><p>Reads an ML instance from the input path, a shortcut of <cite>read().load(path)</cite>.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="#pyspark.ml.classification.LinearSVC.read" title="pyspark.ml.classification.LinearSVC.read"><code class="xref py py-obj docutils literal notranslate"><span class="pre">read</span></code></a>()</p></td> |
| <td><p>Returns an MLReader instance for this class.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="#pyspark.ml.classification.LinearSVC.save" title="pyspark.ml.classification.LinearSVC.save"><code class="xref py py-obj docutils literal notranslate"><span class="pre">save</span></code></a>(path)</p></td> |
| <td><p>Save this ML instance to the given path, a shortcut of ‘write().save(path)’.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="#pyspark.ml.classification.LinearSVC.set" title="pyspark.ml.classification.LinearSVC.set"><code class="xref py py-obj docutils literal notranslate"><span class="pre">set</span></code></a>(param, value)</p></td> |
| <td><p>Sets a parameter in the embedded param map.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="#pyspark.ml.classification.LinearSVC.setAggregationDepth" title="pyspark.ml.classification.LinearSVC.setAggregationDepth"><code class="xref py py-obj docutils literal notranslate"><span class="pre">setAggregationDepth</span></code></a>(value)</p></td> |
| <td><p>Sets the value of <a class="reference internal" href="#pyspark.ml.classification.LinearSVC.aggregationDepth" title="pyspark.ml.classification.LinearSVC.aggregationDepth"><code class="xref py py-attr docutils literal notranslate"><span class="pre">aggregationDepth</span></code></a>.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="#pyspark.ml.classification.LinearSVC.setFeaturesCol" title="pyspark.ml.classification.LinearSVC.setFeaturesCol"><code class="xref py py-obj docutils literal notranslate"><span class="pre">setFeaturesCol</span></code></a>(value)</p></td> |
| <td><p>Sets the value of <a class="reference internal" href="#pyspark.ml.classification.LinearSVC.featuresCol" title="pyspark.ml.classification.LinearSVC.featuresCol"><code class="xref py py-attr docutils literal notranslate"><span class="pre">featuresCol</span></code></a>.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="#pyspark.ml.classification.LinearSVC.setFitIntercept" title="pyspark.ml.classification.LinearSVC.setFitIntercept"><code class="xref py py-obj docutils literal notranslate"><span class="pre">setFitIntercept</span></code></a>(value)</p></td> |
| <td><p>Sets the value of <a class="reference internal" href="#pyspark.ml.classification.LinearSVC.fitIntercept" title="pyspark.ml.classification.LinearSVC.fitIntercept"><code class="xref py py-attr docutils literal notranslate"><span class="pre">fitIntercept</span></code></a>.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="#pyspark.ml.classification.LinearSVC.setLabelCol" title="pyspark.ml.classification.LinearSVC.setLabelCol"><code class="xref py py-obj docutils literal notranslate"><span class="pre">setLabelCol</span></code></a>(value)</p></td> |
| <td><p>Sets the value of <a class="reference internal" href="#pyspark.ml.classification.LinearSVC.labelCol" title="pyspark.ml.classification.LinearSVC.labelCol"><code class="xref py py-attr docutils literal notranslate"><span class="pre">labelCol</span></code></a>.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="#pyspark.ml.classification.LinearSVC.setMaxBlockSizeInMB" title="pyspark.ml.classification.LinearSVC.setMaxBlockSizeInMB"><code class="xref py py-obj docutils literal notranslate"><span class="pre">setMaxBlockSizeInMB</span></code></a>(value)</p></td> |
| <td><p>Sets the value of <a class="reference internal" href="#pyspark.ml.classification.LinearSVC.maxBlockSizeInMB" title="pyspark.ml.classification.LinearSVC.maxBlockSizeInMB"><code class="xref py py-attr docutils literal notranslate"><span class="pre">maxBlockSizeInMB</span></code></a>.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="#pyspark.ml.classification.LinearSVC.setMaxIter" title="pyspark.ml.classification.LinearSVC.setMaxIter"><code class="xref py py-obj docutils literal notranslate"><span class="pre">setMaxIter</span></code></a>(value)</p></td> |
| <td><p>Sets the value of <a class="reference internal" href="#pyspark.ml.classification.LinearSVC.maxIter" title="pyspark.ml.classification.LinearSVC.maxIter"><code class="xref py py-attr docutils literal notranslate"><span class="pre">maxIter</span></code></a>.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="#pyspark.ml.classification.LinearSVC.setParams" title="pyspark.ml.classification.LinearSVC.setParams"><code class="xref py py-obj docutils literal notranslate"><span class="pre">setParams</span></code></a>(*[, featuresCol, labelCol, …])</p></td> |
| <td><p>setParams(self, *, featuresCol=”features”, labelCol=”label”, predictionCol=”prediction”, maxIter=100, regParam=0.0, tol=1e-6, rawPredictionCol=”rawPrediction”, fitIntercept=True, standardization=True, threshold=0.0, weightCol=None, aggregationDepth=2, maxBlockSizeInMB=0.0): Sets params for Linear SVM Classifier.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="#pyspark.ml.classification.LinearSVC.setPredictionCol" title="pyspark.ml.classification.LinearSVC.setPredictionCol"><code class="xref py py-obj docutils literal notranslate"><span class="pre">setPredictionCol</span></code></a>(value)</p></td> |
| <td><p>Sets the value of <a class="reference internal" href="#pyspark.ml.classification.LinearSVC.predictionCol" title="pyspark.ml.classification.LinearSVC.predictionCol"><code class="xref py py-attr docutils literal notranslate"><span class="pre">predictionCol</span></code></a>.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="#pyspark.ml.classification.LinearSVC.setRawPredictionCol" title="pyspark.ml.classification.LinearSVC.setRawPredictionCol"><code class="xref py py-obj docutils literal notranslate"><span class="pre">setRawPredictionCol</span></code></a>(value)</p></td> |
| <td><p>Sets the value of <a class="reference internal" href="#pyspark.ml.classification.LinearSVC.rawPredictionCol" title="pyspark.ml.classification.LinearSVC.rawPredictionCol"><code class="xref py py-attr docutils literal notranslate"><span class="pre">rawPredictionCol</span></code></a>.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="#pyspark.ml.classification.LinearSVC.setRegParam" title="pyspark.ml.classification.LinearSVC.setRegParam"><code class="xref py py-obj docutils literal notranslate"><span class="pre">setRegParam</span></code></a>(value)</p></td> |
| <td><p>Sets the value of <a class="reference internal" href="#pyspark.ml.classification.LinearSVC.regParam" title="pyspark.ml.classification.LinearSVC.regParam"><code class="xref py py-attr docutils literal notranslate"><span class="pre">regParam</span></code></a>.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="#pyspark.ml.classification.LinearSVC.setStandardization" title="pyspark.ml.classification.LinearSVC.setStandardization"><code class="xref py py-obj docutils literal notranslate"><span class="pre">setStandardization</span></code></a>(value)</p></td> |
| <td><p>Sets the value of <a class="reference internal" href="#pyspark.ml.classification.LinearSVC.standardization" title="pyspark.ml.classification.LinearSVC.standardization"><code class="xref py py-attr docutils literal notranslate"><span class="pre">standardization</span></code></a>.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="#pyspark.ml.classification.LinearSVC.setThreshold" title="pyspark.ml.classification.LinearSVC.setThreshold"><code class="xref py py-obj docutils literal notranslate"><span class="pre">setThreshold</span></code></a>(value)</p></td> |
| <td><p>Sets the value of <a class="reference internal" href="#pyspark.ml.classification.LinearSVC.threshold" title="pyspark.ml.classification.LinearSVC.threshold"><code class="xref py py-attr docutils literal notranslate"><span class="pre">threshold</span></code></a>.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="#pyspark.ml.classification.LinearSVC.setTol" title="pyspark.ml.classification.LinearSVC.setTol"><code class="xref py py-obj docutils literal notranslate"><span class="pre">setTol</span></code></a>(value)</p></td> |
| <td><p>Sets the value of <a class="reference internal" href="#pyspark.ml.classification.LinearSVC.tol" title="pyspark.ml.classification.LinearSVC.tol"><code class="xref py py-attr docutils literal notranslate"><span class="pre">tol</span></code></a>.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="#pyspark.ml.classification.LinearSVC.setWeightCol" title="pyspark.ml.classification.LinearSVC.setWeightCol"><code class="xref py py-obj docutils literal notranslate"><span class="pre">setWeightCol</span></code></a>(value)</p></td> |
| <td><p>Sets the value of <a class="reference internal" href="#pyspark.ml.classification.LinearSVC.weightCol" title="pyspark.ml.classification.LinearSVC.weightCol"><code class="xref py py-attr docutils literal notranslate"><span class="pre">weightCol</span></code></a>.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="#pyspark.ml.classification.LinearSVC.write" title="pyspark.ml.classification.LinearSVC.write"><code class="xref py py-obj docutils literal notranslate"><span class="pre">write</span></code></a>()</p></td> |
| <td><p>Returns an MLWriter instance for this ML instance.</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.LinearSVC.aggregationDepth" title="pyspark.ml.classification.LinearSVC.aggregationDepth"><code class="xref py py-obj docutils literal notranslate"><span class="pre">aggregationDepth</span></code></a></p></td> |
| <td><p></p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="#pyspark.ml.classification.LinearSVC.featuresCol" title="pyspark.ml.classification.LinearSVC.featuresCol"><code class="xref py py-obj docutils literal notranslate"><span class="pre">featuresCol</span></code></a></p></td> |
| <td><p></p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="#pyspark.ml.classification.LinearSVC.fitIntercept" title="pyspark.ml.classification.LinearSVC.fitIntercept"><code class="xref py py-obj docutils literal notranslate"><span class="pre">fitIntercept</span></code></a></p></td> |
| <td><p></p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="#pyspark.ml.classification.LinearSVC.labelCol" title="pyspark.ml.classification.LinearSVC.labelCol"><code class="xref py py-obj docutils literal notranslate"><span class="pre">labelCol</span></code></a></p></td> |
| <td><p></p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="#pyspark.ml.classification.LinearSVC.maxBlockSizeInMB" title="pyspark.ml.classification.LinearSVC.maxBlockSizeInMB"><code class="xref py py-obj docutils literal notranslate"><span class="pre">maxBlockSizeInMB</span></code></a></p></td> |
| <td><p></p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="#pyspark.ml.classification.LinearSVC.maxIter" title="pyspark.ml.classification.LinearSVC.maxIter"><code class="xref py py-obj docutils literal notranslate"><span class="pre">maxIter</span></code></a></p></td> |
| <td><p></p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="#pyspark.ml.classification.LinearSVC.params" title="pyspark.ml.classification.LinearSVC.params"><code class="xref py py-obj docutils literal notranslate"><span class="pre">params</span></code></a></p></td> |
| <td><p>Returns all params ordered by name.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="#pyspark.ml.classification.LinearSVC.predictionCol" title="pyspark.ml.classification.LinearSVC.predictionCol"><code class="xref py py-obj docutils literal notranslate"><span class="pre">predictionCol</span></code></a></p></td> |
| <td><p></p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="#pyspark.ml.classification.LinearSVC.rawPredictionCol" title="pyspark.ml.classification.LinearSVC.rawPredictionCol"><code class="xref py py-obj docutils literal notranslate"><span class="pre">rawPredictionCol</span></code></a></p></td> |
| <td><p></p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="#pyspark.ml.classification.LinearSVC.regParam" title="pyspark.ml.classification.LinearSVC.regParam"><code class="xref py py-obj docutils literal notranslate"><span class="pre">regParam</span></code></a></p></td> |
| <td><p></p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="#pyspark.ml.classification.LinearSVC.standardization" title="pyspark.ml.classification.LinearSVC.standardization"><code class="xref py py-obj docutils literal notranslate"><span class="pre">standardization</span></code></a></p></td> |
| <td><p></p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="#pyspark.ml.classification.LinearSVC.threshold" title="pyspark.ml.classification.LinearSVC.threshold"><code class="xref py py-obj docutils literal notranslate"><span class="pre">threshold</span></code></a></p></td> |
| <td><p></p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="#pyspark.ml.classification.LinearSVC.tol" title="pyspark.ml.classification.LinearSVC.tol"><code class="xref py py-obj docutils literal notranslate"><span class="pre">tol</span></code></a></p></td> |
| <td><p></p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="#pyspark.ml.classification.LinearSVC.weightCol" title="pyspark.ml.classification.LinearSVC.weightCol"><code class="xref py py-obj docutils literal notranslate"><span class="pre">weightCol</span></code></a></p></td> |
| <td><p></p></td> |
| </tr> |
| </tbody> |
| </table> |
| <p class="rubric">Methods Documentation</p> |
| <dl class="py method"> |
| <dt id="pyspark.ml.classification.LinearSVC.clear"> |
| <code class="sig-name descname">clear</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">param</span></em><span class="sig-paren">)</span><a class="headerlink" href="#pyspark.ml.classification.LinearSVC.clear" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Clears a param from the param map if it has been explicitly set.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="pyspark.ml.classification.LinearSVC.copy"> |
| <code class="sig-name descname">copy</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">extra</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="headerlink" href="#pyspark.ml.classification.LinearSVC.copy" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Creates a copy of this instance with the same uid and some |
| extra params. This implementation first calls Params.copy and |
| then make a copy of the companion Java pipeline component with |
| extra params. So both the Python wrapper and the Java pipeline |
| component get copied.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><dl class="simple"> |
| <dt><strong>extra</strong><span class="classifier">dict, optional</span></dt><dd><p>Extra parameters to copy to the new instance</p> |
| </dd> |
| </dl> |
| </dd> |
| <dt class="field-even">Returns</dt> |
| <dd class="field-even"><dl class="simple"> |
| <dt><code class="xref py py-class docutils literal notranslate"><span class="pre">JavaParams</span></code></dt><dd><p>Copy of this instance</p> |
| </dd> |
| </dl> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="pyspark.ml.classification.LinearSVC.explainParam"> |
| <code class="sig-name descname">explainParam</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">param</span></em><span class="sig-paren">)</span><a class="headerlink" href="#pyspark.ml.classification.LinearSVC.explainParam" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Explains a single param and returns its name, doc, and optional |
| default value and user-supplied value in a string.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="pyspark.ml.classification.LinearSVC.explainParams"> |
| <code class="sig-name descname">explainParams</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pyspark.ml.classification.LinearSVC.explainParams" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Returns the documentation of all params with their optionally |
| default values and user-supplied values.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="pyspark.ml.classification.LinearSVC.extractParamMap"> |
| <code class="sig-name descname">extractParamMap</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">extra</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="headerlink" href="#pyspark.ml.classification.LinearSVC.extractParamMap" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Extracts the embedded default param values and user-supplied |
| values, and then merges them with extra values from input into |
| a flat param map, where the latter value is used if there exist |
| conflicts, i.e., with ordering: default param values < |
| user-supplied values < extra.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><dl class="simple"> |
| <dt><strong>extra</strong><span class="classifier">dict, optional</span></dt><dd><p>extra param values</p> |
| </dd> |
| </dl> |
| </dd> |
| <dt class="field-even">Returns</dt> |
| <dd class="field-even"><dl class="simple"> |
| <dt>dict</dt><dd><p>merged param map</p> |
| </dd> |
| </dl> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="pyspark.ml.classification.LinearSVC.fit"> |
| <code class="sig-name descname">fit</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">dataset</span></em>, <em class="sig-param"><span class="n">params</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="headerlink" href="#pyspark.ml.classification.LinearSVC.fit" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Fits a model to the input dataset with optional parameters.</p> |
| <div class="versionadded"> |
| <p><span class="versionmodified added">New in version 1.3.0.</span></p> |
| </div> |
| <dl class="field-list"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><dl> |
| <dt><strong>dataset</strong><span class="classifier"><a class="reference internal" href="pyspark.sql.DataFrame.html#pyspark.sql.DataFrame" title="pyspark.sql.DataFrame"><code class="xref py py-class docutils literal notranslate"><span class="pre">pyspark.sql.DataFrame</span></code></a></span></dt><dd><p>input dataset.</p> |
| </dd> |
| <dt><strong>params</strong><span class="classifier">dict or list or tuple, optional</span></dt><dd><p>an optional param map that overrides embedded params. If a list/tuple of |
| param maps is given, this calls fit on each param map and returns a list of |
| models.</p> |
| </dd> |
| </dl> |
| </dd> |
| <dt class="field-even">Returns</dt> |
| <dd class="field-even"><dl class="simple"> |
| <dt><code class="xref py py-class docutils literal notranslate"><span class="pre">Transformer</span></code> or a list of <code class="xref py py-class docutils literal notranslate"><span class="pre">Transformer</span></code></dt><dd><p>fitted model(s)</p> |
| </dd> |
| </dl> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="pyspark.ml.classification.LinearSVC.fitMultiple"> |
| <code class="sig-name descname">fitMultiple</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">dataset</span></em>, <em class="sig-param"><span class="n">paramMaps</span></em><span class="sig-paren">)</span><a class="headerlink" href="#pyspark.ml.classification.LinearSVC.fitMultiple" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Fits a model to the input dataset for each param map in <cite>paramMaps</cite>.</p> |
| <div class="versionadded"> |
| <p><span class="versionmodified added">New in version 2.3.0.</span></p> |
| </div> |
| <dl class="field-list"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><dl> |
| <dt><strong>dataset</strong><span class="classifier"><a class="reference internal" href="pyspark.sql.DataFrame.html#pyspark.sql.DataFrame" title="pyspark.sql.DataFrame"><code class="xref py py-class docutils literal notranslate"><span class="pre">pyspark.sql.DataFrame</span></code></a></span></dt><dd><p>input dataset.</p> |
| </dd> |
| <dt><strong>paramMaps</strong><span class="classifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">collections.abc.Sequence</span></code></span></dt><dd><p>A Sequence of param maps.</p> |
| </dd> |
| </dl> |
| </dd> |
| <dt class="field-even">Returns</dt> |
| <dd class="field-even"><dl class="simple"> |
| <dt><code class="xref py py-class docutils literal notranslate"><span class="pre">_FitMultipleIterator</span></code></dt><dd><p>A thread safe iterable which contains one model for each param map. Each |
| call to <cite>next(modelIterator)</cite> will return <cite>(index, model)</cite> where model was fit |
| using <cite>paramMaps[index]</cite>. <cite>index</cite> values may not be sequential.</p> |
| </dd> |
| </dl> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="pyspark.ml.classification.LinearSVC.getAggregationDepth"> |
| <code class="sig-name descname">getAggregationDepth</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pyspark.ml.classification.LinearSVC.getAggregationDepth" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Gets the value of aggregationDepth or its default value.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="pyspark.ml.classification.LinearSVC.getFeaturesCol"> |
| <code class="sig-name descname">getFeaturesCol</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pyspark.ml.classification.LinearSVC.getFeaturesCol" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Gets the value of featuresCol or its default value.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="pyspark.ml.classification.LinearSVC.getFitIntercept"> |
| <code class="sig-name descname">getFitIntercept</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pyspark.ml.classification.LinearSVC.getFitIntercept" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Gets the value of fitIntercept or its default value.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="pyspark.ml.classification.LinearSVC.getLabelCol"> |
| <code class="sig-name descname">getLabelCol</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pyspark.ml.classification.LinearSVC.getLabelCol" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Gets the value of labelCol or its default value.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="pyspark.ml.classification.LinearSVC.getMaxBlockSizeInMB"> |
| <code class="sig-name descname">getMaxBlockSizeInMB</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pyspark.ml.classification.LinearSVC.getMaxBlockSizeInMB" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Gets the value of maxBlockSizeInMB or its default value.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="pyspark.ml.classification.LinearSVC.getMaxIter"> |
| <code class="sig-name descname">getMaxIter</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pyspark.ml.classification.LinearSVC.getMaxIter" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Gets the value of maxIter or its default value.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="pyspark.ml.classification.LinearSVC.getOrDefault"> |
| <code class="sig-name descname">getOrDefault</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">param</span></em><span class="sig-paren">)</span><a class="headerlink" href="#pyspark.ml.classification.LinearSVC.getOrDefault" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Gets the value of a param in the user-supplied param map or its |
| default value. Raises an error if neither is set.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="pyspark.ml.classification.LinearSVC.getParam"> |
| <code class="sig-name descname">getParam</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">paramName</span></em><span class="sig-paren">)</span><a class="headerlink" href="#pyspark.ml.classification.LinearSVC.getParam" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Gets a param by its name.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="pyspark.ml.classification.LinearSVC.getPredictionCol"> |
| <code class="sig-name descname">getPredictionCol</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pyspark.ml.classification.LinearSVC.getPredictionCol" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Gets the value of predictionCol or its default value.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="pyspark.ml.classification.LinearSVC.getRawPredictionCol"> |
| <code class="sig-name descname">getRawPredictionCol</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pyspark.ml.classification.LinearSVC.getRawPredictionCol" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Gets the value of rawPredictionCol or its default value.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="pyspark.ml.classification.LinearSVC.getRegParam"> |
| <code class="sig-name descname">getRegParam</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pyspark.ml.classification.LinearSVC.getRegParam" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Gets the value of regParam or its default value.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="pyspark.ml.classification.LinearSVC.getStandardization"> |
| <code class="sig-name descname">getStandardization</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pyspark.ml.classification.LinearSVC.getStandardization" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Gets the value of standardization or its default value.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="pyspark.ml.classification.LinearSVC.getThreshold"> |
| <code class="sig-name descname">getThreshold</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pyspark.ml.classification.LinearSVC.getThreshold" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Gets the value of threshold or its default value.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="pyspark.ml.classification.LinearSVC.getTol"> |
| <code class="sig-name descname">getTol</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pyspark.ml.classification.LinearSVC.getTol" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Gets the value of tol or its default value.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="pyspark.ml.classification.LinearSVC.getWeightCol"> |
| <code class="sig-name descname">getWeightCol</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pyspark.ml.classification.LinearSVC.getWeightCol" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Gets the value of weightCol or its default value.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="pyspark.ml.classification.LinearSVC.hasDefault"> |
| <code class="sig-name descname">hasDefault</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">param</span></em><span class="sig-paren">)</span><a class="headerlink" href="#pyspark.ml.classification.LinearSVC.hasDefault" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Checks whether a param has a default value.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="pyspark.ml.classification.LinearSVC.hasParam"> |
| <code class="sig-name descname">hasParam</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">paramName</span></em><span class="sig-paren">)</span><a class="headerlink" href="#pyspark.ml.classification.LinearSVC.hasParam" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Tests whether this instance contains a param with a given |
| (string) name.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="pyspark.ml.classification.LinearSVC.isDefined"> |
| <code class="sig-name descname">isDefined</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">param</span></em><span class="sig-paren">)</span><a class="headerlink" href="#pyspark.ml.classification.LinearSVC.isDefined" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Checks whether a param is explicitly set by user or has |
| a default value.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="pyspark.ml.classification.LinearSVC.isSet"> |
| <code class="sig-name descname">isSet</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">param</span></em><span class="sig-paren">)</span><a class="headerlink" href="#pyspark.ml.classification.LinearSVC.isSet" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Checks whether a param is explicitly set by user.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="pyspark.ml.classification.LinearSVC.load"> |
| <em class="property">classmethod </em><code class="sig-name descname">load</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">path</span></em><span class="sig-paren">)</span><a class="headerlink" href="#pyspark.ml.classification.LinearSVC.load" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Reads an ML instance from the input path, a shortcut of <cite>read().load(path)</cite>.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="pyspark.ml.classification.LinearSVC.read"> |
| <em class="property">classmethod </em><code class="sig-name descname">read</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pyspark.ml.classification.LinearSVC.read" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Returns an MLReader instance for this class.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="pyspark.ml.classification.LinearSVC.save"> |
| <code class="sig-name descname">save</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">path</span></em><span class="sig-paren">)</span><a class="headerlink" href="#pyspark.ml.classification.LinearSVC.save" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Save this ML instance to the given path, a shortcut of ‘write().save(path)’.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="pyspark.ml.classification.LinearSVC.set"> |
| <code class="sig-name descname">set</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">param</span></em>, <em class="sig-param"><span class="n">value</span></em><span class="sig-paren">)</span><a class="headerlink" href="#pyspark.ml.classification.LinearSVC.set" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Sets a parameter in the embedded param map.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="pyspark.ml.classification.LinearSVC.setAggregationDepth"> |
| <code class="sig-name descname">setAggregationDepth</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">value</span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/pyspark/ml/classification.html#LinearSVC.setAggregationDepth"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyspark.ml.classification.LinearSVC.setAggregationDepth" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Sets the value of <a class="reference internal" href="#pyspark.ml.classification.LinearSVC.aggregationDepth" title="pyspark.ml.classification.LinearSVC.aggregationDepth"><code class="xref py py-attr docutils literal notranslate"><span class="pre">aggregationDepth</span></code></a>.</p> |
| <div class="versionadded"> |
| <p><span class="versionmodified added">New in version 2.2.0.</span></p> |
| </div> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="pyspark.ml.classification.LinearSVC.setFeaturesCol"> |
| <code class="sig-name descname">setFeaturesCol</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">value</span></em><span class="sig-paren">)</span><a class="headerlink" href="#pyspark.ml.classification.LinearSVC.setFeaturesCol" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Sets the value of <a class="reference internal" href="#pyspark.ml.classification.LinearSVC.featuresCol" title="pyspark.ml.classification.LinearSVC.featuresCol"><code class="xref py py-attr docutils literal notranslate"><span class="pre">featuresCol</span></code></a>.</p> |
| <div class="versionadded"> |
| <p><span class="versionmodified added">New in version 3.0.0.</span></p> |
| </div> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="pyspark.ml.classification.LinearSVC.setFitIntercept"> |
| <code class="sig-name descname">setFitIntercept</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">value</span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/pyspark/ml/classification.html#LinearSVC.setFitIntercept"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyspark.ml.classification.LinearSVC.setFitIntercept" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Sets the value of <a class="reference internal" href="#pyspark.ml.classification.LinearSVC.fitIntercept" title="pyspark.ml.classification.LinearSVC.fitIntercept"><code class="xref py py-attr docutils literal notranslate"><span class="pre">fitIntercept</span></code></a>.</p> |
| <div class="versionadded"> |
| <p><span class="versionmodified added">New in version 2.2.0.</span></p> |
| </div> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="pyspark.ml.classification.LinearSVC.setLabelCol"> |
| <code class="sig-name descname">setLabelCol</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">value</span></em><span class="sig-paren">)</span><a class="headerlink" href="#pyspark.ml.classification.LinearSVC.setLabelCol" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Sets the value of <a class="reference internal" href="#pyspark.ml.classification.LinearSVC.labelCol" title="pyspark.ml.classification.LinearSVC.labelCol"><code class="xref py py-attr docutils literal notranslate"><span class="pre">labelCol</span></code></a>.</p> |
| <div class="versionadded"> |
| <p><span class="versionmodified added">New in version 3.0.0.</span></p> |
| </div> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="pyspark.ml.classification.LinearSVC.setMaxBlockSizeInMB"> |
| <code class="sig-name descname">setMaxBlockSizeInMB</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">value</span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/pyspark/ml/classification.html#LinearSVC.setMaxBlockSizeInMB"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyspark.ml.classification.LinearSVC.setMaxBlockSizeInMB" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Sets the value of <a class="reference internal" href="#pyspark.ml.classification.LinearSVC.maxBlockSizeInMB" title="pyspark.ml.classification.LinearSVC.maxBlockSizeInMB"><code class="xref py py-attr docutils literal notranslate"><span class="pre">maxBlockSizeInMB</span></code></a>.</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.LinearSVC.setMaxIter"> |
| <code class="sig-name descname">setMaxIter</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">value</span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/pyspark/ml/classification.html#LinearSVC.setMaxIter"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyspark.ml.classification.LinearSVC.setMaxIter" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Sets the value of <a class="reference internal" href="#pyspark.ml.classification.LinearSVC.maxIter" title="pyspark.ml.classification.LinearSVC.maxIter"><code class="xref py py-attr docutils literal notranslate"><span class="pre">maxIter</span></code></a>.</p> |
| <div class="versionadded"> |
| <p><span class="versionmodified added">New in version 2.2.0.</span></p> |
| </div> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="pyspark.ml.classification.LinearSVC.setParams"> |
| <code class="sig-name descname">setParams</code><span class="sig-paren">(</span><em class="sig-param"><span class="o">*</span></em>, <em class="sig-param"><span class="n">featuresCol</span><span class="o">=</span><span class="default_value">'features'</span></em>, <em class="sig-param"><span class="n">labelCol</span><span class="o">=</span><span class="default_value">'label'</span></em>, <em class="sig-param"><span class="n">predictionCol</span><span class="o">=</span><span class="default_value">'prediction'</span></em>, <em class="sig-param"><span class="n">maxIter</span><span class="o">=</span><span class="default_value">100</span></em>, <em class="sig-param"><span class="n">regParam</span><span class="o">=</span><span class="default_value">0.0</span></em>, <em class="sig-param"><span class="n">tol</span><span class="o">=</span><span class="default_value">1e-06</span></em>, <em class="sig-param"><span class="n">rawPredictionCol</span><span class="o">=</span><span class="default_value">'rawPrediction'</span></em>, <em class="sig-param"><span class="n">fitIntercept</span><span class="o">=</span><span class="default_value">True</span></em>, <em class="sig-param"><span class="n">standardization</span><span class="o">=</span><span class="default_value">True</span></em>, <em class="sig-param"><span class="n">threshold</span><span class="o">=</span><span class="default_value">0.0</span></em>, <em class="sig-param"><span class="n">weightCol</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">aggregationDepth</span><span class="o">=</span><span class="default_value">2</span></em>, <em class="sig-param"><span class="n">maxBlockSizeInMB</span><span class="o">=</span><span class="default_value">0.0</span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/pyspark/ml/classification.html#LinearSVC.setParams"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyspark.ml.classification.LinearSVC.setParams" title="Permalink to this definition">¶</a></dt> |
| <dd><p>setParams(self, *, featuresCol=”features”, labelCol=”label”, predictionCol=”prediction”, maxIter=100, regParam=0.0, tol=1e-6, rawPredictionCol=”rawPrediction”, fitIntercept=True, standardization=True, threshold=0.0, weightCol=None, aggregationDepth=2, maxBlockSizeInMB=0.0): |
| Sets params for Linear SVM Classifier.</p> |
| <div class="versionadded"> |
| <p><span class="versionmodified added">New in version 2.2.0.</span></p> |
| </div> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="pyspark.ml.classification.LinearSVC.setPredictionCol"> |
| <code class="sig-name descname">setPredictionCol</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">value</span></em><span class="sig-paren">)</span><a class="headerlink" href="#pyspark.ml.classification.LinearSVC.setPredictionCol" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Sets the value of <a class="reference internal" href="#pyspark.ml.classification.LinearSVC.predictionCol" title="pyspark.ml.classification.LinearSVC.predictionCol"><code class="xref py py-attr docutils literal notranslate"><span class="pre">predictionCol</span></code></a>.</p> |
| <div class="versionadded"> |
| <p><span class="versionmodified added">New in version 3.0.0.</span></p> |
| </div> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="pyspark.ml.classification.LinearSVC.setRawPredictionCol"> |
| <code class="sig-name descname">setRawPredictionCol</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">value</span></em><span class="sig-paren">)</span><a class="headerlink" href="#pyspark.ml.classification.LinearSVC.setRawPredictionCol" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Sets the value of <a class="reference internal" href="#pyspark.ml.classification.LinearSVC.rawPredictionCol" title="pyspark.ml.classification.LinearSVC.rawPredictionCol"><code class="xref py py-attr docutils literal notranslate"><span class="pre">rawPredictionCol</span></code></a>.</p> |
| <div class="versionadded"> |
| <p><span class="versionmodified added">New in version 3.0.0.</span></p> |
| </div> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="pyspark.ml.classification.LinearSVC.setRegParam"> |
| <code class="sig-name descname">setRegParam</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">value</span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/pyspark/ml/classification.html#LinearSVC.setRegParam"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyspark.ml.classification.LinearSVC.setRegParam" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Sets the value of <a class="reference internal" href="#pyspark.ml.classification.LinearSVC.regParam" title="pyspark.ml.classification.LinearSVC.regParam"><code class="xref py py-attr docutils literal notranslate"><span class="pre">regParam</span></code></a>.</p> |
| <div class="versionadded"> |
| <p><span class="versionmodified added">New in version 2.2.0.</span></p> |
| </div> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="pyspark.ml.classification.LinearSVC.setStandardization"> |
| <code class="sig-name descname">setStandardization</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">value</span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/pyspark/ml/classification.html#LinearSVC.setStandardization"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyspark.ml.classification.LinearSVC.setStandardization" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Sets the value of <a class="reference internal" href="#pyspark.ml.classification.LinearSVC.standardization" title="pyspark.ml.classification.LinearSVC.standardization"><code class="xref py py-attr docutils literal notranslate"><span class="pre">standardization</span></code></a>.</p> |
| <div class="versionadded"> |
| <p><span class="versionmodified added">New in version 2.2.0.</span></p> |
| </div> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="pyspark.ml.classification.LinearSVC.setThreshold"> |
| <code class="sig-name descname">setThreshold</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">value</span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/pyspark/ml/classification.html#LinearSVC.setThreshold"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyspark.ml.classification.LinearSVC.setThreshold" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Sets the value of <a class="reference internal" href="#pyspark.ml.classification.LinearSVC.threshold" title="pyspark.ml.classification.LinearSVC.threshold"><code class="xref py py-attr docutils literal notranslate"><span class="pre">threshold</span></code></a>.</p> |
| <div class="versionadded"> |
| <p><span class="versionmodified added">New in version 2.2.0.</span></p> |
| </div> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="pyspark.ml.classification.LinearSVC.setTol"> |
| <code class="sig-name descname">setTol</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">value</span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/pyspark/ml/classification.html#LinearSVC.setTol"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyspark.ml.classification.LinearSVC.setTol" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Sets the value of <a class="reference internal" href="#pyspark.ml.classification.LinearSVC.tol" title="pyspark.ml.classification.LinearSVC.tol"><code class="xref py py-attr docutils literal notranslate"><span class="pre">tol</span></code></a>.</p> |
| <div class="versionadded"> |
| <p><span class="versionmodified added">New in version 2.2.0.</span></p> |
| </div> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="pyspark.ml.classification.LinearSVC.setWeightCol"> |
| <code class="sig-name descname">setWeightCol</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">value</span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/pyspark/ml/classification.html#LinearSVC.setWeightCol"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyspark.ml.classification.LinearSVC.setWeightCol" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Sets the value of <a class="reference internal" href="#pyspark.ml.classification.LinearSVC.weightCol" title="pyspark.ml.classification.LinearSVC.weightCol"><code class="xref py py-attr docutils literal notranslate"><span class="pre">weightCol</span></code></a>.</p> |
| <div class="versionadded"> |
| <p><span class="versionmodified added">New in version 2.2.0.</span></p> |
| </div> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="pyspark.ml.classification.LinearSVC.write"> |
| <code class="sig-name descname">write</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pyspark.ml.classification.LinearSVC.write" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Returns an MLWriter instance for this ML instance.</p> |
| </dd></dl> |
| |
| <p class="rubric">Attributes Documentation</p> |
| <dl class="py attribute"> |
| <dt id="pyspark.ml.classification.LinearSVC.aggregationDepth"> |
| <code class="sig-name descname">aggregationDepth</code><em class="property"> = Param(parent='undefined', name='aggregationDepth', doc='suggested depth for treeAggregate (>= 2).')</em><a class="headerlink" href="#pyspark.ml.classification.LinearSVC.aggregationDepth" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="pyspark.ml.classification.LinearSVC.featuresCol"> |
| <code class="sig-name descname">featuresCol</code><em class="property"> = Param(parent='undefined', name='featuresCol', doc='features column name.')</em><a class="headerlink" href="#pyspark.ml.classification.LinearSVC.featuresCol" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="pyspark.ml.classification.LinearSVC.fitIntercept"> |
| <code class="sig-name descname">fitIntercept</code><em class="property"> = Param(parent='undefined', name='fitIntercept', doc='whether to fit an intercept term.')</em><a class="headerlink" href="#pyspark.ml.classification.LinearSVC.fitIntercept" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="pyspark.ml.classification.LinearSVC.labelCol"> |
| <code class="sig-name descname">labelCol</code><em class="property"> = Param(parent='undefined', name='labelCol', doc='label column name.')</em><a class="headerlink" href="#pyspark.ml.classification.LinearSVC.labelCol" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="pyspark.ml.classification.LinearSVC.maxBlockSizeInMB"> |
| <code class="sig-name descname">maxBlockSizeInMB</code><em class="property"> = Param(parent='undefined', name='maxBlockSizeInMB', doc='maximum memory in MB for stacking input data into blocks. Data is stacked within partitions. If more than remaining data size in a partition then it is adjusted to the data size. Default 0.0 represents choosing optimal value, depends on specific algorithm. Must be >= 0.')</em><a class="headerlink" href="#pyspark.ml.classification.LinearSVC.maxBlockSizeInMB" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="pyspark.ml.classification.LinearSVC.maxIter"> |
| <code class="sig-name descname">maxIter</code><em class="property"> = Param(parent='undefined', name='maxIter', doc='max number of iterations (>= 0).')</em><a class="headerlink" href="#pyspark.ml.classification.LinearSVC.maxIter" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="pyspark.ml.classification.LinearSVC.params"> |
| <code class="sig-name descname">params</code><a class="headerlink" href="#pyspark.ml.classification.LinearSVC.params" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Returns all params ordered by name. The default implementation |
| uses <code class="xref py py-func docutils literal notranslate"><span class="pre">dir()</span></code> to get all attributes of type |
| <code class="xref py py-class docutils literal notranslate"><span class="pre">Param</span></code>.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="pyspark.ml.classification.LinearSVC.predictionCol"> |
| <code class="sig-name descname">predictionCol</code><em class="property"> = Param(parent='undefined', name='predictionCol', doc='prediction column name.')</em><a class="headerlink" href="#pyspark.ml.classification.LinearSVC.predictionCol" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="pyspark.ml.classification.LinearSVC.rawPredictionCol"> |
| <code class="sig-name descname">rawPredictionCol</code><em class="property"> = Param(parent='undefined', name='rawPredictionCol', doc='raw prediction (a.k.a. confidence) column name.')</em><a class="headerlink" href="#pyspark.ml.classification.LinearSVC.rawPredictionCol" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="pyspark.ml.classification.LinearSVC.regParam"> |
| <code class="sig-name descname">regParam</code><em class="property"> = Param(parent='undefined', name='regParam', doc='regularization parameter (>= 0).')</em><a class="headerlink" href="#pyspark.ml.classification.LinearSVC.regParam" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="pyspark.ml.classification.LinearSVC.standardization"> |
| <code class="sig-name descname">standardization</code><em class="property"> = Param(parent='undefined', name='standardization', doc='whether to standardize the training features before fitting the model.')</em><a class="headerlink" href="#pyspark.ml.classification.LinearSVC.standardization" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="pyspark.ml.classification.LinearSVC.threshold"> |
| <code class="sig-name descname">threshold</code><em class="property"> = Param(parent='undefined', name='threshold', doc='The threshold in binary classification applied to the linear model prediction. This threshold can be any real number, where Inf will make all predictions 0.0 and -Inf will make all predictions 1.0.')</em><a class="headerlink" href="#pyspark.ml.classification.LinearSVC.threshold" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="pyspark.ml.classification.LinearSVC.tol"> |
| <code class="sig-name descname">tol</code><em class="property"> = Param(parent='undefined', name='tol', doc='the convergence tolerance for iterative algorithms (>= 0).')</em><a class="headerlink" href="#pyspark.ml.classification.LinearSVC.tol" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="pyspark.ml.classification.LinearSVC.weightCol"> |
| <code class="sig-name descname">weightCol</code><em class="property"> = Param(parent='undefined', name='weightCol', doc='weight column name. If this is not set or empty, we treat all instance weights as 1.0.')</em><a class="headerlink" href="#pyspark.ml.classification.LinearSVC.weightCol" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| </dd></dl> |
| |
| </div> |
| |
| |
| </div> |
| |
| |
| <div class='prev-next-bottom'> |
| |
| <a class='left-prev' id="prev-link" href="pyspark.ml.feature.Word2VecModel.html" title="previous page">Word2VecModel</a> |
| <a class='right-next' id="next-link" href="pyspark.ml.classification.LinearSVCModel.html" title="next page">LinearSVCModel</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> |