@@ -46,7 +46,7 @@ public static Builder builder(String dependentVariable) {
46
46
static final ParseField ETA = new ParseField ("eta" );
47
47
static final ParseField MAXIMUM_NUMBER_TREES = new ParseField ("maximum_number_trees" );
48
48
static final ParseField FEATURE_BAG_FRACTION = new ParseField ("feature_bag_fraction" );
49
- static final ParseField TOP_FEATURE_IMPORTANCE_VALUES = new ParseField ("top_feature_importance_values " );
49
+ static final ParseField NUM_TOP_FEATURE_IMPORTANCE_VALUES = new ParseField ("num_top_feature_importance_values " );
50
50
static final ParseField PREDICTION_FIELD_NAME = new ParseField ("prediction_field_name" );
51
51
static final ParseField TRAINING_PERCENT = new ParseField ("training_percent" );
52
52
static final ParseField RANDOMIZE_SEED = new ParseField ("randomize_seed" );
@@ -74,7 +74,7 @@ public static Builder builder(String dependentVariable) {
74
74
PARSER .declareDouble (ConstructingObjectParser .optionalConstructorArg (), ETA );
75
75
PARSER .declareInt (ConstructingObjectParser .optionalConstructorArg (), MAXIMUM_NUMBER_TREES );
76
76
PARSER .declareDouble (ConstructingObjectParser .optionalConstructorArg (), FEATURE_BAG_FRACTION );
77
- PARSER .declareInt (ConstructingObjectParser .optionalConstructorArg (), TOP_FEATURE_IMPORTANCE_VALUES );
77
+ PARSER .declareInt (ConstructingObjectParser .optionalConstructorArg (), NUM_TOP_FEATURE_IMPORTANCE_VALUES );
78
78
PARSER .declareString (ConstructingObjectParser .optionalConstructorArg (), PREDICTION_FIELD_NAME );
79
79
PARSER .declareDouble (ConstructingObjectParser .optionalConstructorArg (), TRAINING_PERCENT );
80
80
PARSER .declareLong (ConstructingObjectParser .optionalConstructorArg (), RANDOMIZE_SEED );
@@ -86,22 +86,22 @@ public static Builder builder(String dependentVariable) {
86
86
private final Double eta ;
87
87
private final Integer maximumNumberTrees ;
88
88
private final Double featureBagFraction ;
89
- private final Integer topFeatureImportanceValues ;
89
+ private final Integer numTopFeatureImportanceValues ;
90
90
private final String predictionFieldName ;
91
91
private final Double trainingPercent ;
92
92
private final Long randomizeSeed ;
93
93
94
- private Regression (String dependentVariable , @ Nullable Double lambda , @ Nullable Double gamma , @ Nullable Double eta ,
94
+ private Regression (String dependentVariable , @ Nullable Double lambda , @ Nullable Double gamma , @ Nullable Double eta ,
95
95
@ Nullable Integer maximumNumberTrees , @ Nullable Double featureBagFraction ,
96
- @ Nullable Integer topFeatureImportanceValues , @ Nullable String predictionFieldName ,
96
+ @ Nullable Integer numTopFeatureImportanceValues , @ Nullable String predictionFieldName ,
97
97
@ Nullable Double trainingPercent , @ Nullable Long randomizeSeed ) {
98
98
this .dependentVariable = Objects .requireNonNull (dependentVariable );
99
99
this .lambda = lambda ;
100
100
this .gamma = gamma ;
101
101
this .eta = eta ;
102
102
this .maximumNumberTrees = maximumNumberTrees ;
103
103
this .featureBagFraction = featureBagFraction ;
104
- this .topFeatureImportanceValues = topFeatureImportanceValues ;
104
+ this .numTopFeatureImportanceValues = numTopFeatureImportanceValues ;
105
105
this .predictionFieldName = predictionFieldName ;
106
106
this .trainingPercent = trainingPercent ;
107
107
this .randomizeSeed = randomizeSeed ;
@@ -136,8 +136,8 @@ public Double getFeatureBagFraction() {
136
136
return featureBagFraction ;
137
137
}
138
138
139
- public Integer getTopFeatureImportanceValues () {
140
- return topFeatureImportanceValues ;
139
+ public Integer getNumTopFeatureImportanceValues () {
140
+ return numTopFeatureImportanceValues ;
141
141
}
142
142
143
143
public String getPredictionFieldName () {
@@ -171,8 +171,8 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws
171
171
if (featureBagFraction != null ) {
172
172
builder .field (FEATURE_BAG_FRACTION .getPreferredName (), featureBagFraction );
173
173
}
174
- if (topFeatureImportanceValues != null ) {
175
- builder .field (TOP_FEATURE_IMPORTANCE_VALUES .getPreferredName (), topFeatureImportanceValues );
174
+ if (numTopFeatureImportanceValues != null ) {
175
+ builder .field (NUM_TOP_FEATURE_IMPORTANCE_VALUES .getPreferredName (), numTopFeatureImportanceValues );
176
176
}
177
177
if (predictionFieldName != null ) {
178
178
builder .field (PREDICTION_FIELD_NAME .getPreferredName (), predictionFieldName );
@@ -189,7 +189,7 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws
189
189
190
190
@ Override
191
191
public int hashCode () {
192
- return Objects .hash (dependentVariable , lambda , gamma , eta , maximumNumberTrees , featureBagFraction , topFeatureImportanceValues ,
192
+ return Objects .hash (dependentVariable , lambda , gamma , eta , maximumNumberTrees , featureBagFraction , numTopFeatureImportanceValues ,
193
193
predictionFieldName , trainingPercent , randomizeSeed );
194
194
}
195
195
@@ -204,7 +204,7 @@ public boolean equals(Object o) {
204
204
&& Objects .equals (eta , that .eta )
205
205
&& Objects .equals (maximumNumberTrees , that .maximumNumberTrees )
206
206
&& Objects .equals (featureBagFraction , that .featureBagFraction )
207
- && Objects .equals (topFeatureImportanceValues , that .topFeatureImportanceValues )
207
+ && Objects .equals (numTopFeatureImportanceValues , that .numTopFeatureImportanceValues )
208
208
&& Objects .equals (predictionFieldName , that .predictionFieldName )
209
209
&& Objects .equals (trainingPercent , that .trainingPercent )
210
210
&& Objects .equals (randomizeSeed , that .randomizeSeed );
@@ -222,7 +222,7 @@ public static class Builder {
222
222
private Double eta ;
223
223
private Integer maximumNumberTrees ;
224
224
private Double featureBagFraction ;
225
- private Integer topFeatureImportanceValues ;
225
+ private Integer numTopFeatureImportanceValues ;
226
226
private String predictionFieldName ;
227
227
private Double trainingPercent ;
228
228
private Long randomizeSeed ;
@@ -256,8 +256,8 @@ public Builder setFeatureBagFraction(Double featureBagFraction) {
256
256
return this ;
257
257
}
258
258
259
- public Builder setTopFeatureImportanceValues (Integer topFeatureImportanceValues ) {
260
- this .topFeatureImportanceValues = topFeatureImportanceValues ;
259
+ public Builder setNumTopFeatureImportanceValues (Integer numTopFeatureImportanceValues ) {
260
+ this .numTopFeatureImportanceValues = numTopFeatureImportanceValues ;
261
261
return this ;
262
262
}
263
263
@@ -277,8 +277,8 @@ public Builder setRandomizeSeed(Long randomizeSeed) {
277
277
}
278
278
279
279
public Regression build () {
280
- return new Regression (dependentVariable , lambda , gamma , eta , maximumNumberTrees , featureBagFraction , topFeatureImportanceValues ,
281
- predictionFieldName , trainingPercent , randomizeSeed );
280
+ return new Regression (dependentVariable , lambda , gamma , eta , maximumNumberTrees , featureBagFraction ,
281
+ numTopFeatureImportanceValues , predictionFieldName , trainingPercent , randomizeSeed );
282
282
}
283
283
}
284
284
}
0 commit comments