You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2019/08/13 09:00:54 UTC

[GitHub] [ignite] avplatonov commented on a change in pull request #6735: IGNITE-9283

avplatonov commented on a change in pull request #6735: IGNITE-9283
URL: https://github.com/apache/ignite/pull/6735#discussion_r313280548
 
 

 ##########
 File path: modules/ml/src/main/java/org/apache/ignite/ml/preprocessing/dct/DiscreteCosinePreprocessor.java
 ##########
 @@ -0,0 +1,93 @@
+/*
+ * 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.ignite.ml.preprocessing.dct;
+
+import org.apache.ignite.ml.math.primitives.vector.VectorUtils;
+import org.apache.ignite.ml.preprocessing.Preprocessor;
+import org.apache.ignite.ml.structures.LabeledVector;
+
+/**
+ * Preprocessing function that applies discrete cosine transformation.
+ *
+ * @param <K> Type of a key in {@code upstream} data.
+ * @param <V> Type of a value in {@code upstream} data.
+ */
+public class DiscreteCosinePreprocessor<K, V> implements Preprocessor<K, V> {
+    /** */
+    private static final long serialVersionUID = 6877811577892627461L;
+
+    /** Base preprocessor */
+    private final Preprocessor<K, V> basePreprocessor;
+
+    /** DCT type, default is 2 */
+    private final int type;
 
 Review comment:
   Why did you use int as old-c-style-enum? I think we should replace int to enum.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services