Fanoid commented on code in PR #210:
URL: https://github.com/apache/flink-ml/pull/210#discussion_r1113975599


##########
flink-ml-lib/src/main/java/org/apache/flink/ml/common/gbt/loss/LogLoss.java:
##########
@@ -0,0 +1,51 @@
+/*
+ * 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.gbt.loss;
+
+import org.apache.commons.math3.analysis.function.Sigmoid;
+
+/**
+ * The loss function for binary log loss.
+ *
+ * <p>The binary log loss defined as -y * pred + log(1 + exp(pred)) where y is 
a label in {0, 1} and
+ * pred is the predicted logit for the sample point.
+ */
+public class LogLoss implements Loss {

Review Comment:
   I didn't put `LogLoss` to the package `org.apache.flink.ml.common.lossfunc`, 
because all current loss functions in this package have assumed the data type 
as `LabeledPointWithWeight`.  But loss functions in GBT algorithms cannot use 
`LabeledPointWithWeight`.
   
   Is it OK to mix loss functions with different data types?



-- 
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