Github user mengxr commented on a diff in the pull request:

    https://github.com/apache/spark/pull/5626#discussion_r28987585
  
    --- Diff: 
mllib/src/main/scala/org/apache/spark/ml/classification/GBTClassifier.scala ---
    @@ -0,0 +1,225 @@
    +/*
    + * 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.spark.ml.classification
    +
    +import com.github.fommil.netlib.BLAS.{getInstance => blas}
    +
    +import org.apache.spark.Logging
    +import org.apache.spark.annotation.AlphaComponent
    +import org.apache.spark.ml.impl.estimator.{PredictionModel, Predictor}
    +import org.apache.spark.ml.impl.tree._
    +import org.apache.spark.ml.param.{Param, Params, ParamMap}
    +import org.apache.spark.ml.regression.DecisionTreeRegressionModel
    +import org.apache.spark.ml.tree.{DecisionTreeModel, TreeEnsembleModel}
    +import org.apache.spark.ml.util.MetadataUtils
    +import org.apache.spark.mllib.linalg.Vector
    +import org.apache.spark.mllib.regression.LabeledPoint
    +import org.apache.spark.mllib.tree.{GradientBoostedTrees => OldGBT}
    +import org.apache.spark.mllib.tree.configuration.{Algo => OldAlgo}
    +import org.apache.spark.mllib.tree.loss.{Loss => OldLoss, LogLoss => 
OldLogLoss}
    +import org.apache.spark.mllib.tree.model.{GradientBoostedTreesModel => 
OldGBTModel}
    +import org.apache.spark.rdd.RDD
    +import org.apache.spark.sql.DataFrame
    +
    +
    +/**
    + * :: AlphaComponent ::
    + *
    + * [[http://en.wikipedia.org/wiki/Gradient_boosting Gradient-Boosted Trees 
(GBTs)]]
    + * learning algorithm for classification.
    + * It supports binary labels, as well as both continuous and categorical 
features.
    + * Note: Multiclass labels are not currently supported.
    + */
    +@AlphaComponent
    +final class GBTClassifier
    +  extends Predictor[Vector, GBTClassifier, GBTClassificationModel]
    +  with GBTParams with TreeClassifierParams with Logging {
    +
    +  // Override parameter setters from parent trait for Java API 
compatibility.
    +
    +  // Parameters from TreeClassifierParams:
    +
    +  override def setMaxDepth(value: Int): this.type = 
super.setMaxDepth(value)
    +
    +  override def setMaxBins(value: Int): this.type = super.setMaxBins(value)
    +
    +  override def setMinInstancesPerNode(value: Int): this.type =
    +    super.setMinInstancesPerNode(value)
    +
    +  override def setMinInfoGain(value: Double): this.type = 
super.setMinInfoGain(value)
    +
    +  override def setMaxMemoryInMB(value: Int): this.type = 
super.setMaxMemoryInMB(value)
    +
    +  override def setCacheNodeIds(value: Boolean): this.type = 
super.setCacheNodeIds(value)
    +
    +  override def setCheckpointInterval(value: Int): this.type = 
super.setCheckpointInterval(value)
    --- End diff --
    
    Should it go to shared params? I see the problem with the doc. If we want 
to put something special, we can put it in the JavaDoc. No strong preference 
about this. But it makes me think that whether we should mark shared params 
final.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to