Skip to content
Permalink
Browse files
Update javadoc and applied formatter
  • Loading branch information
myui committed Nov 25, 2019
1 parent afa8b13 commit 1a5d93531b28d303dfd4602b896815f9387da956
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 deletions.
@@ -19,15 +19,6 @@
package hivemall.smile.classification;

import hivemall.UDTFWithOptions;
import matrix4j.matrix.Matrix;
import matrix4j.matrix.MatrixUtils;
import matrix4j.matrix.builders.CSRMatrixBuilder;
import matrix4j.matrix.builders.MatrixBuilder;
import matrix4j.matrix.builders.RowMajorDenseMatrixBuilder;
import matrix4j.matrix.ints.DoKIntMatrix;
import matrix4j.matrix.ints.IntMatrix;
import matrix4j.vector.Vector;
import matrix4j.vector.VectorProcedure;
import hivemall.smile.classification.DecisionTree.SplitRule;
import hivemall.smile.utils.SmileExtUtils;
import hivemall.smile.utils.SmileTaskExecutor;
@@ -41,6 +32,15 @@
import hivemall.utils.lang.RandomUtils;
import hivemall.utils.random.PRNG;
import hivemall.utils.random.RandomNumberGeneratorFactory;
import matrix4j.matrix.Matrix;
import matrix4j.matrix.MatrixUtils;
import matrix4j.matrix.builders.CSRMatrixBuilder;
import matrix4j.matrix.builders.MatrixBuilder;
import matrix4j.matrix.builders.RowMajorDenseMatrixBuilder;
import matrix4j.matrix.ints.DoKIntMatrix;
import matrix4j.matrix.ints.IntMatrix;
import matrix4j.vector.Vector;
import matrix4j.vector.VectorProcedure;

import java.util.ArrayList;
import java.util.Arrays;
@@ -146,7 +146,7 @@ protected Options getOptions() {
opts.addOption("attrs", "attribute_types", true, "Comma separated attribute types "
+ "(Q for quantitative variable and C for categorical variable. e.g., [Q,C,Q,C])");
opts.addOption("nominal_attr_indicies", "categorical_attr_indicies", true,
"Comma seperated indicies of categorical attributes, e.g., [3,5,6]");
"Comma seperated indicies of categorical attributes, e.g., [3,5,6]. Attribute index start with zero.");
opts.addOption("rule", "split_rule", true,
"Split algorithm [default: GINI, ENTROPY, CLASSIFICATION_ERROR]");
opts.addOption("stratified", "stratified_sampling", false,
@@ -19,10 +19,6 @@
package hivemall.smile.utils;

import hivemall.annotations.VisibleForTesting;
import matrix4j.matrix.ColumnMajorMatrix;
import matrix4j.matrix.Matrix;
import matrix4j.matrix.MatrixUtils;
import matrix4j.vector.VectorProcedure;
import hivemall.smile.classification.DecisionTree.SplitRule;
import hivemall.utils.collections.arrays.SparseIntArray;
import hivemall.utils.collections.lists.DoubleArrayList;
@@ -32,6 +28,10 @@
import hivemall.utils.math.MathUtils;
import hivemall.utils.random.PRNG;
import hivemall.utils.random.RandomNumberGeneratorFactory;
import matrix4j.matrix.ColumnMajorMatrix;
import matrix4j.matrix.Matrix;
import matrix4j.matrix.MatrixUtils;
import matrix4j.vector.VectorProcedure;
import smile.data.NominalAttribute;
import smile.data.NumericAttribute;
import smile.sort.QuickSort;
@@ -53,7 +53,8 @@ public final class SmileExtUtils {
private SmileExtUtils() {}

/**
* Q for {@link NumericAttribute}, C for {@link NominalAttribute}.
* @param opt command separated list of Q and C. Q for {@link NumericAttribute}, C for
* {@link NominalAttribute}.
*/
@Nonnull
public static RoaringBitmap resolveAttributes(@Nullable final String opt)
@@ -78,7 +79,7 @@ public static RoaringBitmap resolveAttributes(@Nullable final String opt)
}

/**
* Q for {@link NumericAttribute}, C for {@link NominalAttribute}.
* @param opt comma separated list of zero-start indexes
*/
@Nonnull
public static RoaringBitmap parseNominalAttributeIndicies(@Nullable final String opt)
@@ -53,9 +53,8 @@ private XGBoostUtils() {}
public static String getVersion() throws HiveException {
Properties props = new Properties();
try (InputStream versionResourceFile =
Thread.currentThread()
.getContextClassLoader()
.getResourceAsStream("xgboost4j-version.properties")) {
Thread.currentThread().getContextClassLoader().getResourceAsStream(
"xgboost4j-version.properties")) {
props.load(versionResourceFile);
} catch (IOException e) {
throw new HiveException("Failed to load xgboost4j-version.properties", e);

0 comments on commit 1a5d935

Please sign in to comment.