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


Java MathFunctions.robustMin方法代码示例

本文整理汇总了Java中com.rapidminer.tools.math.MathFunctions.robustMin方法的典型用法代码示例。如果您正苦于以下问题:Java MathFunctions.robustMin方法的具体用法?Java MathFunctions.robustMin怎么用?Java MathFunctions.robustMin使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.rapidminer.tools.math.MathFunctions的用法示例。


在下文中一共展示了MathFunctions.robustMin方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: prepareData

import com.rapidminer.tools.math.MathFunctions; //导入方法依赖的package包/类
@Override
protected void prepareData() {
	allQuartiles.clear();
	this.globalMin = Double.POSITIVE_INFINITY;
	this.globalMax = Double.NEGATIVE_INFINITY;

	if (columns != null) {
		int totalCount = 0;
		for (int i = 0; i < this.dataTable.getNumberOfColumns(); i++) {
			if (columns[i]) {
				totalCount++;
			}
		}

		for (int i = 0; i < this.dataTable.getNumberOfColumns(); i++) {
			if (columns[i]) {
				Quartile quartile = Quartile.calculateQuartile(this.dataTable, i);
				quartile.setColor(getColorProvider(true).getPointColor((double) i / (double) totalCount));
				allQuartiles.add(quartile);
				this.globalMin = MathFunctions.robustMin(this.globalMin, quartile.getMin());
				this.globalMax = MathFunctions.robustMax(this.globalMax, quartile.getMax());
			}
		}
	}
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:26,代码来源:QuartilePlotter.java

示例2: setRange

import com.rapidminer.tools.math.MathFunctions; //导入方法依赖的package包/类
private void setRange(ValueAxis axis) {
	Range range = null;
	for (int c = 0; c < this.dataTable.getNumberOfColumns(); c++) {
		if (this.columns[c]) {
			if (range == null) {
				range = getRangeForDimension(c);
			} else {
				Range newRange = getRangeForDimension(c);
				if (newRange != null) {
					range = new Range(MathFunctions.robustMin(range.getLowerBound(), newRange.getLowerBound()),
							MathFunctions.robustMax(range.getUpperBound(), newRange.getUpperBound()));
				}
			}
		}
	}
	if (range != null) {
		axis.setRange(range);
	} else {
		axis.setAutoRange(true);
	}
}
 
开发者ID:rapidminer,项目名称:rapidminer-studio,代码行数:22,代码来源:HistogramChart.java

示例3: setYAxisRange

import com.rapidminer.tools.math.MathFunctions; //导入方法依赖的package包/类
private void setYAxisRange(NumberAxis axis) {
	Range range = getRangeForName(VALUEAXIS_LABEL);
	if (range == null) {
		for (int c = 0; c < this.dataTable.getNumberOfColumns(); c++) {
			if (this.columns[c] || c == getAxis(0) || c == getAxis(1)) {
				if (range == null) {
					range = getRangeForDimension(c);
				} else {
					Range newRange = getRangeForDimension(c);
					if (newRange != null) {
						range = new Range(MathFunctions.robustMin(range.getLowerBound(), newRange.getLowerBound()),
								MathFunctions.robustMax(range.getUpperBound(), newRange.getUpperBound()));
					}
				}
			}
		}
	}
	if (range != null) {
		axis.setRange(range);
	} else {
		axis.setAutoRange(true);
		axis.setAutoRangeStickyZero(false);
		axis.setAutoRangeIncludesZero(false);
	}
}
 
开发者ID:rapidminer,项目名称:rapidminer-studio,代码行数:26,代码来源:SeriesChartPlotter.java

示例4: setRange

import com.rapidminer.tools.math.MathFunctions; //导入方法依赖的package包/类
private void setRange(ValueAxis axis) {
    Range range = null;
    for (int c = 0; c < this.dataTable.getNumberOfColumns(); c++) {
        if (this.columns[c]) {
            if (range == null)
                range = getRangeForDimension(c);
            else {
                Range newRange = getRangeForDimension(c);
                if (newRange != null)
                    range = new Range(MathFunctions.robustMin(range.getLowerBound(), newRange.getLowerBound()), MathFunctions.robustMax(range.getUpperBound(), newRange.getUpperBound()));
            }
        }
    }
    if (range != null)
        axis.setRange(range);
    else
        axis.setAutoRange(true);
}
 
开发者ID:rapidminer,项目名称:rapidminer-5,代码行数:19,代码来源:HistogramChart.java

示例5: setYAxisRange

import com.rapidminer.tools.math.MathFunctions; //导入方法依赖的package包/类
private void setYAxisRange(NumberAxis axis) {
    Range range = getRangeForName(VALUEAXIS_LABEL);
    if (range == null) {
        for (int c = 0; c < this.dataTable.getNumberOfColumns(); c++) {
            if (this.columns[c] || c == getAxis(0) || c == getAxis(1)) {
                if (range == null)
                    range = getRangeForDimension(c);
                else {
                    Range newRange = getRangeForDimension(c);
                    if (newRange != null)
                        range = new Range(MathFunctions.robustMin(range.getLowerBound(), newRange.getLowerBound()), MathFunctions.robustMax(range.getUpperBound(), newRange.getUpperBound()));
                }
            }
        }
    }
    if (range != null)
        axis.setRange(range);
    else {
        axis.setAutoRange(true);
        axis.setAutoRangeStickyZero(false);
        axis.setAutoRangeIncludesZero(false);
    }
}
 
开发者ID:rapidminer,项目名称:rapidminer-5,代码行数:24,代码来源:SeriesChartPlotter.java

示例6: prepareData

import com.rapidminer.tools.math.MathFunctions; //导入方法依赖的package包/类
@Override
protected void prepareData() {
	allQuartiles.clear();
	this.globalMin = Double.POSITIVE_INFINITY;
	this.globalMax = Double.NEGATIVE_INFINITY;

	if (columns != null) {
		int totalCount = 0;
		for (int i = 0; i < this.dataTable.getNumberOfColumns(); i++) {
			if (columns[i]) {
				totalCount++;
			}
		}

		for (int i = 0; i < this.dataTable.getNumberOfColumns(); i++) {
			if (columns[i]) {
				Quartile quartile = Quartile.calculateQuartile(this.dataTable, i);
				quartile.setColor(getColorProvider().getPointColor((double) i / (double) totalCount));
				allQuartiles.add(quartile);
				this.globalMin = MathFunctions.robustMin(this.globalMin, quartile.getMin());
				this.globalMax = MathFunctions.robustMax(this.globalMax, quartile.getMax());
			}
		}
	}
}
 
开发者ID:rapidminer,项目名称:rapidminer-5,代码行数:26,代码来源:QuartilePlotter.java

示例7: ColorizedBarRenderer

import com.rapidminer.tools.math.MathFunctions; //导入方法依赖的package包/类
public ColorizedBarRenderer(double[] colorValues) {
	this.colorValues = colorValues;
	this.minColor = Double.POSITIVE_INFINITY;
	this.maxColor = Double.NEGATIVE_INFINITY;
	if (this.colorValues != null) {
		for (double d : this.colorValues) {
			this.minColor = MathFunctions.robustMin(this.minColor, d);
			this.maxColor = MathFunctions.robustMax(this.maxColor, d);
		}
	}
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:12,代码来源:ColorizedBarRenderer.java

示例8: addPoint

import com.rapidminer.tools.math.MathFunctions; //导入方法依赖的package包/类
private void addPoint(DataTable dataTable, Map<String, List<double[]>> dataCollection, double x, double y, double z,
		double color) {
	List<double[]> dataList = null;
	if (Double.isNaN(color)) {
		dataList = dataCollection.get("All");
		if (dataList == null) {
			dataList = new LinkedList<>();
			dataCollection.put("All", dataList);
		}
	} else {
		String name = color + "";
		if (dataTable.isNominal(colorColumn)) {
			name = dataTable.mapIndex(colorColumn, (int) color);
		} else if (dataTable.isDate(colorColumn)) {
			name = Tools.createDateAndFormat(color);
		} else if (dataTable.isTime(colorColumn)) {
			name = Tools.createTimeAndFormat(color);
		} else if (dataTable.isDateTime(colorColumn)) {
			name = Tools.createDateTimeAndFormat(color);
		}
		dataList = dataCollection.get(name);
		if (dataList == null) {
			dataList = new LinkedList<>();
			dataCollection.put(name, dataList);
		}
	}

	this.bubbleSizeMin = MathFunctions.robustMin(this.bubbleSizeMin, z);
	this.bubbleSizeMax = MathFunctions.robustMax(this.bubbleSizeMax, z);
	this.xAxisMin = MathFunctions.robustMin(this.xAxisMin, x);
	this.yAxisMin = MathFunctions.robustMin(this.yAxisMin, y);
	this.xAxisMax = MathFunctions.robustMax(this.xAxisMax, x);
	this.yAxisMax = MathFunctions.robustMax(this.yAxisMax, y);
	this.minColor = MathFunctions.robustMin(this.minColor, color);
	this.maxColor = MathFunctions.robustMax(this.maxColor, color);

	dataList.add(new double[] { x, y, z });
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:39,代码来源:BubbleChartPlotter.java

示例9: ColorizedBubbleRenderer

import com.rapidminer.tools.math.MathFunctions; //导入方法依赖的package包/类
public ColorizedBubbleRenderer(double[] colors) {
	super(XYBubbleRenderer.SCALE_ON_RANGE_AXIS);
	this.minColor = Double.POSITIVE_INFINITY;
	this.maxColor = Double.NEGATIVE_INFINITY;
	for (double c : colors) {
		minColor = MathFunctions.robustMin(minColor, c);
		maxColor = MathFunctions.robustMax(maxColor, c);
	}
	this.colors = colors;
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:11,代码来源:ColorizedBubbleRenderer.java

示例10: ColorizedLineAndShapeRenderer

import com.rapidminer.tools.math.MathFunctions; //导入方法依赖的package包/类
public ColorizedLineAndShapeRenderer(double[] colorValues) {
	this.colorValues = colorValues;
	this.minColor = Double.POSITIVE_INFINITY;
	this.maxColor = Double.NEGATIVE_INFINITY;
	if (this.colorValues != null) {
		for (double d : this.colorValues) {
			this.minColor = MathFunctions.robustMin(this.minColor, d);
			this.maxColor = MathFunctions.robustMax(this.maxColor, d);
		}
	}
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:12,代码来源:ColorizedLineAndShapeRenderer.java

示例11: prepareData

import com.rapidminer.tools.math.MathFunctions; //导入方法依赖的package包/类
private void prepareData() {
	// calculate min and max
	int columns = this.dataTable.getNumberOfColumns();
	min = new double[columns];
	max = new double[columns];
	for (int c = 0; c < columns; c++) {
		min[c] = Double.POSITIVE_INFINITY;
		max[c] = Double.NEGATIVE_INFINITY;
	}
	globalMin = Double.POSITIVE_INFINITY;
	globalMax = Double.NEGATIVE_INFINITY;

	synchronized (dataTable) {
		Iterator<DataTableRow> i = dataTable.iterator();
		while (i.hasNext()) {
			DataTableRow row = i.next();
			for (int c = 0; c < dataTable.getNumberOfColumns(); c++) {
				double value = row.getValue(c);
				min[c] = MathFunctions.robustMin(min[c], value);
				max[c] = MathFunctions.robustMax(max[c], value);
				if (c != colorColumn) {
					globalMin = MathFunctions.robustMin(globalMin, min[c]);
					globalMax = MathFunctions.robustMax(globalMax, max[c]);
				}
			}
		}
	}

	this.maxWeight = getMaxWeight(this.dataTable);
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:31,代码来源:ParallelPlotter.java

示例12: drawDateLegend

import com.rapidminer.tools.math.MathFunctions; //导入方法依赖的package包/类
private void drawDateLegend(Graphics graphics, DataTable table, int legendColumn, int alpha) {
	double min = Double.POSITIVE_INFINITY;
	double max = Double.NEGATIVE_INFINITY;
	synchronized (table) {
		Iterator<DataTableRow> i = table.iterator();
		while (i.hasNext()) {
			DataTableRow row = i.next();
			double colorValue = row.getValue(legendColumn);
			min = MathFunctions.robustMin(min, colorValue);
			max = MathFunctions.robustMax(max, colorValue);
		}
	}
	String minColorString = null;
	String maxColorString = null;
	if (table.isDate(legendColumn)) {
		minColorString = Tools.createDateAndFormat(min);
		maxColorString = Tools.createDateAndFormat(max);
	} else if (table.isTime(legendColumn)) {
		minColorString = Tools.createTimeAndFormat(min);
		maxColorString = Tools.createTimeAndFormat(max);
	} else if (table.isDateTime(legendColumn)) {
		minColorString = Tools.createDateTimeAndFormat(min);
		maxColorString = Tools.createDateTimeAndFormat(max);
	} else {
		minColorString = Tools.formatNumber(min);
		maxColorString = Tools.formatNumber(max);
	}

	drawNumericalLegend(graphics, getWidth(), minColorString, maxColorString, table.getColumnName(legendColumn), alpha);
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:31,代码来源:PlotterAdapter.java

示例13: drawNumericalLegend

import com.rapidminer.tools.math.MathFunctions; //导入方法依赖的package包/类
private void drawNumericalLegend(Graphics graphics, DataTable table, int legendColumn, int alpha) {
	double min = Double.POSITIVE_INFINITY;
	double max = Double.NEGATIVE_INFINITY;
	synchronized (table) {
		Iterator<DataTableRow> i = table.iterator();
		while (i.hasNext()) {
			DataTableRow row = i.next();
			double colorValue = row.getValue(legendColumn);
			min = MathFunctions.robustMin(min, colorValue);
			max = MathFunctions.robustMax(max, colorValue);
		}
	}
	drawNumericalLegend(graphics, table.getColumnName(legendColumn), min, max, alpha);
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:15,代码来源:PlotterAdapter.java

示例14: ColorizedBarRenderer

import com.rapidminer.tools.math.MathFunctions; //导入方法依赖的package包/类
public ColorizedBarRenderer(double[] colorValues) {
	this.colorValues = colorValues;
	this.minColor = Double.POSITIVE_INFINITY;
	this.maxColor = Double.NEGATIVE_INFINITY;
	if (this.colorValues != null) {
		for (double d : this.colorValues) {
			this.minColor = MathFunctions.robustMin(this.minColor, d);
			this.maxColor = MathFunctions.robustMax(this.maxColor, d);
		}	
	}	
}
 
开发者ID:rapidminer,项目名称:rapidminer-5,代码行数:12,代码来源:ColorizedBarRenderer.java

示例15: addPoint

import com.rapidminer.tools.math.MathFunctions; //导入方法依赖的package包/类
private void addPoint(DataTable dataTable, Map<String, List<double[]>> dataCollection, double x, double y, double z, double color) {
	List<double[]> dataList = null;
	if (Double.isNaN(color)) {
		dataList = dataCollection.get("All");
		if (dataList == null) {
			dataList = new LinkedList<double[]>();
			dataCollection.put("All", dataList);
		}
	} else {
		String name = color + "";
		if (dataTable.isNominal(colorColumn)) {
			name = dataTable.mapIndex(colorColumn, (int) color);
		} else if (dataTable.isDate(colorColumn)) {
			name = Tools.formatDate(new Date((long) color));
		} else if (dataTable.isTime(colorColumn)) {
			name = Tools.formatTime(new Date((long) color));
		} else if (dataTable.isDateTime(colorColumn)) {
			name = Tools.formatDateTime(new Date((long) color));
		}
		dataList = dataCollection.get(name);
		if (dataList == null) {
			dataList = new LinkedList<double[]>();
			dataCollection.put(name, dataList);
		}
	}

	this.bubbleSizeMin = MathFunctions.robustMin(this.bubbleSizeMin, z);
	this.bubbleSizeMax = MathFunctions.robustMax(this.bubbleSizeMax, z);
	this.xAxisMin = MathFunctions.robustMin(this.xAxisMin, x);
	this.yAxisMin = MathFunctions.robustMin(this.yAxisMin, y);
	this.xAxisMax = MathFunctions.robustMax(this.xAxisMax, x);
	this.yAxisMax = MathFunctions.robustMax(this.yAxisMax, y);
	this.minColor = MathFunctions.robustMin(this.minColor, color);
	this.maxColor = MathFunctions.robustMax(this.maxColor, color);

	dataList.add(new double[] { x, y, z });
}
 
开发者ID:rapidminer,项目名称:rapidminer-5,代码行数:38,代码来源:BubbleChartPlotter.java


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