本文整理匯總了Java中org.jpmml.model.visitors.MiningSchemaCleaner類的典型用法代碼示例。如果您正苦於以下問題:Java MiningSchemaCleaner類的具體用法?Java MiningSchemaCleaner怎麽用?Java MiningSchemaCleaner使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
MiningSchemaCleaner類屬於org.jpmml.model.visitors包,在下文中一共展示了MiningSchemaCleaner類的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: encodePMML
import org.jpmml.model.visitors.MiningSchemaCleaner; //導入依賴的package包/類
public PMML encodePMML(Model model){
PMML pmml = encodePMML();
pmml.addModels(model);
List<? extends Visitor> visitors = Arrays.asList(new MiningSchemaCleaner(), new TransformationDictionaryCleaner(), new DataDictionaryCleaner());
for(Visitor visitor : visitors){
visitor.applyTo(pmml);
}
MiningSchema miningSchema = model.getMiningSchema();
List<MiningField> miningFields = miningSchema.getMiningFields();
for(MiningField miningField : miningFields){
FieldName name = miningField.getName();
List<Decorator> decorators = getDecorators(name);
if(decorators == null){
continue;
}
DataField dataField = getDataField(name);
if(dataField == null){
throw new IllegalArgumentException();
}
for(Decorator decorator : decorators){
decorator.decorate(dataField, miningField);
}
}
Collection<Map.Entry<FieldName, FieldName>> entries = this.renamedFields.entrySet();
for(Map.Entry<FieldName, FieldName> entry : entries){
FieldRenamer renamer = new FieldRenamer(entry.getKey(), entry.getValue());
renamer.applyTo(pmml);
}
return pmml;
}