Skip to content

Commit

Permalink
Reordered method parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
vruusmann committed Apr 21, 2024
1 parent 36580db commit 5ee35cd
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public MiningModel encodeModel(Schema schema){
}
}

MiningModel miningModel = BaggingUtil.encodeBagging(estimators, estimatorsFeatures, multipleModelMethod, MiningFunction.CLASSIFICATION, schema);
MiningModel miningModel = BaggingUtil.encodeBagging(estimators, estimatorsFeatures, MiningFunction.CLASSIFICATION, multipleModelMethod, schema);

encodePredictProbaOutput(miningModel, DataType.DOUBLE, categoricalLabel);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public MiningModel encodeModel(Schema schema){
List<Regressor> estimators = getEstimators();
List<List<Number>> estimatorsFeatures = getEstimatorsFeatures();

MiningModel miningModel = BaggingUtil.encodeBagging(estimators, estimatorsFeatures, Segmentation.MultipleModelMethod.AVERAGE, MiningFunction.REGRESSION, schema);
MiningModel miningModel = BaggingUtil.encodeBagging(estimators, estimatorsFeatures, MiningFunction.REGRESSION, Segmentation.MultipleModelMethod.AVERAGE, schema);

return miningModel;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ private BaggingUtil(){
}

static
public <E extends Estimator> MiningModel encodeBagging(List<E> estimators, List<List<Number>> estimatorsFeatures, Segmentation.MultipleModelMethod multipleModelMethod, MiningFunction miningFunction, Schema schema){
public <E extends Estimator> MiningModel encodeBagging(List<E> estimators, List<List<Number>> estimatorsFeatures, MiningFunction miningFunction, Segmentation.MultipleModelMethod multipleModelMethod, Schema schema){
Schema segmentSchema = schema.toAnonymousSchema();

List<Model> models = new ArrayList<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public String getMultiApplyField(Object segmentId){
public MiningModel encodeModel(Schema schema){
CategoricalLabel categoricalLabel = (CategoricalLabel)schema.getLabel();

MiningModel miningModel = ForestUtil.encodeBaseForest(this, Segmentation.MultipleModelMethod.AVERAGE, MiningFunction.CLASSIFICATION, schema);
MiningModel miningModel = ForestUtil.encodeBaseForest(this, MiningFunction.CLASSIFICATION, Segmentation.MultipleModelMethod.AVERAGE, schema);

encodePredictProbaOutput(miningModel, DataType.DOUBLE, categoricalLabel);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public String getMultiApplyField(Object segmentId){

@Override
public MiningModel encodeModel(Schema schema){
return ForestUtil.encodeBaseForest(this, Segmentation.MultipleModelMethod.AVERAGE, MiningFunction.REGRESSION, schema);
return ForestUtil.encodeBaseForest(this, MiningFunction.REGRESSION, Segmentation.MultipleModelMethod.AVERAGE, schema);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public <E extends Estimator & HasEstimatorEnsemble<T>, T extends Estimator & Has
}

static
public <E extends Estimator & HasEstimatorEnsemble<T> & HasTreeOptions, T extends Estimator & HasTree> MiningModel encodeBaseForest(E estimator, Segmentation.MultipleModelMethod multipleModelMethod, MiningFunction miningFunction, Schema schema){
public <E extends Estimator & HasEstimatorEnsemble<T> & HasTreeOptions, T extends Estimator & HasTree> MiningModel encodeBaseForest(E estimator, MiningFunction miningFunction, Segmentation.MultipleModelMethod multipleModelMethod, Schema schema){
List<TreeModel> treeModels = TreeUtil.encodeTreeModelEnsemble(estimator, miningFunction, schema);

MiningModel miningModel = new MiningModel(miningFunction, ModelUtil.createMiningSchema(schema.getLabel()))
Expand Down

0 comments on commit 5ee35cd

Please sign in to comment.