Java Code Examples for org.jpmml.converter.mining.MiningModelUtil#createRegression()
The following examples show how to use
org.jpmml.converter.mining.MiningModelUtil#createRegression() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PoissonRegression.java From jpmml-lightgbm with GNU Affero General Public License v3.0 | 5 votes |
@Override public MiningModel encodeMiningModel(List<Tree> trees, Integer numIteration, Schema schema){ Schema segmentSchema = schema.toAnonymousSchema(); MiningModel miningModel = super.encodeMiningModel(trees, numIteration, segmentSchema) .setOutput(ModelUtil.createPredictedOutput(FieldName.create("lgbmValue"), OpType.CONTINUOUS, DataType.DOUBLE)); return MiningModelUtil.createRegression(miningModel, RegressionModel.NormalizationMethod.EXP, schema); }
Example 2
Source File: LogisticRegression.java From jpmml-xgboost with GNU Affero General Public License v3.0 | 5 votes |
@Override public MiningModel encodeMiningModel(List<RegTree> trees, List<Float> weights, float base_score, Integer ntreeLimit, Schema schema){ Schema segmentSchema = schema.toAnonymousSchema(); MiningModel miningModel = createMiningModel(trees, weights, base_score, ntreeLimit, segmentSchema) .setOutput(ModelUtil.createPredictedOutput(FieldName.create("xgbValue"), OpType.CONTINUOUS, DataType.FLOAT)); return MiningModelUtil.createRegression(miningModel, RegressionModel.NormalizationMethod.LOGIT, schema); }
Example 3
Source File: GeneralizedLinearRegression.java From jpmml-xgboost with GNU Affero General Public License v3.0 | 5 votes |
@Override public MiningModel encodeMiningModel(List<RegTree> trees, List<Float> weights, float base_score, Integer ntreeLimit, Schema schema){ Schema segmentSchema = schema.toAnonymousSchema(); MiningModel miningModel = createMiningModel(trees, weights, base_score, ntreeLimit, segmentSchema) .setOutput(ModelUtil.createPredictedOutput(FieldName.create("xgbValue"), OpType.CONTINUOUS, DataType.FLOAT)); return MiningModelUtil.createRegression(miningModel, RegressionModel.NormalizationMethod.EXP, schema); }