This is an automated email from the ASF dual-hosted git repository. myui pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-hivemall.git
The following commit(s) were added to refs/heads/master by this push: new 1a5d935 Update javadoc and applied formatter 1a5d935 is described below commit 1a5d93531b28d303dfd4602b896815f9387da956 Author: Makoto Yui <m...@apache.org> AuthorDate: Tue Nov 26 02:05:56 2019 +0900 Update javadoc and applied formatter --- .../classification/RandomForestClassifierUDTF.java | 20 ++++++++++---------- .../java/hivemall/smile/utils/SmileExtUtils.java | 13 +++++++------ .../java/hivemall/xgboost/utils/XGBoostUtils.java | 5 ++--- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/core/src/main/java/hivemall/smile/classification/RandomForestClassifierUDTF.java b/core/src/main/java/hivemall/smile/classification/RandomForestClassifierUDTF.java index 4fe08df..73bf691 100644 --- a/core/src/main/java/hivemall/smile/classification/RandomForestClassifierUDTF.java +++ b/core/src/main/java/hivemall/smile/classification/RandomForestClassifierUDTF.java @@ -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.Primitives; 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 @@ public final class RandomForestClassifierUDTF extends UDTFWithOptions { 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, diff --git a/core/src/main/java/hivemall/smile/utils/SmileExtUtils.java b/core/src/main/java/hivemall/smile/utils/SmileExtUtils.java index b41f288..dc60a00 100644 --- a/core/src/main/java/hivemall/smile/utils/SmileExtUtils.java +++ b/core/src/main/java/hivemall/smile/utils/SmileExtUtils.java @@ -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.lang.Preconditions; 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 final class SmileExtUtils { } /** - * 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) diff --git a/xgboost/src/main/java/hivemall/xgboost/utils/XGBoostUtils.java b/xgboost/src/main/java/hivemall/xgboost/utils/XGBoostUtils.java index 75d0fcc..575a61f 100644 --- a/xgboost/src/main/java/hivemall/xgboost/utils/XGBoostUtils.java +++ b/xgboost/src/main/java/hivemall/xgboost/utils/XGBoostUtils.java @@ -53,9 +53,8 @@ public final class 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);