You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/04/08 10:10:26 UTC

[GitHub] [flink-ml] zhipeng93 commented on a diff in pull request #82: [FLINK-27072] Add Transformer of Bucketizer

zhipeng93 commented on code in PR #82:
URL: https://github.com/apache/flink-ml/pull/82#discussion_r845960833


##########
flink-ml-core/src/main/java/org/apache/flink/ml/param/ArrayArrayParam.java:
##########
@@ -0,0 +1,42 @@
+/*
+ * 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.param;
+
+import org.apache.flink.ml.util.ReadWriteUtils;
+
+import java.io.IOException;
+
+/** Class for the arrayOfArray-type parameters. */
+public class ArrayArrayParam<T> extends Param<T[][]> {

Review Comment:
   We probably follow the user behavior here. 
   
   In Bucketizer, users specify a split array for each input col. Moreover, the number of split points in different columns could be different. If we use 1D array to represent 2D array, we would also need to specify the dimension for each 1D array. This seems a bit complex to me.
   
   Also, using 2D array is consistent with exisiting libraries [1].
   
   [1] https://github.com/apache/spark/blob/1018f8b545a74f4fcaf123b5f15d52ac2afa2d3c/mllib/src/main/scala/org/apache/spark/ml/param/params.scala#L567



-- 
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-unsubscribe@flink.apache.org

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