Skip to content

Commit 9fcd831

Browse files
sparadisomengxr
authored andcommitted
[MINOR] [MLLIB] [ML] [DOC] fixed typo: label for negative result should be 0.0 (original: 1.0)
Small typo in the example for `LabelledPoint` in the MLLib docs. Author: Sean Paradiso <seanparadiso@gmail.com> Closes apache#8680 from sparadiso/docs_mllib_smalltypo. (cherry picked from commit 1dc7548) Signed-off-by: Xiangrui Meng <meng@databricks.com>
1 parent 29836e2 commit 9fcd831

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/mllib-data-types.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ import org.apache.spark.mllib.regression.LabeledPoint;
144144
LabeledPoint pos = new LabeledPoint(1.0, Vectors.dense(1.0, 0.0, 3.0));
145145

146146
// Create a labeled point with a negative label and a sparse feature vector.
147-
LabeledPoint neg = new LabeledPoint(1.0, Vectors.sparse(3, new int[] {0, 2}, new double[] {1.0, 3.0}));
147+
LabeledPoint neg = new LabeledPoint(0.0, Vectors.sparse(3, new int[] {0, 2}, new double[] {1.0, 3.0}));
148148
{% endhighlight %}
149149
</div>
150150

0 commit comments

Comments
 (0)