You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by ji...@apache.org on 2018/12/11 04:02:26 UTC
[flink] branch master updated: [FLINK-11123][docs] fix the import
of the class is missing in ml quick start document.
This is an automated email from the ASF dual-hosted git repository.
jincheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git
The following commit(s) were added to refs/heads/master by this push:
new 156c09c [FLINK-11123][docs] fix the import of the class is missing in ml quick start document.
156c09c is described below
commit 156c09ced9a61d20e2e5d4ce5cfedab8ac4d4ee4
Author: sunjincheng121 <su...@gmail.com>
AuthorDate: Tue Dec 11 08:37:27 2018 +0800
[FLINK-11123][docs] fix the import of the class is missing in ml quick start document.
This closes #7269
---
docs/dev/libs/ml/quickstart.md | 2 ++
1 file changed, 2 insertions(+)
diff --git a/docs/dev/libs/ml/quickstart.md b/docs/dev/libs/ml/quickstart.md
index e056b28..2e9a7b9 100644
--- a/docs/dev/libs/ml/quickstart.md
+++ b/docs/dev/libs/ml/quickstart.md
@@ -153,6 +153,8 @@ A conversion can be done using a simple normalizer mapping function:
{% highlight scala %}
+import org.apache.flink.ml.math.Vector
+
def normalizer : LabeledVector => LabeledVector = {
lv => LabeledVector(if (lv.label > 0.0) 1.0 else -1.0, lv.vector)
}