Skip to content
Snippets Groups Projects
Commit 5d188a69 authored by Bryan Cutler's avatar Bryan Cutler Committed by Nick Pentreath
Browse files

[DOC][MINOR] Fixed minor errors in feature.ml user guide doc

## What changes were proposed in this pull request?
Fixed some minor errors found when reviewing feature.ml user guide

## How was this patch tested?
built docs locally

Author: Bryan Cutler <cutlerb@gmail.com>

Closes #12940 from BryanCutler/feature.ml-doc_fixes-DOCS-MINOR.
parent b0cafdb6
No related branches found
No related tags found
No related merge requests found
......@@ -127,7 +127,7 @@ Assume that we have the following DataFrame with columns `id` and `texts`:
1 | Array("a", "b", "b", "c", "a")
~~~~
each row in`texts` is a document of type Array[String].
each row in `texts` is a document of type Array[String].
Invoking fit of `CountVectorizer` produces a `CountVectorizerModel` with vocabulary (a, b, c),
then the output column "vector" after transformation contains:
......@@ -185,7 +185,7 @@ for more details on the API.
<div data-lang="scala" markdown="1">
Refer to the [Tokenizer Scala docs](api/scala/index.html#org.apache.spark.ml.feature.Tokenizer)
and the [RegexTokenizer Scala docs](api/scala/index.html#org.apache.spark.ml.feature.Tokenizer)
and the [RegexTokenizer Scala docs](api/scala/index.html#org.apache.spark.ml.feature.RegexTokenizer)
for more details on the API.
{% include_example scala/org/apache/spark/examples/ml/TokenizerExample.scala %}
......@@ -775,7 +775,7 @@ The rescaled value for a feature E is calculated as,
\end{equation}`
For the case `E_{max} == E_{min}`, `Rescaled(e_i) = 0.5 * (max + min)`
Note that since zero values will probably be transformed to non-zero values, output of the transformer will be DenseVector even for sparse input.
Note that since zero values will probably be transformed to non-zero values, output of the transformer will be `DenseVector` even for sparse input.
The following example demonstrates how to load a dataset in libsvm format and then rescale each feature to [0, 1].
......@@ -801,6 +801,7 @@ for more details on the API.
<div data-lang="python" markdown="1">
Refer to the [MinMaxScaler Python docs](api/python/pyspark.ml.html#pyspark.ml.feature.MinMaxScaler)
and the [MinMaxScalerModel Python docs](api/python/pyspark.ml.html#pyspark.ml.feature.MinMaxScalerModel)
for more details on the API.
{% include_example python/ml/min_max_scaler_example.py %}
......@@ -841,6 +842,7 @@ for more details on the API.
<div data-lang="python" markdown="1">
Refer to the [MaxAbsScaler Python docs](api/python/pyspark.ml.html#pyspark.ml.feature.MaxAbsScaler)
and the [MaxAbsScalerModel Python docs](api/python/pyspark.ml.html#pyspark.ml.feature.MaxAbsScalerModel)
for more details on the API.
{% include_example python/ml/max_abs_scaler_example.py %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment