当前位置: 首页>>代码示例>>Java>>正文


Java KernelModel类代码示例

本文整理汇总了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;
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:23,代码来源:SupportVectorCounter.java

示例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;
}
 
开发者ID:rapidminer,项目名称:rapidminer-5,代码行数:20,代码来源:SupportVectorCounter.java

示例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);
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:15,代码来源:SupportVectorCounter.java

示例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;
	}
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:11,代码来源:KernelModelWeightsRenderer.java

示例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);
}
 
开发者ID:rapidminer,项目名称:rapidminer-5,代码行数:15,代码来源:SupportVectorCounter.java

示例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;
	}
}
 
开发者ID:rapidminer,项目名称:rapidminer-5,代码行数:11,代码来源:KernelModelWeightsRenderer.java

示例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;
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:6,代码来源:KernelModelRow2DataTableRowWrapper.java

示例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);
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:6,代码来源:KernelModelSupportVectorRenderer.java

示例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);
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:6,代码来源:KernelModelPlotRenderer.java

示例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);
}
 
开发者ID:rapidminer,项目名称:rapidminer-5,代码行数:6,代码来源:KernelModelSupportVectorRenderer.java

示例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);
}
 
开发者ID:rapidminer,项目名称:rapidminer-5,代码行数:6,代码来源:KernelModelPlotRenderer.java


注:本文中的com.rapidminer.operator.learner.functions.kernel.KernelModel类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。