本文整理汇总了Java中com.rapidminer.operator.learner.functions.kernel.KernelModel类的典型用法代码示例。如果您正苦于以下问题:Java KernelModel类的具体用法?Java KernelModel怎么用?Java KernelModel使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
KernelModel类属于com.rapidminer.operator.learner.functions.kernel包,在下文中一共展示了KernelModel类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: count
import com.rapidminer.operator.learner.functions.kernel.KernelModel; //导入依赖的package包/类
/**
* Creates a new performance vector if the given one is null. Adds a new estimated criterion. If
* the criterion was already part of the performance vector before it will be overwritten.
*/
private PerformanceVector count(KernelModel model, PerformanceVector performanceCriteria) throws OperatorException {
if (performanceCriteria == null) {
performanceCriteria = new PerformanceVector();
}
this.lastCount = 0;
int svNumber = model.getNumberOfSupportVectors();
for (int i = 0; i < svNumber; i++) {
SupportVector sv = model.getSupportVector(i);
if (Math.abs(sv.getAlpha()) > 0.0d) {
this.lastCount++;
}
}
EstimatedPerformance svCriterion = new EstimatedPerformance("number_of_support_vectors", lastCount, 1,
getParameterAsInt(PARAMETER_OPTIMIZATION_DIRECTION) == MDLCriterion.MINIMIZATION);
performanceCriteria.addCriterion(svCriterion);
return performanceCriteria;
}
示例2: count
import com.rapidminer.operator.learner.functions.kernel.KernelModel; //导入依赖的package包/类
/**
* Creates a new performance vector if the given one is null. Adds a new estimated criterion.
* If the criterion was already part of the performance vector before it will be overwritten.
*/
private PerformanceVector count(KernelModel model, PerformanceVector performanceCriteria) throws OperatorException {
if (performanceCriteria == null)
performanceCriteria = new PerformanceVector();
this.lastCount = 0;
int svNumber = model.getNumberOfSupportVectors();
for (int i = 0; i < svNumber; i++) {
SupportVector sv = model.getSupportVector(i);
if (Math.abs(sv.getAlpha()) > 0.0d)
this.lastCount++;
}
EstimatedPerformance svCriterion = new EstimatedPerformance("number_of_support_vectors", lastCount, 1, getParameterAsInt(PARAMETER_OPTIMIZATION_DIRECTION) == MDLCriterion.MINIMIZATION);
performanceCriteria.addCriterion(svCriterion);
return performanceCriteria;
}
示例3: doWork
import com.rapidminer.operator.learner.functions.kernel.KernelModel; //导入依赖的package包/类
@Override
public void doWork() throws OperatorException {
Model model = modelInput.getData(Model.class);
if (!(model instanceof KernelModel)) {
throw new UserError(this, 122, "'support vector based model (kernel model)'");
}
PerformanceVector inputPerformance = performanceInput.getDataOrNull(PerformanceVector.class);
PerformanceVector performance = count((KernelModel) model, inputPerformance);
modelOutput.deliver(model);
performanceOutput.deliver(performance);
}
示例4: getTableModel
import com.rapidminer.operator.learner.functions.kernel.KernelModel; //导入依赖的package包/类
@Override
public TableModel getTableModel(Object renderable, IOContainer ioContainer, boolean isReporting) {
KernelModel kernelModel = (KernelModel) renderable;
DataTable weightDataTable = kernelModel.createWeightsTable();
if (weightDataTable != null) {
return new DataTableViewerTableModel(weightDataTable);
} else {
return null;
}
}
示例5: doWork
import com.rapidminer.operator.learner.functions.kernel.KernelModel; //导入依赖的package包/类
@Override
public void doWork() throws OperatorException {
Model model = modelInput.getData(Model.class);
if (!(model instanceof KernelModel)) {
throw new UserError(this, 122, "'support vector based model (kernel model)'");
}
PerformanceVector inputPerformance = performanceInput.getDataOrNull(PerformanceVector.class);
PerformanceVector performance = count((KernelModel)model, inputPerformance);
modelOutput.deliver(model);
performanceOutput.deliver(performance);
}
示例6: getTableModel
import com.rapidminer.operator.learner.functions.kernel.KernelModel; //导入依赖的package包/类
@Override
public TableModel getTableModel(Object renderable, IOContainer ioContainer, boolean isReporting) {
KernelModel kernelModel = (KernelModel) renderable;
DataTable weightDataTable = kernelModel.createWeightsTable();
if (weightDataTable != null) {
return new DataTableViewerTableModel(weightDataTable);
} else {
return null;
}
}
示例7: KernelModelRow2DataTableRowWrapper
import com.rapidminer.operator.learner.functions.kernel.KernelModel; //导入依赖的package包/类
public KernelModelRow2DataTableRowWrapper(KernelModel kernelModel, DataTableKernelModelAdapter adapter, int index) {
this.kernelModel = kernelModel;
this.adapter = adapter;
this.index = index;
}
示例8: getDataTable
import com.rapidminer.operator.learner.functions.kernel.KernelModel; //导入依赖的package包/类
@Override
public DataTable getDataTable(Object renderable, IOContainer ioContainer, boolean isRendering) {
KernelModel kernelModel = (KernelModel) renderable;
return new DataTableKernelModelAdapter(kernelModel);
}
示例9: getDataTable
import com.rapidminer.operator.learner.functions.kernel.KernelModel; //导入依赖的package包/类
@Override
public DataTable getDataTable(Object renderable, IOContainer ioContainer) {
KernelModel kernelModel = (KernelModel) renderable;
return new DataTableKernelModelAdapter(kernelModel);
}
示例10: getDataTable
import com.rapidminer.operator.learner.functions.kernel.KernelModel; //导入依赖的package包/类
@Override
public DataTable getDataTable(Object renderable, IOContainer ioContainer, boolean isRendering) {
KernelModel kernelModel = (KernelModel)renderable;
return new DataTableKernelModelAdapter(kernelModel);
}
示例11: getDataTable
import com.rapidminer.operator.learner.functions.kernel.KernelModel; //导入依赖的package包/类
@Override
public DataTable getDataTable(Object renderable, IOContainer ioContainer) {
KernelModel kernelModel = (KernelModel)renderable;
return new DataTableKernelModelAdapter(kernelModel);
}