blob: edd8e4feb02b2bc94f645eb1bf25b221a8463b63 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Word2Vec &#8212; PySpark 3.3.4 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/copybutton.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/clipboard.min.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.feature.Word2Vec.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="Word2VecModel" href="pyspark.ml.feature.Word2VecModel.html" />
<link rel="prev" title="VectorSlicer" href="pyspark.ml.feature.VectorSlicer.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="word2vec">
<h1>Word2Vec<a class="headerlink" href="#word2vec" title="Permalink to this headline"></a></h1>
<dl class="py class">
<dt id="pyspark.ml.feature.Word2Vec">
<em class="property">class </em><code class="sig-prename descclassname">pyspark.ml.feature.</code><code class="sig-name descname">Word2Vec</code><span class="sig-paren">(</span><em class="sig-param"><span class="o">*</span></em>, <em class="sig-param"><span class="n">vectorSize</span><span class="p">:</span> <span class="n">int</span> <span class="o">=</span> <span class="default_value">100</span></em>, <em class="sig-param"><span class="n">minCount</span><span class="p">:</span> <span class="n">int</span> <span class="o">=</span> <span class="default_value">5</span></em>, <em class="sig-param"><span class="n">numPartitions</span><span class="p">:</span> <span class="n">int</span> <span class="o">=</span> <span class="default_value">1</span></em>, <em class="sig-param"><span class="n">stepSize</span><span class="p">:</span> <span class="n">float</span> <span class="o">=</span> <span class="default_value">0.025</span></em>, <em class="sig-param"><span class="n">maxIter</span><span class="p">:</span> <span class="n">int</span> <span class="o">=</span> <span class="default_value">1</span></em>, <em class="sig-param"><span class="n">seed</span><span class="p">:</span> <span class="n">Optional<span class="p">[</span>int<span class="p">]</span></span> <span class="o">=</span> <span class="default_value">None</span></em>, <em class="sig-param"><span class="n">inputCol</span><span class="p">:</span> <span class="n">Optional<span class="p">[</span>str<span class="p">]</span></span> <span class="o">=</span> <span class="default_value">None</span></em>, <em class="sig-param"><span class="n">outputCol</span><span class="p">:</span> <span class="n">Optional<span class="p">[</span>str<span class="p">]</span></span> <span class="o">=</span> <span class="default_value">None</span></em>, <em class="sig-param"><span class="n">windowSize</span><span class="p">:</span> <span class="n">int</span> <span class="o">=</span> <span class="default_value">5</span></em>, <em class="sig-param"><span class="n">maxSentenceLength</span><span class="p">:</span> <span class="n">int</span> <span class="o">=</span> <span class="default_value">1000</span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/pyspark/ml/feature.html#Word2Vec"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyspark.ml.feature.Word2Vec" title="Permalink to this definition"></a></dt>
<dd><p>Word2Vec trains a model of <cite>Map(String, Vector)</cite>, i.e. transforms a word into a code for further
natural language processing or machine learning process.</p>
<div class="versionadded">
<p><span class="versionmodified added">New in version 1.4.0.</span></p>
</div>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">sent</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;a b &quot;</span> <span class="o">*</span> <span class="mi">100</span> <span class="o">+</span> <span class="s2">&quot;a c &quot;</span> <span class="o">*</span> <span class="mi">10</span><span class="p">)</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s2">&quot; &quot;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">doc</span> <span class="o">=</span> <span class="n">spark</span><span class="o">.</span><span class="n">createDataFrame</span><span class="p">([(</span><span class="n">sent</span><span class="p">,),</span> <span class="p">(</span><span class="n">sent</span><span class="p">,)],</span> <span class="p">[</span><span class="s2">&quot;sentence&quot;</span><span class="p">])</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">word2Vec</span> <span class="o">=</span> <span class="n">Word2Vec</span><span class="p">(</span><span class="n">vectorSize</span><span class="o">=</span><span class="mi">5</span><span class="p">,</span> <span class="n">seed</span><span class="o">=</span><span class="mi">42</span><span class="p">,</span> <span class="n">inputCol</span><span class="o">=</span><span class="s2">&quot;sentence&quot;</span><span class="p">,</span> <span class="n">outputCol</span><span class="o">=</span><span class="s2">&quot;model&quot;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">word2Vec</span><span class="o">.</span><span class="n">setMaxIter</span><span class="p">(</span><span class="mi">10</span><span class="p">)</span>
<span class="go">Word2Vec...</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">word2Vec</span><span class="o">.</span><span class="n">getMaxIter</span><span class="p">()</span>
<span class="go">10</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">word2Vec</span><span class="o">.</span><span class="n">clear</span><span class="p">(</span><span class="n">word2Vec</span><span class="o">.</span><span class="n">maxIter</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">model</span> <span class="o">=</span> <span class="n">word2Vec</span><span class="o">.</span><span class="n">fit</span><span class="p">(</span><span class="n">doc</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">model</span><span class="o">.</span><span class="n">getMinCount</span><span class="p">()</span>
<span class="go">5</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">model</span><span class="o">.</span><span class="n">setInputCol</span><span class="p">(</span><span class="s2">&quot;sentence&quot;</span><span class="p">)</span>
<span class="go">Word2VecModel...</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">model</span><span class="o">.</span><span class="n">getVectors</span><span class="p">()</span><span class="o">.</span><span class="n">show</span><span class="p">()</span>
<span class="go">+----+--------------------+</span>
<span class="go">|word| vector|</span>
<span class="go">+----+--------------------+</span>
<span class="go">| a|[0.0951...</span>
<span class="go">| b|[-1.202...</span>
<span class="go">| c|[0.3015...</span>
<span class="go">+----+--------------------+</span>
<span class="go">...</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">model</span><span class="o">.</span><span class="n">findSynonymsArray</span><span class="p">(</span><span class="s2">&quot;a&quot;</span><span class="p">,</span> <span class="mi">2</span><span class="p">)</span>
<span class="go">[(&#39;b&#39;, 0.015859...), (&#39;c&#39;, -0.568079...)]</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">pyspark.sql.functions</span> <span class="kn">import</span> <span class="n">format_number</span> <span class="k">as</span> <span class="n">fmt</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">model</span><span class="o">.</span><span class="n">findSynonyms</span><span class="p">(</span><span class="s2">&quot;a&quot;</span><span class="p">,</span> <span class="mi">2</span><span class="p">)</span><span class="o">.</span><span class="n">select</span><span class="p">(</span><span class="s2">&quot;word&quot;</span><span class="p">,</span> <span class="n">fmt</span><span class="p">(</span><span class="s2">&quot;similarity&quot;</span><span class="p">,</span> <span class="mi">5</span><span class="p">)</span><span class="o">.</span><span class="n">alias</span><span class="p">(</span><span class="s2">&quot;similarity&quot;</span><span class="p">))</span><span class="o">.</span><span class="n">show</span><span class="p">()</span>
<span class="go">+----+----------+</span>
<span class="go">|word|similarity|</span>
<span class="go">+----+----------+</span>
<span class="go">| b| 0.01586|</span>
<span class="go">| c| -0.56808|</span>
<span class="go">+----+----------+</span>
<span class="go">...</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">model</span><span class="o">.</span><span class="n">transform</span><span class="p">(</span><span class="n">doc</span><span class="p">)</span><span class="o">.</span><span class="n">head</span><span class="p">()</span><span class="o">.</span><span class="n">model</span>
<span class="go">DenseVector([-0.4833, 0.1855, -0.273, -0.0509, -0.4769])</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">word2vecPath</span> <span class="o">=</span> <span class="n">temp_path</span> <span class="o">+</span> <span class="s2">&quot;/word2vec&quot;</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">word2Vec</span><span class="o">.</span><span class="n">save</span><span class="p">(</span><span class="n">word2vecPath</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">loadedWord2Vec</span> <span class="o">=</span> <span class="n">Word2Vec</span><span class="o">.</span><span class="n">load</span><span class="p">(</span><span class="n">word2vecPath</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">loadedWord2Vec</span><span class="o">.</span><span class="n">getVectorSize</span><span class="p">()</span> <span class="o">==</span> <span class="n">word2Vec</span><span class="o">.</span><span class="n">getVectorSize</span><span class="p">()</span>
<span class="go">True</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">loadedWord2Vec</span><span class="o">.</span><span class="n">getNumPartitions</span><span class="p">()</span> <span class="o">==</span> <span class="n">word2Vec</span><span class="o">.</span><span class="n">getNumPartitions</span><span class="p">()</span>
<span class="go">True</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">loadedWord2Vec</span><span class="o">.</span><span class="n">getMinCount</span><span class="p">()</span> <span class="o">==</span> <span class="n">word2Vec</span><span class="o">.</span><span class="n">getMinCount</span><span class="p">()</span>
<span class="go">True</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">modelPath</span> <span class="o">=</span> <span class="n">temp_path</span> <span class="o">+</span> <span class="s2">&quot;/word2vec-model&quot;</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">model</span><span class="o">.</span><span class="n">save</span><span class="p">(</span><span class="n">modelPath</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">loadedModel</span> <span class="o">=</span> <span class="n">Word2VecModel</span><span class="o">.</span><span class="n">load</span><span class="p">(</span><span class="n">modelPath</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">loadedModel</span><span class="o">.</span><span class="n">getVectors</span><span class="p">()</span><span class="o">.</span><span class="n">first</span><span class="p">()</span><span class="o">.</span><span class="n">word</span> <span class="o">==</span> <span class="n">model</span><span class="o">.</span><span class="n">getVectors</span><span class="p">()</span><span class="o">.</span><span class="n">first</span><span class="p">()</span><span class="o">.</span><span class="n">word</span>
<span class="go">True</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">loadedModel</span><span class="o">.</span><span class="n">getVectors</span><span class="p">()</span><span class="o">.</span><span class="n">first</span><span class="p">()</span><span class="o">.</span><span class="n">vector</span> <span class="o">==</span> <span class="n">model</span><span class="o">.</span><span class="n">getVectors</span><span class="p">()</span><span class="o">.</span><span class="n">first</span><span class="p">()</span><span class="o">.</span><span class="n">vector</span>
<span class="go">True</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">loadedModel</span><span class="o">.</span><span class="n">transform</span><span class="p">(</span><span class="n">doc</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">model</span><span class="o">.</span><span class="n">transform</span><span class="p">(</span><span class="n">doc</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.feature.Word2Vec.clear" title="pyspark.ml.feature.Word2Vec.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.feature.Word2Vec.copy" title="pyspark.ml.feature.Word2Vec.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.feature.Word2Vec.explainParam" title="pyspark.ml.feature.Word2Vec.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.feature.Word2Vec.explainParams" title="pyspark.ml.feature.Word2Vec.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.feature.Word2Vec.extractParamMap" title="pyspark.ml.feature.Word2Vec.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 &lt; user-supplied values &lt; extra.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyspark.ml.feature.Word2Vec.fit" title="pyspark.ml.feature.Word2Vec.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.feature.Word2Vec.fitMultiple" title="pyspark.ml.feature.Word2Vec.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.feature.Word2Vec.getInputCol" title="pyspark.ml.feature.Word2Vec.getInputCol"><code class="xref py py-obj docutils literal notranslate"><span class="pre">getInputCol</span></code></a>()</p></td>
<td><p>Gets the value of inputCol or its default value.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyspark.ml.feature.Word2Vec.getMaxIter" title="pyspark.ml.feature.Word2Vec.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.feature.Word2Vec.getMaxSentenceLength" title="pyspark.ml.feature.Word2Vec.getMaxSentenceLength"><code class="xref py py-obj docutils literal notranslate"><span class="pre">getMaxSentenceLength</span></code></a>()</p></td>
<td><p>Gets the value of maxSentenceLength or its default value.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyspark.ml.feature.Word2Vec.getMinCount" title="pyspark.ml.feature.Word2Vec.getMinCount"><code class="xref py py-obj docutils literal notranslate"><span class="pre">getMinCount</span></code></a>()</p></td>
<td><p>Gets the value of minCount or its default value.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyspark.ml.feature.Word2Vec.getNumPartitions" title="pyspark.ml.feature.Word2Vec.getNumPartitions"><code class="xref py py-obj docutils literal notranslate"><span class="pre">getNumPartitions</span></code></a>()</p></td>
<td><p>Gets the value of numPartitions or its default value.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyspark.ml.feature.Word2Vec.getOrDefault" title="pyspark.ml.feature.Word2Vec.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-even"><td><p><a class="reference internal" href="#pyspark.ml.feature.Word2Vec.getOutputCol" title="pyspark.ml.feature.Word2Vec.getOutputCol"><code class="xref py py-obj docutils literal notranslate"><span class="pre">getOutputCol</span></code></a>()</p></td>
<td><p>Gets the value of outputCol or its default value.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyspark.ml.feature.Word2Vec.getParam" title="pyspark.ml.feature.Word2Vec.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.feature.Word2Vec.getSeed" title="pyspark.ml.feature.Word2Vec.getSeed"><code class="xref py py-obj docutils literal notranslate"><span class="pre">getSeed</span></code></a>()</p></td>
<td><p>Gets the value of seed or its default value.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyspark.ml.feature.Word2Vec.getStepSize" title="pyspark.ml.feature.Word2Vec.getStepSize"><code class="xref py py-obj docutils literal notranslate"><span class="pre">getStepSize</span></code></a>()</p></td>
<td><p>Gets the value of stepSize or its default value.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyspark.ml.feature.Word2Vec.getVectorSize" title="pyspark.ml.feature.Word2Vec.getVectorSize"><code class="xref py py-obj docutils literal notranslate"><span class="pre">getVectorSize</span></code></a>()</p></td>
<td><p>Gets the value of vectorSize or its default value.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyspark.ml.feature.Word2Vec.getWindowSize" title="pyspark.ml.feature.Word2Vec.getWindowSize"><code class="xref py py-obj docutils literal notranslate"><span class="pre">getWindowSize</span></code></a>()</p></td>
<td><p>Gets the value of windowSize or its default value.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyspark.ml.feature.Word2Vec.hasDefault" title="pyspark.ml.feature.Word2Vec.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-odd"><td><p><a class="reference internal" href="#pyspark.ml.feature.Word2Vec.hasParam" title="pyspark.ml.feature.Word2Vec.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-even"><td><p><a class="reference internal" href="#pyspark.ml.feature.Word2Vec.isDefined" title="pyspark.ml.feature.Word2Vec.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-odd"><td><p><a class="reference internal" href="#pyspark.ml.feature.Word2Vec.isSet" title="pyspark.ml.feature.Word2Vec.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-even"><td><p><a class="reference internal" href="#pyspark.ml.feature.Word2Vec.load" title="pyspark.ml.feature.Word2Vec.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-odd"><td><p><a class="reference internal" href="#pyspark.ml.feature.Word2Vec.read" title="pyspark.ml.feature.Word2Vec.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-even"><td><p><a class="reference internal" href="#pyspark.ml.feature.Word2Vec.save" title="pyspark.ml.feature.Word2Vec.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-odd"><td><p><a class="reference internal" href="#pyspark.ml.feature.Word2Vec.set" title="pyspark.ml.feature.Word2Vec.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-even"><td><p><a class="reference internal" href="#pyspark.ml.feature.Word2Vec.setInputCol" title="pyspark.ml.feature.Word2Vec.setInputCol"><code class="xref py py-obj docutils literal notranslate"><span class="pre">setInputCol</span></code></a>(value)</p></td>
<td><p>Sets the value of <a class="reference internal" href="#pyspark.ml.feature.Word2Vec.inputCol" title="pyspark.ml.feature.Word2Vec.inputCol"><code class="xref py py-attr docutils literal notranslate"><span class="pre">inputCol</span></code></a>.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyspark.ml.feature.Word2Vec.setMaxIter" title="pyspark.ml.feature.Word2Vec.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.feature.Word2Vec.maxIter" title="pyspark.ml.feature.Word2Vec.maxIter"><code class="xref py py-attr docutils literal notranslate"><span class="pre">maxIter</span></code></a>.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyspark.ml.feature.Word2Vec.setMaxSentenceLength" title="pyspark.ml.feature.Word2Vec.setMaxSentenceLength"><code class="xref py py-obj docutils literal notranslate"><span class="pre">setMaxSentenceLength</span></code></a>(value)</p></td>
<td><p>Sets the value of <a class="reference internal" href="#pyspark.ml.feature.Word2Vec.maxSentenceLength" title="pyspark.ml.feature.Word2Vec.maxSentenceLength"><code class="xref py py-attr docutils literal notranslate"><span class="pre">maxSentenceLength</span></code></a>.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyspark.ml.feature.Word2Vec.setMinCount" title="pyspark.ml.feature.Word2Vec.setMinCount"><code class="xref py py-obj docutils literal notranslate"><span class="pre">setMinCount</span></code></a>(value)</p></td>
<td><p>Sets the value of <a class="reference internal" href="#pyspark.ml.feature.Word2Vec.minCount" title="pyspark.ml.feature.Word2Vec.minCount"><code class="xref py py-attr docutils literal notranslate"><span class="pre">minCount</span></code></a>.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyspark.ml.feature.Word2Vec.setNumPartitions" title="pyspark.ml.feature.Word2Vec.setNumPartitions"><code class="xref py py-obj docutils literal notranslate"><span class="pre">setNumPartitions</span></code></a>(value)</p></td>
<td><p>Sets the value of <a class="reference internal" href="#pyspark.ml.feature.Word2Vec.numPartitions" title="pyspark.ml.feature.Word2Vec.numPartitions"><code class="xref py py-attr docutils literal notranslate"><span class="pre">numPartitions</span></code></a>.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyspark.ml.feature.Word2Vec.setOutputCol" title="pyspark.ml.feature.Word2Vec.setOutputCol"><code class="xref py py-obj docutils literal notranslate"><span class="pre">setOutputCol</span></code></a>(value)</p></td>
<td><p>Sets the value of <a class="reference internal" href="#pyspark.ml.feature.Word2Vec.outputCol" title="pyspark.ml.feature.Word2Vec.outputCol"><code class="xref py py-attr docutils literal notranslate"><span class="pre">outputCol</span></code></a>.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyspark.ml.feature.Word2Vec.setParams" title="pyspark.ml.feature.Word2Vec.setParams"><code class="xref py py-obj docutils literal notranslate"><span class="pre">setParams</span></code></a>(self, \*[, minCount, …])</p></td>
<td><p>Sets params for this Word2Vec.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyspark.ml.feature.Word2Vec.setSeed" title="pyspark.ml.feature.Word2Vec.setSeed"><code class="xref py py-obj docutils literal notranslate"><span class="pre">setSeed</span></code></a>(value)</p></td>
<td><p>Sets the value of <a class="reference internal" href="#pyspark.ml.feature.Word2Vec.seed" title="pyspark.ml.feature.Word2Vec.seed"><code class="xref py py-attr docutils literal notranslate"><span class="pre">seed</span></code></a>.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyspark.ml.feature.Word2Vec.setStepSize" title="pyspark.ml.feature.Word2Vec.setStepSize"><code class="xref py py-obj docutils literal notranslate"><span class="pre">setStepSize</span></code></a>(value)</p></td>
<td><p>Sets the value of <a class="reference internal" href="#pyspark.ml.feature.Word2Vec.stepSize" title="pyspark.ml.feature.Word2Vec.stepSize"><code class="xref py py-attr docutils literal notranslate"><span class="pre">stepSize</span></code></a>.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyspark.ml.feature.Word2Vec.setVectorSize" title="pyspark.ml.feature.Word2Vec.setVectorSize"><code class="xref py py-obj docutils literal notranslate"><span class="pre">setVectorSize</span></code></a>(value)</p></td>
<td><p>Sets the value of <a class="reference internal" href="#pyspark.ml.feature.Word2Vec.vectorSize" title="pyspark.ml.feature.Word2Vec.vectorSize"><code class="xref py py-attr docutils literal notranslate"><span class="pre">vectorSize</span></code></a>.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyspark.ml.feature.Word2Vec.setWindowSize" title="pyspark.ml.feature.Word2Vec.setWindowSize"><code class="xref py py-obj docutils literal notranslate"><span class="pre">setWindowSize</span></code></a>(value)</p></td>
<td><p>Sets the value of <a class="reference internal" href="#pyspark.ml.feature.Word2Vec.windowSize" title="pyspark.ml.feature.Word2Vec.windowSize"><code class="xref py py-attr docutils literal notranslate"><span class="pre">windowSize</span></code></a>.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyspark.ml.feature.Word2Vec.write" title="pyspark.ml.feature.Word2Vec.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.feature.Word2Vec.inputCol" title="pyspark.ml.feature.Word2Vec.inputCol"><code class="xref py py-obj docutils literal notranslate"><span class="pre">inputCol</span></code></a></p></td>
<td><p></p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyspark.ml.feature.Word2Vec.maxIter" title="pyspark.ml.feature.Word2Vec.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.feature.Word2Vec.maxSentenceLength" title="pyspark.ml.feature.Word2Vec.maxSentenceLength"><code class="xref py py-obj docutils literal notranslate"><span class="pre">maxSentenceLength</span></code></a></p></td>
<td><p></p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyspark.ml.feature.Word2Vec.minCount" title="pyspark.ml.feature.Word2Vec.minCount"><code class="xref py py-obj docutils literal notranslate"><span class="pre">minCount</span></code></a></p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyspark.ml.feature.Word2Vec.numPartitions" title="pyspark.ml.feature.Word2Vec.numPartitions"><code class="xref py py-obj docutils literal notranslate"><span class="pre">numPartitions</span></code></a></p></td>
<td><p></p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyspark.ml.feature.Word2Vec.outputCol" title="pyspark.ml.feature.Word2Vec.outputCol"><code class="xref py py-obj docutils literal notranslate"><span class="pre">outputCol</span></code></a></p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyspark.ml.feature.Word2Vec.params" title="pyspark.ml.feature.Word2Vec.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.feature.Word2Vec.seed" title="pyspark.ml.feature.Word2Vec.seed"><code class="xref py py-obj docutils literal notranslate"><span class="pre">seed</span></code></a></p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyspark.ml.feature.Word2Vec.stepSize" title="pyspark.ml.feature.Word2Vec.stepSize"><code class="xref py py-obj docutils literal notranslate"><span class="pre">stepSize</span></code></a></p></td>
<td><p></p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyspark.ml.feature.Word2Vec.vectorSize" title="pyspark.ml.feature.Word2Vec.vectorSize"><code class="xref py py-obj docutils literal notranslate"><span class="pre">vectorSize</span></code></a></p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyspark.ml.feature.Word2Vec.windowSize" title="pyspark.ml.feature.Word2Vec.windowSize"><code class="xref py py-obj docutils literal notranslate"><span class="pre">windowSize</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.feature.Word2Vec.clear">
<code class="sig-name descname">clear</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">param</span><span class="p">:</span> <span class="n"><a class="reference internal" href="pyspark.ml.param.Param.html#pyspark.ml.param.Param" title="pyspark.ml.param.Param">pyspark.ml.param.Param</a></span></em><span class="sig-paren">)</span> &#x2192; None<a class="headerlink" href="#pyspark.ml.feature.Word2Vec.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.feature.Word2Vec.copy">
<code class="sig-name descname">copy</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">extra</span><span class="p">:</span> <span class="n">Optional<span class="p">[</span>ParamMap<span class="p">]</span></span> <span class="o">=</span> <span class="default_value">None</span></em><span class="sig-paren">)</span> &#x2192; JP<a class="headerlink" href="#pyspark.ml.feature.Word2Vec.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.feature.Word2Vec.explainParam">
<code class="sig-name descname">explainParam</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">param</span><span class="p">:</span> <span class="n">Union<span class="p">[</span>str<span class="p">, </span><a class="reference internal" href="pyspark.ml.param.Param.html#pyspark.ml.param.Param" title="pyspark.ml.param.Param">pyspark.ml.param.Param</a><span class="p">]</span></span></em><span class="sig-paren">)</span> &#x2192; str<a class="headerlink" href="#pyspark.ml.feature.Word2Vec.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.feature.Word2Vec.explainParams">
<code class="sig-name descname">explainParams</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; str<a class="headerlink" href="#pyspark.ml.feature.Word2Vec.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.feature.Word2Vec.extractParamMap">
<code class="sig-name descname">extractParamMap</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">extra</span><span class="p">:</span> <span class="n">Optional<span class="p">[</span>ParamMap<span class="p">]</span></span> <span class="o">=</span> <span class="default_value">None</span></em><span class="sig-paren">)</span> &#x2192; ParamMap<a class="headerlink" href="#pyspark.ml.feature.Word2Vec.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 &lt;
user-supplied values &lt; 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.feature.Word2Vec.fit">
<code class="sig-name descname">fit</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">dataset</span><span class="p">:</span> <span class="n">pyspark.sql.dataframe.DataFrame</span></em>, <em class="sig-param"><span class="n">params</span><span class="p">:</span> <span class="n">Union[ParamMap, List[ParamMap], Tuple[ParamMap], None]</span> <span class="o">=</span> <span class="default_value">None</span></em><span class="sig-paren">)</span> &#x2192; Union<span class="p">[</span>M<span class="p">, </span>List<span class="p">[</span>M<span class="p">]</span><span class="p">]</span><a class="headerlink" href="#pyspark.ml.feature.Word2Vec.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/api/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.feature.Word2Vec.fitMultiple">
<code class="sig-name descname">fitMultiple</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">dataset</span><span class="p">:</span> <span class="n">pyspark.sql.dataframe.DataFrame</span></em>, <em class="sig-param"><span class="n">paramMaps</span><span class="p">:</span> <span class="n">Sequence<span class="p">[</span>ParamMap<span class="p">]</span></span></em><span class="sig-paren">)</span> &#x2192; Iterator<span class="p">[</span>Tuple<span class="p">[</span>int<span class="p">, </span>M<span class="p">]</span><span class="p">]</span><a class="headerlink" href="#pyspark.ml.feature.Word2Vec.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/api/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.feature.Word2Vec.getInputCol">
<code class="sig-name descname">getInputCol</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; str<a class="headerlink" href="#pyspark.ml.feature.Word2Vec.getInputCol" title="Permalink to this definition"></a></dt>
<dd><p>Gets the value of inputCol or its default value.</p>
</dd></dl>
<dl class="py method">
<dt id="pyspark.ml.feature.Word2Vec.getMaxIter">
<code class="sig-name descname">getMaxIter</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; int<a class="headerlink" href="#pyspark.ml.feature.Word2Vec.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.feature.Word2Vec.getMaxSentenceLength">
<code class="sig-name descname">getMaxSentenceLength</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; int<a class="headerlink" href="#pyspark.ml.feature.Word2Vec.getMaxSentenceLength" title="Permalink to this definition"></a></dt>
<dd><p>Gets the value of maxSentenceLength or its default value.</p>
<div class="versionadded">
<p><span class="versionmodified added">New in version 2.0.0.</span></p>
</div>
</dd></dl>
<dl class="py method">
<dt id="pyspark.ml.feature.Word2Vec.getMinCount">
<code class="sig-name descname">getMinCount</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; int<a class="headerlink" href="#pyspark.ml.feature.Word2Vec.getMinCount" title="Permalink to this definition"></a></dt>
<dd><p>Gets the value of minCount or its default value.</p>
<div class="versionadded">
<p><span class="versionmodified added">New in version 1.4.0.</span></p>
</div>
</dd></dl>
<dl class="py method">
<dt id="pyspark.ml.feature.Word2Vec.getNumPartitions">
<code class="sig-name descname">getNumPartitions</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; int<a class="headerlink" href="#pyspark.ml.feature.Word2Vec.getNumPartitions" title="Permalink to this definition"></a></dt>
<dd><p>Gets the value of numPartitions or its default value.</p>
<div class="versionadded">
<p><span class="versionmodified added">New in version 1.4.0.</span></p>
</div>
</dd></dl>
<dl class="py method">
<dt id="pyspark.ml.feature.Word2Vec.getOrDefault">
<code class="sig-name descname">getOrDefault</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">param</span><span class="p">:</span> <span class="n">Union<span class="p">[</span>str<span class="p">, </span><a class="reference internal" href="pyspark.ml.param.Param.html#pyspark.ml.param.Param" title="pyspark.ml.param.Param">pyspark.ml.param.Param</a><span class="p">[</span>T<span class="p">]</span><span class="p">]</span></span></em><span class="sig-paren">)</span> &#x2192; Union<span class="p">[</span>Any<span class="p">, </span>T<span class="p">]</span><a class="headerlink" href="#pyspark.ml.feature.Word2Vec.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.feature.Word2Vec.getOutputCol">
<code class="sig-name descname">getOutputCol</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; str<a class="headerlink" href="#pyspark.ml.feature.Word2Vec.getOutputCol" title="Permalink to this definition"></a></dt>
<dd><p>Gets the value of outputCol or its default value.</p>
</dd></dl>
<dl class="py method">
<dt id="pyspark.ml.feature.Word2Vec.getParam">
<code class="sig-name descname">getParam</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">paramName</span><span class="p">:</span> <span class="n">str</span></em><span class="sig-paren">)</span> &#x2192; <a class="reference internal" href="pyspark.ml.param.Param.html#pyspark.ml.param.Param" title="pyspark.ml.param.Param">pyspark.ml.param.Param</a><a class="headerlink" href="#pyspark.ml.feature.Word2Vec.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.feature.Word2Vec.getSeed">
<code class="sig-name descname">getSeed</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; int<a class="headerlink" href="#pyspark.ml.feature.Word2Vec.getSeed" title="Permalink to this definition"></a></dt>
<dd><p>Gets the value of seed or its default value.</p>
</dd></dl>
<dl class="py method">
<dt id="pyspark.ml.feature.Word2Vec.getStepSize">
<code class="sig-name descname">getStepSize</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; float<a class="headerlink" href="#pyspark.ml.feature.Word2Vec.getStepSize" title="Permalink to this definition"></a></dt>
<dd><p>Gets the value of stepSize or its default value.</p>
</dd></dl>
<dl class="py method">
<dt id="pyspark.ml.feature.Word2Vec.getVectorSize">
<code class="sig-name descname">getVectorSize</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; int<a class="headerlink" href="#pyspark.ml.feature.Word2Vec.getVectorSize" title="Permalink to this definition"></a></dt>
<dd><p>Gets the value of vectorSize or its default value.</p>
<div class="versionadded">
<p><span class="versionmodified added">New in version 1.4.0.</span></p>
</div>
</dd></dl>
<dl class="py method">
<dt id="pyspark.ml.feature.Word2Vec.getWindowSize">
<code class="sig-name descname">getWindowSize</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; int<a class="headerlink" href="#pyspark.ml.feature.Word2Vec.getWindowSize" title="Permalink to this definition"></a></dt>
<dd><p>Gets the value of windowSize or its default value.</p>
<div class="versionadded">
<p><span class="versionmodified added">New in version 2.0.0.</span></p>
</div>
</dd></dl>
<dl class="py method">
<dt id="pyspark.ml.feature.Word2Vec.hasDefault">
<code class="sig-name descname">hasDefault</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">param</span><span class="p">:</span> <span class="n">Union<span class="p">[</span>str<span class="p">, </span><a class="reference internal" href="pyspark.ml.param.Param.html#pyspark.ml.param.Param" title="pyspark.ml.param.Param">pyspark.ml.param.Param</a><span class="p">[</span>Any<span class="p">]</span><span class="p">]</span></span></em><span class="sig-paren">)</span> &#x2192; bool<a class="headerlink" href="#pyspark.ml.feature.Word2Vec.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.feature.Word2Vec.hasParam">
<code class="sig-name descname">hasParam</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">paramName</span><span class="p">:</span> <span class="n">str</span></em><span class="sig-paren">)</span> &#x2192; bool<a class="headerlink" href="#pyspark.ml.feature.Word2Vec.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.feature.Word2Vec.isDefined">
<code class="sig-name descname">isDefined</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">param</span><span class="p">:</span> <span class="n">Union<span class="p">[</span>str<span class="p">, </span><a class="reference internal" href="pyspark.ml.param.Param.html#pyspark.ml.param.Param" title="pyspark.ml.param.Param">pyspark.ml.param.Param</a><span class="p">[</span>Any<span class="p">]</span><span class="p">]</span></span></em><span class="sig-paren">)</span> &#x2192; bool<a class="headerlink" href="#pyspark.ml.feature.Word2Vec.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.feature.Word2Vec.isSet">
<code class="sig-name descname">isSet</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">param</span><span class="p">:</span> <span class="n">Union<span class="p">[</span>str<span class="p">, </span><a class="reference internal" href="pyspark.ml.param.Param.html#pyspark.ml.param.Param" title="pyspark.ml.param.Param">pyspark.ml.param.Param</a><span class="p">[</span>Any<span class="p">]</span><span class="p">]</span></span></em><span class="sig-paren">)</span> &#x2192; bool<a class="headerlink" href="#pyspark.ml.feature.Word2Vec.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.feature.Word2Vec.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><span class="p">:</span> <span class="n">str</span></em><span class="sig-paren">)</span> &#x2192; RL<a class="headerlink" href="#pyspark.ml.feature.Word2Vec.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.feature.Word2Vec.read">
<em class="property">classmethod </em><code class="sig-name descname">read</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; pyspark.ml.util.JavaMLReader<span class="p">[</span>RL<span class="p">]</span><a class="headerlink" href="#pyspark.ml.feature.Word2Vec.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.feature.Word2Vec.save">
<code class="sig-name descname">save</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">path</span><span class="p">:</span> <span class="n">str</span></em><span class="sig-paren">)</span> &#x2192; None<a class="headerlink" href="#pyspark.ml.feature.Word2Vec.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.feature.Word2Vec.set">
<code class="sig-name descname">set</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">param</span><span class="p">:</span> <span class="n"><a class="reference internal" href="pyspark.ml.param.Param.html#pyspark.ml.param.Param" title="pyspark.ml.param.Param">pyspark.ml.param.Param</a></span></em>, <em class="sig-param"><span class="n">value</span><span class="p">:</span> <span class="n">Any</span></em><span class="sig-paren">)</span> &#x2192; None<a class="headerlink" href="#pyspark.ml.feature.Word2Vec.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.feature.Word2Vec.setInputCol">
<code class="sig-name descname">setInputCol</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">value</span><span class="p">:</span> <span class="n">str</span></em><span class="sig-paren">)</span> &#x2192; <a class="reference internal" href="#pyspark.ml.feature.Word2Vec" title="pyspark.ml.feature.Word2Vec">pyspark.ml.feature.Word2Vec</a><a class="reference internal" href="../../_modules/pyspark/ml/feature.html#Word2Vec.setInputCol"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyspark.ml.feature.Word2Vec.setInputCol" title="Permalink to this definition"></a></dt>
<dd><p>Sets the value of <a class="reference internal" href="#pyspark.ml.feature.Word2Vec.inputCol" title="pyspark.ml.feature.Word2Vec.inputCol"><code class="xref py py-attr docutils literal notranslate"><span class="pre">inputCol</span></code></a>.</p>
</dd></dl>
<dl class="py method">
<dt id="pyspark.ml.feature.Word2Vec.setMaxIter">
<code class="sig-name descname">setMaxIter</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">value</span><span class="p">:</span> <span class="n">int</span></em><span class="sig-paren">)</span> &#x2192; <a class="reference internal" href="#pyspark.ml.feature.Word2Vec" title="pyspark.ml.feature.Word2Vec">pyspark.ml.feature.Word2Vec</a><a class="reference internal" href="../../_modules/pyspark/ml/feature.html#Word2Vec.setMaxIter"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyspark.ml.feature.Word2Vec.setMaxIter" title="Permalink to this definition"></a></dt>
<dd><p>Sets the value of <a class="reference internal" href="#pyspark.ml.feature.Word2Vec.maxIter" title="pyspark.ml.feature.Word2Vec.maxIter"><code class="xref py py-attr docutils literal notranslate"><span class="pre">maxIter</span></code></a>.</p>
</dd></dl>
<dl class="py method">
<dt id="pyspark.ml.feature.Word2Vec.setMaxSentenceLength">
<code class="sig-name descname">setMaxSentenceLength</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">value</span><span class="p">:</span> <span class="n">int</span></em><span class="sig-paren">)</span> &#x2192; <a class="reference internal" href="#pyspark.ml.feature.Word2Vec" title="pyspark.ml.feature.Word2Vec">pyspark.ml.feature.Word2Vec</a><a class="reference internal" href="../../_modules/pyspark/ml/feature.html#Word2Vec.setMaxSentenceLength"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyspark.ml.feature.Word2Vec.setMaxSentenceLength" title="Permalink to this definition"></a></dt>
<dd><p>Sets the value of <a class="reference internal" href="#pyspark.ml.feature.Word2Vec.maxSentenceLength" title="pyspark.ml.feature.Word2Vec.maxSentenceLength"><code class="xref py py-attr docutils literal notranslate"><span class="pre">maxSentenceLength</span></code></a>.</p>
<div class="versionadded">
<p><span class="versionmodified added">New in version 2.0.0.</span></p>
</div>
</dd></dl>
<dl class="py method">
<dt id="pyspark.ml.feature.Word2Vec.setMinCount">
<code class="sig-name descname">setMinCount</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">value</span><span class="p">:</span> <span class="n">int</span></em><span class="sig-paren">)</span> &#x2192; <a class="reference internal" href="#pyspark.ml.feature.Word2Vec" title="pyspark.ml.feature.Word2Vec">pyspark.ml.feature.Word2Vec</a><a class="reference internal" href="../../_modules/pyspark/ml/feature.html#Word2Vec.setMinCount"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyspark.ml.feature.Word2Vec.setMinCount" title="Permalink to this definition"></a></dt>
<dd><p>Sets the value of <a class="reference internal" href="#pyspark.ml.feature.Word2Vec.minCount" title="pyspark.ml.feature.Word2Vec.minCount"><code class="xref py py-attr docutils literal notranslate"><span class="pre">minCount</span></code></a>.</p>
<div class="versionadded">
<p><span class="versionmodified added">New in version 1.4.0.</span></p>
</div>
</dd></dl>
<dl class="py method">
<dt id="pyspark.ml.feature.Word2Vec.setNumPartitions">
<code class="sig-name descname">setNumPartitions</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">value</span><span class="p">:</span> <span class="n">int</span></em><span class="sig-paren">)</span> &#x2192; <a class="reference internal" href="#pyspark.ml.feature.Word2Vec" title="pyspark.ml.feature.Word2Vec">pyspark.ml.feature.Word2Vec</a><a class="reference internal" href="../../_modules/pyspark/ml/feature.html#Word2Vec.setNumPartitions"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyspark.ml.feature.Word2Vec.setNumPartitions" title="Permalink to this definition"></a></dt>
<dd><p>Sets the value of <a class="reference internal" href="#pyspark.ml.feature.Word2Vec.numPartitions" title="pyspark.ml.feature.Word2Vec.numPartitions"><code class="xref py py-attr docutils literal notranslate"><span class="pre">numPartitions</span></code></a>.</p>
<div class="versionadded">
<p><span class="versionmodified added">New in version 1.4.0.</span></p>
</div>
</dd></dl>
<dl class="py method">
<dt id="pyspark.ml.feature.Word2Vec.setOutputCol">
<code class="sig-name descname">setOutputCol</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">value</span><span class="p">:</span> <span class="n">str</span></em><span class="sig-paren">)</span> &#x2192; <a class="reference internal" href="#pyspark.ml.feature.Word2Vec" title="pyspark.ml.feature.Word2Vec">pyspark.ml.feature.Word2Vec</a><a class="reference internal" href="../../_modules/pyspark/ml/feature.html#Word2Vec.setOutputCol"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyspark.ml.feature.Word2Vec.setOutputCol" title="Permalink to this definition"></a></dt>
<dd><p>Sets the value of <a class="reference internal" href="#pyspark.ml.feature.Word2Vec.outputCol" title="pyspark.ml.feature.Word2Vec.outputCol"><code class="xref py py-attr docutils literal notranslate"><span class="pre">outputCol</span></code></a>.</p>
</dd></dl>
<dl class="py method">
<dt id="pyspark.ml.feature.Word2Vec.setParams">
<code class="sig-name descname">setParams</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">\*</em>, <em class="sig-param">minCount=5</em>, <em class="sig-param">numPartitions=1</em>, <em class="sig-param">stepSize=0.025</em>, <em class="sig-param">maxIter=1</em>, <em class="sig-param">seed=None</em>, <em class="sig-param">inputCol=None</em>, <em class="sig-param">outputCol=None</em>, <em class="sig-param">windowSize=5</em>, <em class="sig-param">maxSentenceLength=1000</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/pyspark/ml/feature.html#Word2Vec.setParams"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyspark.ml.feature.Word2Vec.setParams" title="Permalink to this definition"></a></dt>
<dd><p>Sets params for this Word2Vec.</p>
<div class="versionadded">
<p><span class="versionmodified added">New in version 1.4.0.</span></p>
</div>
</dd></dl>
<dl class="py method">
<dt id="pyspark.ml.feature.Word2Vec.setSeed">
<code class="sig-name descname">setSeed</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">value</span><span class="p">:</span> <span class="n">int</span></em><span class="sig-paren">)</span> &#x2192; <a class="reference internal" href="#pyspark.ml.feature.Word2Vec" title="pyspark.ml.feature.Word2Vec">pyspark.ml.feature.Word2Vec</a><a class="reference internal" href="../../_modules/pyspark/ml/feature.html#Word2Vec.setSeed"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyspark.ml.feature.Word2Vec.setSeed" title="Permalink to this definition"></a></dt>
<dd><p>Sets the value of <a class="reference internal" href="#pyspark.ml.feature.Word2Vec.seed" title="pyspark.ml.feature.Word2Vec.seed"><code class="xref py py-attr docutils literal notranslate"><span class="pre">seed</span></code></a>.</p>
</dd></dl>
<dl class="py method">
<dt id="pyspark.ml.feature.Word2Vec.setStepSize">
<code class="sig-name descname">setStepSize</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">value</span><span class="p">:</span> <span class="n">float</span></em><span class="sig-paren">)</span> &#x2192; <a class="reference internal" href="#pyspark.ml.feature.Word2Vec" title="pyspark.ml.feature.Word2Vec">pyspark.ml.feature.Word2Vec</a><a class="reference internal" href="../../_modules/pyspark/ml/feature.html#Word2Vec.setStepSize"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyspark.ml.feature.Word2Vec.setStepSize" title="Permalink to this definition"></a></dt>
<dd><p>Sets the value of <a class="reference internal" href="#pyspark.ml.feature.Word2Vec.stepSize" title="pyspark.ml.feature.Word2Vec.stepSize"><code class="xref py py-attr docutils literal notranslate"><span class="pre">stepSize</span></code></a>.</p>
<div class="versionadded">
<p><span class="versionmodified added">New in version 1.4.0.</span></p>
</div>
</dd></dl>
<dl class="py method">
<dt id="pyspark.ml.feature.Word2Vec.setVectorSize">
<code class="sig-name descname">setVectorSize</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">value</span><span class="p">:</span> <span class="n">int</span></em><span class="sig-paren">)</span> &#x2192; <a class="reference internal" href="#pyspark.ml.feature.Word2Vec" title="pyspark.ml.feature.Word2Vec">pyspark.ml.feature.Word2Vec</a><a class="reference internal" href="../../_modules/pyspark/ml/feature.html#Word2Vec.setVectorSize"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyspark.ml.feature.Word2Vec.setVectorSize" title="Permalink to this definition"></a></dt>
<dd><p>Sets the value of <a class="reference internal" href="#pyspark.ml.feature.Word2Vec.vectorSize" title="pyspark.ml.feature.Word2Vec.vectorSize"><code class="xref py py-attr docutils literal notranslate"><span class="pre">vectorSize</span></code></a>.</p>
<div class="versionadded">
<p><span class="versionmodified added">New in version 1.4.0.</span></p>
</div>
</dd></dl>
<dl class="py method">
<dt id="pyspark.ml.feature.Word2Vec.setWindowSize">
<code class="sig-name descname">setWindowSize</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">value</span><span class="p">:</span> <span class="n">int</span></em><span class="sig-paren">)</span> &#x2192; <a class="reference internal" href="#pyspark.ml.feature.Word2Vec" title="pyspark.ml.feature.Word2Vec">pyspark.ml.feature.Word2Vec</a><a class="reference internal" href="../../_modules/pyspark/ml/feature.html#Word2Vec.setWindowSize"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyspark.ml.feature.Word2Vec.setWindowSize" title="Permalink to this definition"></a></dt>
<dd><p>Sets the value of <a class="reference internal" href="#pyspark.ml.feature.Word2Vec.windowSize" title="pyspark.ml.feature.Word2Vec.windowSize"><code class="xref py py-attr docutils literal notranslate"><span class="pre">windowSize</span></code></a>.</p>
<div class="versionadded">
<p><span class="versionmodified added">New in version 2.0.0.</span></p>
</div>
</dd></dl>
<dl class="py method">
<dt id="pyspark.ml.feature.Word2Vec.write">
<code class="sig-name descname">write</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; pyspark.ml.util.JavaMLWriter<a class="headerlink" href="#pyspark.ml.feature.Word2Vec.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.feature.Word2Vec.inputCol">
<code class="sig-name descname">inputCol</code><em class="property"> = Param(parent='undefined', name='inputCol', doc='input column name.')</em><a class="headerlink" href="#pyspark.ml.feature.Word2Vec.inputCol" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt id="pyspark.ml.feature.Word2Vec.maxIter">
<code class="sig-name descname">maxIter</code><em class="property"> = Param(parent='undefined', name='maxIter', doc='max number of iterations (&gt;= 0).')</em><a class="headerlink" href="#pyspark.ml.feature.Word2Vec.maxIter" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt id="pyspark.ml.feature.Word2Vec.maxSentenceLength">
<code class="sig-name descname">maxSentenceLength</code><em class="property"> = Param(parent='undefined', name='maxSentenceLength', doc='Maximum length (in words) of each sentence in the input data. Any sentence longer than this threshold will be divided into chunks up to the size.')</em><a class="headerlink" href="#pyspark.ml.feature.Word2Vec.maxSentenceLength" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt id="pyspark.ml.feature.Word2Vec.minCount">
<code class="sig-name descname">minCount</code><em class="property"> = Param(parent='undefined', name='minCount', doc=&quot;the minimum number of times a token must appear to be included in the word2vec model's vocabulary&quot;)</em><a class="headerlink" href="#pyspark.ml.feature.Word2Vec.minCount" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt id="pyspark.ml.feature.Word2Vec.numPartitions">
<code class="sig-name descname">numPartitions</code><em class="property"> = Param(parent='undefined', name='numPartitions', doc='number of partitions for sentences of words')</em><a class="headerlink" href="#pyspark.ml.feature.Word2Vec.numPartitions" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt id="pyspark.ml.feature.Word2Vec.outputCol">
<code class="sig-name descname">outputCol</code><em class="property"> = Param(parent='undefined', name='outputCol', doc='output column name.')</em><a class="headerlink" href="#pyspark.ml.feature.Word2Vec.outputCol" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt id="pyspark.ml.feature.Word2Vec.params">
<code class="sig-name descname">params</code><a class="headerlink" href="#pyspark.ml.feature.Word2Vec.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.feature.Word2Vec.seed">
<code class="sig-name descname">seed</code><em class="property"> = Param(parent='undefined', name='seed', doc='random seed.')</em><a class="headerlink" href="#pyspark.ml.feature.Word2Vec.seed" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt id="pyspark.ml.feature.Word2Vec.stepSize">
<code class="sig-name descname">stepSize</code><em class="property"> = Param(parent='undefined', name='stepSize', doc='Step size to be used for each iteration of optimization (&gt;= 0).')</em><a class="headerlink" href="#pyspark.ml.feature.Word2Vec.stepSize" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt id="pyspark.ml.feature.Word2Vec.vectorSize">
<code class="sig-name descname">vectorSize</code><em class="property"> = Param(parent='undefined', name='vectorSize', doc='the dimension of codes after transforming from words')</em><a class="headerlink" href="#pyspark.ml.feature.Word2Vec.vectorSize" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt id="pyspark.ml.feature.Word2Vec.windowSize">
<code class="sig-name descname">windowSize</code><em class="property"> = Param(parent='undefined', name='windowSize', doc='the window size (context words from [-window, window]). Default value is 5')</em><a class="headerlink" href="#pyspark.ml.feature.Word2Vec.windowSize" 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.VectorSlicer.html" title="previous page">VectorSlicer</a>
<a class='right-next' id="next-link" href="pyspark.ml.feature.Word2VecModel.html" title="next page">Word2VecModel</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>
&copy; Copyright .<br/>
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 3.0.4.<br/>
</p>
</div>
</footer>
</body>
</html>