com.rapidminer.operator.preprocessing.sampling
Class AbsoluteStratifiedSampling
java.lang.Object
com.rapidminer.operator.Operator
com.rapidminer.operator.AbstractExampleSetProcessing
com.rapidminer.operator.preprocessing.AbstractDataProcessing
com.rapidminer.operator.preprocessing.sampling.AbstractSamplingOperator
com.rapidminer.operator.preprocessing.sampling.AbstractStratifiedSampling
com.rapidminer.operator.preprocessing.sampling.AbsoluteStratifiedSampling
- All Implemented Interfaces:
- ConfigurationListener, PreviewListener, ParameterHandler, LoggingHandler
public class AbsoluteStratifiedSampling
- extends AbstractStratifiedSampling
Stratified sampling operator. This operator performs a random sampling of a
given size. In contrast to the simple sampling operator, this operator
performs a stratified sampling for data sets with nominal label attributes,
i.e. the class distributions remains (almost) the same after sampling. Hence,
this operator cannot be applied on data sets without a label or with a
numerical label. In these cases a simple sampling without stratification
is performed. In some cases it might happen that not the exact desired number
of examples is sampled, e.g. if the desired number is 100 from three qually distributed
classes the resulting number will be 99 (33 of each class).
- Author:
- Sebastian Land
|
Field Summary |
static java.lang.String |
PARAMETER_SAMPLE_SIZE
The parameter name for "The fraction of examples which should be sampled" |
|
Method Summary |
java.util.List<ParameterType> |
getParameterTypes()
Returns a list of ParameterTypes describing the parameters of
this operator. |
double |
getRatio(ExampleSet exampleSet)
This method should return the ratio used for stratifiedSampling |
| Methods inherited from class com.rapidminer.operator.Operator |
addError, addValue, addWarning, apply, checkDeprecations, checkForStop, checkIO, checkProperties, clearErrorList, cloneOperator, createExperimentTree, createExperimentTree, createFromXML, createMarkedExperimentTree, createMarkedProcessTree, createProcessTree, createProcessTree, getAddOnlyAdditionalOutput, getApplyCount, getDeliveredOutputClasses, getDeprecationInfo, getDesiredInputClasses, getEncoding, getErrorList, getExperiment, getInnerOperatorsXML, getInput, getInput, getInput, getInputDescription, getIOContainerForInApplyLoopBreakpoint, getIODescription, getLog, getName, getOperatorClassName, getOperatorDescription, getParameter, getParameterAsBoolean, getParameterAsColor, getParameterAsDouble, getParameterAsFile, getParameterAsFile, getParameterAsInputStream, getParameterAsInt, getParameterAsMatrix, getParameterAsString, getParameterList, getParameters, getParameterType, getParent, getProcess, getStartTime, getStatus, getUserDescription, getValue, getValues, getXML, hasBreakpoint, hasBreakpoint, hasInput, inApplyLoop, isDebugMode, isEnabled, isExpanded, isParallel, isParameterSet, log, logError, logNote, logWarning, performAdditionalChecks, processFinished, processStarts, register, registerOperator, remove, rename, resume, setApplyCount, setBreakpoint, setEnabled, setExpanded, setInput, setListParameter, setOperatorParameters, setParameter, setParameters, setParent, setUserDescription, toString, unregisterOperator, writeXML |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
PARAMETER_SAMPLE_SIZE
public static final java.lang.String PARAMETER_SAMPLE_SIZE
- The parameter name for "The fraction of examples which should be sampled"
- See Also:
- Constant Field Values
AbsoluteStratifiedSampling
public AbsoluteStratifiedSampling(OperatorDescription description)
getRatio
public double getRatio(ExampleSet exampleSet)
throws OperatorException
- Description copied from class:
AbstractStratifiedSampling
- This method should return the ratio used for stratifiedSampling
- Specified by:
getRatio in class AbstractStratifiedSampling
- Throws:
OperatorException
getParameterTypes
public java.util.List<ParameterType> getParameterTypes()
- Description copied from class:
Operator
- Returns a list of ParameterTypes describing the parameters of
this operator. The default implementation returns an empty list if no
input objects can be retained and special parameters for those input
objects which can be prevented from being consumed.
- Specified by:
getParameterTypes in interface ParameterHandler- Overrides:
getParameterTypes in class AbstractStratifiedSampling
Copyright © 2001-2009 by Rapid-I