public SupportVectorMachineModelEvaluator(PMML pmml, SupportVectorMachineModel supportVectorMachineModel){
super(pmml, supportVectorMachineModel);
boolean maxWins = supportVectorMachineModel.isMaxWins();
if(maxWins){
throw new UnsupportedAttributeException(supportVectorMachineModel, PMMLAttributes.SUPPORTVECTORMACHINEMODEL_MAXWINS, maxWins);
}
SupportVectorMachineModel.Representation representation = supportVectorMachineModel.getRepresentation();
switch(representation){
case SUPPORT_VECTORS:
break;
default:
throw new UnsupportedAttributeException(supportVectorMachineModel, representation);
}
VectorDictionary vectorDictionary = supportVectorMachineModel.getVectorDictionary();
if(vectorDictionary == null){
throw new MissingElementException(supportVectorMachineModel, PMMLElements.SUPPORTVECTORMACHINEMODEL_VECTORDICTIONARY);
}
VectorFields vectorFields = vectorDictionary.getVectorFields();
if(vectorFields == null){
throw new MissingElementException(vectorDictionary, PMMLElements.VECTORDICTIONARY_VECTORFIELDS);
}
if(!supportVectorMachineModel.hasSupportVectorMachines()){
throw new MissingElementException(supportVectorMachineModel, PMMLElements.SUPPORTVECTORMACHINEMODEL_SUPPORTVECTORMACHINES);
}
}