com.rapidminer.gui.new_plotter.configuration
Class EquidistantFixedBinCountBinning

java.lang.Object
  extended by com.rapidminer.gui.new_plotter.configuration.AbstractValueGrouping
      extended by com.rapidminer.gui.new_plotter.configuration.EquidistantFixedBinCountBinning
All Implemented Interfaces:
ValueGrouping

public class EquidistantFixedBinCountBinning
extends AbstractValueGrouping

Defines a binning with a fixed number of equal width bins between a min and max value. Can be either categorical or numerical. If the binning is categorical, each created ValueRange delivers an integer idx as identifier, otherwise the mean value of upper and lower bound. If this binning is categorical, overflow and underflow bins are created for values which are greater/lesser than minValue/maxValue.

Author:
Marius Helf, Nils Woehler

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.rapidminer.gui.new_plotter.configuration.ValueGrouping
ValueGrouping.GroupingType, ValueGrouping.ValueGroupingFactory
 
Constructor Summary
EquidistantFixedBinCountBinning(EquidistantFixedBinCountBinning other)
          Copy ctor.
EquidistantFixedBinCountBinning(int binCount, double minValue, double maxValue, DataTableColumn dataTableColumn, boolean categorical, java.text.DateFormat dateFormat)
           
 
Method Summary
 ValueGrouping clone()
           
protected  java.util.List<ValueRange> createGroupingModel(DataTable data, double userDefinedUpperDimensionBound, double userDefinedLowerDimensionBound)
          Returns an up-to-date grouping model without cumulation applied.
 boolean definesUpperLowerBounds()
          Returns true iff this ValueGrouping guarantees that each ValueRange in each possible resulting grouping model defines upper and lower bounds.
 boolean equals(java.lang.Object obj)
           
 int getBinCount()
           
 ValueGrouping.GroupingType getGroupingType()
          Returns the type of the grouping, like Distinct values or Equal data fraction grouping.
 double getMaxValue()
           
 double getMinValue()
           
 boolean isAutoRanging()
           
 void setAutoRange(boolean autoRange)
           
 void setBinCount(int binCount)
           
 void setMaxValue(double maxValue)
           
 void setMinValue(double minValue)
           
 
Methods inherited from class com.rapidminer.gui.new_plotter.configuration.AbstractValueGrouping
addListener, applyAdaptiveVisualRounding, fireGroupingChanged, forceDataTableColumn, getDataTableColumn, getDateFormat, getDomainType, getGroupingModel, isCategorical, removeListener, setCategorical, setDataTableColumn, setDateFormat
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EquidistantFixedBinCountBinning

public EquidistantFixedBinCountBinning(int binCount,
                                       double minValue,
                                       double maxValue,
                                       DataTableColumn dataTableColumn,
                                       boolean categorical,
                                       java.text.DateFormat dateFormat)
                                throws ChartConfigurationException
Parameters:
binCount -
minValue - The left value of the left-most normal (non-overflow) bin. If NaN, the left-most point in the data is chosen. Infinity is not allowed.
maxValue - The right value of the right-most normal (non-overflow) bin. If NaN, the right-most point in the data is chosen. Infinity is not allowed.
dataTableColumn -
categorical -
Throws:
ChartConfigurationException - if dataTableColumn is nominal

EquidistantFixedBinCountBinning

public EquidistantFixedBinCountBinning(EquidistantFixedBinCountBinning other)
Copy ctor.

Method Detail

getBinCount

public int getBinCount()
Returns:
the binCount

setBinCount

public void setBinCount(int binCount)
Parameters:
binCount - the binCount to set

getMinValue

public double getMinValue()
Returns:
the minValue

setMinValue

public void setMinValue(double minValue)
Parameters:
minValue - the minValue to set

getMaxValue

public double getMaxValue()
Returns:
the maxValue

setMaxValue

public void setMaxValue(double maxValue)
Parameters:
maxValue - the maxValue to set

createGroupingModel

protected java.util.List<ValueRange> createGroupingModel(DataTable data,
                                                         double userDefinedUpperDimensionBound,
                                                         double userDefinedLowerDimensionBound)
Description copied from class: AbstractValueGrouping
Returns an up-to-date grouping model without cumulation applied. Does not need to implement caching, since this is handled in AbstractValueGrouping.

Specified by:
createGroupingModel in class AbstractValueGrouping

getGroupingType

public ValueGrouping.GroupingType getGroupingType()
Description copied from interface: ValueGrouping
Returns the type of the grouping, like Distinct values or Equal data fraction grouping.


clone

public ValueGrouping clone()
Specified by:
clone in interface ValueGrouping
Specified by:
clone in class AbstractValueGrouping

isAutoRanging

public boolean isAutoRanging()
Returns:
the autoRange

setAutoRange

public void setAutoRange(boolean autoRange)
Parameters:
autoRange - the autoRange to set

equals

public boolean equals(java.lang.Object obj)
Specified by:
equals in interface ValueGrouping
Specified by:
equals in class AbstractValueGrouping

definesUpperLowerBounds

public boolean definesUpperLowerBounds()
Description copied from interface: ValueGrouping
Returns true iff this ValueGrouping guarantees that each ValueRange in each possible resulting grouping model defines upper and lower bounds.



Copyright © 2001-2009 by Rapid-I