lindong28 commented on a change in pull request #28:
URL: https://github.com/apache/flink-ml/pull/28#discussion_r754820934



##########
File path: 
flink-ml-lib/src/main/java/org/apache/flink/ml/common/param/HasEpsilon.java
##########
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.ml.common.param;
+
+import org.apache.flink.ml.param.DoubleParam;
+import org.apache.flink.ml.param.Param;
+import org.apache.flink.ml.param.ParamValidators;
+import org.apache.flink.ml.param.WithParams;
+
+/** Interface for the shared epsilon param. */
+public interface HasEpsilon<T> extends WithParams<T> {
+
+    Param<Double> EPSILON =

Review comment:
       Spark and Scikit-learn [1] uses HasTol for this purpose. Logistic 
Regression wiki [2] mentions `tolerance` instead of `epsilon`. I searched on 
Google for words that are commonly used for determining the "termination 
criteria". It looks like `tolerance` is much more popular than epsilon in the 
machine learning domain (e.g. [3]).
   
   How about we use the same `HasTol` as Spark?
   
   BTW, @yunfengzhou-hub asked a similar question in a previous comment. That 
comment was closed without reply. Can we wait for the confirmation from 
reviewers before resolving such comments?
   
   [1] 
https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.SGDClassifier.html
   [2] https://en.wikipedia.org/wiki/Logistic_regression
   [3] 
https://support.minitab.com/en-us/minitab/18/help-and-how-to/modeling-statistics/regression/how-to/nonlinear-regression/interpret-the-results/all-statistics-and-graphs/methods-and-starting-values/

##########
File path: 
flink-ml-lib/src/main/java/org/apache/flink/ml/common/param/HasFeaturesCol.java
##########
@@ -27,7 +27,10 @@
 public interface HasFeaturesCol<T> extends WithParams<T> {
     Param<String> FEATURES_COL =
             new StringParam(
-                    "featuresCol", "Features column name.", "features", 
ParamValidators.notNull());
+                    "featuresCol",
+                    "Name of the features column name.",

Review comment:
       According to Google results (google `name of column or column name`), it 
seems that the original `...column name` is more widely used than `name of 
column...`.
   
   So it seems simpler to use the original `Features column name`?
   
   And the 2nd `name` seems to be redundant here.
   

##########
File path: 
flink-ml-lib/src/main/java/org/apache/flink/ml/common/param/HasBatchSize.java
##########
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.ml.common.param;
+
+import org.apache.flink.ml.param.IntParam;
+import org.apache.flink.ml.param.Param;
+import org.apache.flink.ml.param.ParamValidators;
+import org.apache.flink.ml.param.WithParams;
+
+/** Interface for the shared batchSize param. */
+public interface HasBatchSize<T> extends WithParams<T> {
+
+    Param<Integer> BATCH_SIZE =
+            new IntParam(
+                    "batchSize", "Batch size of training algorithms.", 100, 
ParamValidators.gt(0));

Review comment:
       How about setting the default value here to be 32?
   
   As explained in [1], batch size is typically power of 2. And according to 
[2], batchSize=32 could be a good starting point.
   
   
   [1] 
https://datascience.stackexchange.com/questions/20179/what-is-the-advantage-of-keeping-batch-size-a-power-of-2




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to