Skip to content

Commit 58dbc38

Browse files
committed
[FLINK-28237][python][ml] Improve flink ml python examples in doc
This closes apache#116.
1 parent 0ae5c20 commit 58dbc38

File tree

5 files changed

+5
-0
lines changed

5 files changed

+5
-0
lines changed

docs/content/docs/operators/classification/knn.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ output.execute().print();
121121
{{< tab "Python">}}
122122
```python
123123
from pyflink.common import Types
124+
from pyflink.datastream import StreamExecutionEnvironment
124125
from pyflink.table import StreamTableEnvironment
125126

126127
from pyflink.ml.core.linalg import Vectors, DenseVectorTypeInfo

docs/content/docs/operators/classification/logisticregression.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ output.execute().print();
112112
{{< tab "Python">}}
113113
```python
114114
from pyflink.common import Types
115+
from pyflink.datastream import StreamExecutionEnvironment
115116
from pyflink.table import StreamTableEnvironment
116117

117118
from pyflink.ml.core.linalg import Vectors, DenseVectorTypeInfo

docs/content/docs/operators/classification/naivebayes.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ outputTable.execute().print();
104104
{{< tab "Python">}}
105105
```python
106106
from pyflink.common import Types
107+
from pyflink.datastream import StreamExecutionEnvironment
107108
from pyflink.table import StreamTableEnvironment
108109

109110
from pyflink.ml.core.linalg import Vectors, DenseVectorTypeInfo

docs/content/docs/operators/clustering/kmeans.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ for (CloseableIterator<Row> it = output.execute().collect(); it.hasNext(); ) {
104104
{{< tab "Python">}}
105105
```python
106106
from pyflink.common import Types
107+
from pyflink.datastream import StreamExecutionEnvironment
107108
from pyflink.table import StreamTableEnvironment
108109

109110
from pyflink.ml.core.linalg import Vectors, DenseVectorTypeInfo

docs/content/docs/operators/feature/onehotencoder.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ outputTable.execute().print();
8282
{{< tab "Python">}}
8383
```python
8484
from pyflink.common import Types, Row
85+
from pyflink.datastream import StreamExecutionEnvironment
8586
from pyflink.table import StreamTableEnvironment, Table, DataTypes
8687

8788
from pyflink.ml.lib.feature.onehotencoder import OneHotEncoder, OneHotEncoderModel

0 commit comments

Comments
 (0)