org.dmg.pmml.scorecard.Scorecard Java Examples

The following examples show how to use org.dmg.pmml.scorecard.Scorecard. 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: VersionInspectorTest.java    From jpmml-model with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
@Test
public void inspectTypeAnnotations(){
	PMML pmml = createPMML();

	assertVersionRange(pmml, Version.PMML_3_0, Version.PMML_4_4);

	pmml.addModels(new AssociationModel(),
		//new ClusteringModel(),
		//new GeneralRegressionModel(),
		//new MiningModel(),
		new NaiveBayesModel(),
		new NeuralNetwork(),
		new RegressionModel(),
		new RuleSetModel(),
		new SequenceModel(),
		//new SupportVectorMachineModel(),
		new TextModel(),
		new TreeModel());

	assertVersionRange(pmml, Version.PMML_3_0, Version.PMML_4_4);

	pmml.addModels(new TimeSeriesModel());

	assertVersionRange(pmml, Version.PMML_4_0, Version.PMML_4_4);

	pmml.addModels(new BaselineModel(),
		new Scorecard(),
		new NearestNeighborModel());

	assertVersionRange(pmml, Version.PMML_4_1, Version.PMML_4_4);

	pmml.addModels(new BayesianNetworkModel(),
		new GaussianProcessModel());

	assertVersionRange(pmml, Version.PMML_4_3, Version.PMML_4_4);
}
 
Example #2
Source File: ScorecardEvaluator.java    From jpmml-evaluator with GNU Affero General Public License v3.0 5 votes vote down vote up
public ScorecardEvaluator(PMML pmml, Scorecard scorecard){
	super(pmml, scorecard);

	Characteristics characteristics = scorecard.getCharacteristics();
	if(characteristics == null){
		throw new MissingElementException(scorecard, PMMLElements.SCORECARD_CHARACTERISTICS);
	} // End if

	if(!characteristics.hasCharacteristics()){
		throw new MissingElementException(characteristics, PMMLElements.CHARACTERISTICS_CHARACTERISTICS);
	}
}
 
Example #3
Source File: ScorecardEvaluator.java    From jpmml-evaluator with GNU Affero General Public License v3.0 4 votes vote down vote up
public ScorecardEvaluator(PMML pmml){
	this(pmml, PMMLUtil.findModel(pmml, Scorecard.class));
}