From fdef293c812c61bccc8eedf7bd8360e001f5c0a7 Mon Sep 17 00:00:00 2001 From: Armin Braun Date: Tue, 27 Aug 2019 17:23:48 +0200 Subject: [PATCH] Fix RegressionTests#fromXContent (#46029) * The `trainingPercent` must be between `1` and `100`, not `0` and `100` which is causing test failures --- .../xpack/core/ml/dataframe/analyses/RegressionTests.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/dataframe/analyses/RegressionTests.java b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/dataframe/analyses/RegressionTests.java index deccf61ba6a9c..77429141ed271 100644 --- a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/dataframe/analyses/RegressionTests.java +++ b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/dataframe/analyses/RegressionTests.java @@ -33,7 +33,7 @@ public static Regression createRandom() { Integer maximumNumberTrees = randomBoolean() ? null : randomIntBetween(1, 2000); Double featureBagFraction = randomBoolean() ? null : randomDoubleBetween(0.0, 1.0, false); String predictionFieldName = randomBoolean() ? null : randomAlphaOfLength(10); - Double trainingPercent = randomBoolean() ? null : randomDoubleBetween(0.0, 100.0, true); + Double trainingPercent = randomBoolean() ? null : randomDoubleBetween(1.0, 100.0, true); return new Regression(randomAlphaOfLength(10), lambda, gamma, eta, maximumNumberTrees, featureBagFraction, predictionFieldName, trainingPercent); }