[jvm-packages] Add some documentation to xgboost4j-spark plus minor style edits (#2823)

* add scala docs to several methods

* indentation

* license formatting

* clarify distributed boosters

* address some review comments

* reduce doc lengths

* change method name, clarify  doc

* reset make config

* delete most comments

* more review feedback
This commit is contained in:
Seth Hendrickson
2017-11-02 13:16:02 -07:00
committed by Nan Zhu
parent 46f2b820f1
commit a8f670d247
2 changed files with 75 additions and 60 deletions

View File

@@ -16,21 +16,23 @@
package ml.dmlc.xgboost4j
/** Labeled training data point. */
/**
* Labeled training data point.
*
* @param label Label of this point.
* @param indices Feature indices of this point or `null` if the data is dense.
* @param values Feature values of this point.
* @param weight Weight of this point.
* @param group Group of this point (used for ranking) or -1.
* @param baseMargin Initial prediction on this point or `Float.NaN`
*/
case class LabeledPoint(
/** Label of this point. */
label: Float,
/** Feature indices of this point or `null` if the data is dense. */
indices: Array[Int],
/** Feature values of this point. */
values: Array[Float],
/** Weight of this point. */
weight: Float = 1.0f,
/** Group of this point (used for ranking) or -1. */
weight: Float = 1f,
group: Int = -1,
/** Initial prediction on this point or `Float.NaN`. */
baseMargin: Float = Float.NaN
) extends Serializable {
baseMargin: Float = Float.NaN) extends Serializable {
require(indices == null || indices.length == values.length,
"indices and values must have the same number of elements")