Main Page | Class Hierarchy | Class List | Class Members

kddml.Operators.Preprocessing.SamplingAlgorithms.STRATIFIED_SAMPLING_RESOLVER Class Reference

Inheritance diagram for kddml.Operators.Preprocessing.SamplingAlgorithms.STRATIFIED_SAMPLING_RESOLVER:

kddml.Operators.Preprocessing.SamplingAlgorithms.SamplingAlgorithmResolverTask kddml.Operators.Preprocessing.PPAlgorithmResolverTask kddml.Operators.AlgorithmResolverTask List of all members.

Public Member Functions

void readParameters (Hashtable< String, KDDMLScalarManager > parameters) throws ResolverException, KDDMLCoreException
void readStatistics (DataStatisticsManager statistic) throws ResolverException, KDDMLCoreException
String getHistoryDescription ()
int[] campionate (Instances instances) throws ResolverException

Detailed Description

Settings class for the stratified sampling algorithm.
Given a dataset with n instances and a nominal attribute A, containing M distinct values, that divides the dataset into M mutually disjoint parts called strata, the stratified sampling applies a simple random sampling at each stratum using a with replacement or a without replacement policy, according to the parameter with replacement. This helps to ensure a representative sample, especially when the data are skewed.
The number of output instances for each nominal category can be given either in absolute form (using the parameter number_of_instances_per_category) or as a percentage (using the parameter percentage) with respect to the number of instances for that category.

Title: KDDML

Description: Knowledge Discovery in Database Environment

Copyright: Copyright (c) 2003-2005

Company: Universita' di Pisa - Dipartimento di Informatica

Author:
Andrea Romei (romei@di.unipi.it)

Sandra Zimei

Version:
2.0.16


Member Function Documentation

void kddml.Operators.Preprocessing.SamplingAlgorithms.STRATIFIED_SAMPLING_RESOLVER.readParameters Hashtable< String, KDDMLScalarManager parameters  )  throws ResolverException, KDDMLCoreException
 

Reads the XML parameters related to a generic algorithm stored in the ALGORITHM entity. An algorithm settings object captures the parameters associated with a particular algorithm. It allows a knowledgeable user to fine tune algorithm parameters. Generally, not all parameters must be specified, however, those specified are taken into account by the KDDML.
Parameters are given as hashtable, where the key is the name of the parameter related to the algorithm and the value is a KDDMLScalar object containing the parameter value. Parameter value is checked by the interpreter layer and its type is correct.

Parameters:
parameters Hashtable the parameters related to the algorithm. The key of the hashtable is the name of the parameter. The value of the hashtable is a KDDMLScalar representing the value of the parameter.
Exceptions:
ResolverException if a resolving error occurs.
KDDMLCoreException if a level core error occurs.

Implements kddml.Operators.AlgorithmResolverTask.

void kddml.Operators.Preprocessing.SamplingAlgorithms.STRATIFIED_SAMPLING_RESOLVER.readStatistics DataStatisticsManager  statistic  )  throws ResolverException, KDDMLCoreException
 

Reads the data statistics related to the preprocessing table.

Parameters:
statistic DataStatisticsManager
Exceptions:
ResolverException 
KDDMLCoreException 

Implements kddml.Operators.Preprocessing.SamplingAlgorithms.SamplingAlgorithmResolverTask.

String kddml.Operators.Preprocessing.SamplingAlgorithms.STRATIFIED_SAMPLING_RESOLVER.getHistoryDescription  )  [virtual]
 

Returns a description of the actions performed by this preprocessing algorithm. This description will be reported in the history related to the preprocessing data source.

Returns:
String
Exceptions:
KDDMLCoreException 

Implements kddml.Operators.Preprocessing.PPAlgorithmResolverTask.

int [] kddml.Operators.Preprocessing.SamplingAlgorithms.STRATIFIED_SAMPLING_RESOLVER.campionate Instances  instances  )  throws ResolverException
 

Main method that campionates the input set of instances given as weka.core.Instances. The method returns an array of indexes that refere to the input campioned instances.

Parameters:
instances Instances the input instances to be campioned.
Returns:
int[] the indexes of campioned instances.
Exceptions:
ResolverException if an error occurs.

Implements kddml.Operators.Preprocessing.SamplingAlgorithms.SamplingAlgorithmResolverTask.


Generated on Thu Feb 23 13:04:55 2006 for kddml by  doxygen 1.4.3