vacaly commented on code in PR #192:
URL: https://github.com/apache/flink-ml/pull/192#discussion_r1106617016


##########
flink-ml-lib/src/main/java/org/apache/flink/ml/recommendation/swing/SwingParams.java:
##########
@@ -0,0 +1,181 @@
+/*
+ * 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.recommendation.swing;
+
+import org.apache.flink.ml.common.param.HasOutputCol;
+import org.apache.flink.ml.param.DoubleParam;
+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.StringParam;
+import org.apache.flink.ml.param.WithParams;
+
+/**
+ * Params for {@link Swing}.
+ *
+ * @param <T> The class type of this instance.
+ */
+public interface SwingParams<T> extends WithParams<T>, HasOutputCol<T> {
+    Param<String> USER_COL =
+            new StringParam(
+                    "userCol",
+                    "User column name. The type of user column must be Long.",
+                    "user",
+                    ParamValidators.notNull());
+
+    Param<String> ITEM_COL =
+            new StringParam(
+                    "itemCol",
+                    "Item column name. The type of item column must be Long.",
+                    "item",
+                    ParamValidators.notNull());
+
+    Param<Integer> MAX_USER_NUM_PER_ITEM =
+            new IntParam(
+                    "maxUserNumPerItem",
+                    "The max number of user(purchasers) for each item. If the 
number of user "
+                            + "is larger than this value, then only 
maxUserNumPerItem users will "
+                            + "be sampled and considered in the computation of 
similarity between two items.",
+                    1000,
+                    ParamValidators.gt(0));
+
+    Param<Integer> K =
+            new IntParam(
+                    "k",
+                    "The max number of similar items to output for each item. 
If an item has "
+                            + "more than k recommendations, the first k 
similar items will be kept",
+                    100,
+                    ParamValidators.gt(0));
+
+    Param<Integer> MIN_USER_BEHAVIOR =
+            new IntParam(
+                    "minUserBehavior",
+                    "The min number of items for a user purchases. If the 
items purchased by a user is smaller than "

Review Comment:
   Replaced by
   `This can affect the speed of the computation. Set maxUserBehavior smaller 
in case the swing recommendation progresses very slowly.`



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to