Statistics3Table
@Deprecated public class Statistics2Table extends Object
Constructor and Description |
---|
Statistics2Table(BufferedDataTable table,
boolean computeMedian,
int numNomValuesOutput,
List<String> nominalValueColumns,
ExecutionContext exec)
Deprecated.
Create new statistic table from an existing one.
|
Modifier and Type | Method and Description |
---|---|
DataTable |
createNominalValueTable(List<String> nominal)
Deprecated.
Create nominal value table containing all possible values together with
their occurrences.
|
static DataTableSpec |
createOutSpecNominal(DataTableSpec inSpec,
List<String> nominalValues)
Deprecated.
Create spec containing only nominal columns in same order as the input
spec.
|
static DataTableSpec |
createOutSpecNumeric(DataTableSpec inSpec)
Deprecated.
Create spec containing only numeric columns in same order as the input
spec.
|
DataTable |
createStatisticMomentsTable()
Deprecated.
Creates a table of statistic moments such as minimum, maximum, mean,
standard deviation, variance, overall sum, no.
|
String[] |
extractNominalColumns(List<String> nominalValues)
Deprecated.
Returns an array of valid columns.
|
String[] |
getColumnNames()
Deprecated.
|
double[] |
getMax()
Deprecated.
Returns the maximum for all columns.
|
double[] |
getMean()
Deprecated.
Returns the means for all columns.
|
double |
getMean(int colIdx)
Deprecated.
Returns the mean for the desired column.
|
double[] |
getMedian()
Deprecated.
Returns the median for all columns.
|
double |
getMedian(int colIdx)
Deprecated.
Returns the median for the desired column.
|
double[] |
getMin()
Deprecated.
Returns the minimum for all columns.
|
Map<DataCell,Integer>[] |
getNominalValues()
Deprecated.
Returns an array (for each column) of mappings containing DataCell value
to number of occurrences.
|
Map<DataCell,Integer> |
getNominalValues(int colIdx)
Deprecated.
Returns a map containing DataCell value to number of occurrences.
|
double[] |
getNumberMissingValues()
Deprecated.
Returns an array of the number of missing values for each dimension.
|
double |
getNumberMissingValues(int colIdx)
Deprecated.
Returns the number of missing values for the given column index.
|
int |
getRowCount()
Deprecated.
|
double[] |
getStandardDeviation()
Deprecated.
Returns the standard deviation for all columns.
|
double |
getStandardDeviation(int colIdx)
Deprecated.
Calculates the standard deviation for the desired column.
|
double[] |
getSum()
Deprecated.
Returns the sum values for all columns.
|
double |
getSum(int colIdx)
Deprecated.
Returns the sum for the desired column.
|
double[] |
getVariance()
Deprecated.
Returns the variance for all columns.
|
double |
getVariance(int colIdx)
Deprecated.
Returns the variance for the desired column.
|
String |
getWarning()
Deprecated.
Returns warning message if number of possible values exceeds predefined
maximum.
|
static Statistics2Table |
load(NodeSettingsRO sett)
Deprecated.
Load a new statistic table by the given settings object.
|
void |
save(NodeSettingsWO sett)
Deprecated.
Saves this object to the given settings object.
|
public Statistics2Table(BufferedDataTable table, boolean computeMedian, int numNomValuesOutput, List<String> nominalValueColumns, ExecutionContext exec) throws CanceledExecutionException
table
- table to be wrappedcomputeMedian
- if the median has to be computednumNomValuesOutput
- number of possible values in output tablenominalValueColumns
- columns used to determine all poss. valuesexec
- an object to check with if user canceled operationCanceledExecutionException
- if user canceledpublic DataTable createStatisticMomentsTable()
public DataTable createNominalValueTable(List<String> nominal)
nominal
- value output tablepublic static DataTableSpec createOutSpecNumeric(DataTableSpec inSpec)
inSpec
- input specpublic static DataTableSpec createOutSpecNominal(DataTableSpec inSpec, List<String> nominalValues)
inSpec
- input specnominalValues
- used in map of co-occurrencespublic final String[] extractNominalColumns(List<String> nominalValues)
public String[] getColumnNames()
public double getMean(int colIdx)
Double.NaN
if the specified column contains only missing cells or
if the table is empty.colIdx
- the column index for which the mean is calculatedDouble.NaN
public double[] getMean()
Double.NaN
if the
column type is not of type DoubleValue
.Double.NaN
if the column type is not DoubleValue
public double getSum(int colIdx)
Double.NaN
if the specified column contains only missing cells or
if the table is empty.colIdx
- the column index for which the mean is calculatedDouble.NaN
public double[] getSum()
Double.NaN
if the
column type is not of type DoubleValue
.Double.NaN
if the column type is not DoubleValue
public double[] getNumberMissingValues()
public double getNumberMissingValues(int colIdx)
colIdx
- column index to considerpublic double getVariance(int colIdx)
DoubleValue
. Returns
Double.NaN
if the specified column contains only missing cells or
if the table is empty.colIdx
- the column index for which the variance is calculatedDouble.NaN
public double[] getVariance()
Double.NaN
if the
column type is not of type DoubleValue
, if the entire column
contains missing cells, or if the table is empty.public double getStandardDeviation(int colIdx)
DoubleValue
.
Will return zero if the column contains only missing cells or the table
was empty.colIdx
- the index of the column for which the standard deviation is
to be calculatedpublic double[] getStandardDeviation()
Double.NaN
) for column that are
not compatible to DoubleValue
.public double[] getMin()
Double.NaN
for
columns that only contain missing cells or for empty data tables.public double[] getMax()
Double.NaN
for
columns that only contain missing cells or for empty data tables.public double getMedian(int colIdx)
colIdx
- the column index for which the median is calculatedpublic double[] getMedian()
public int getRowCount()
public Map<DataCell,Integer> getNominalValues(int colIdx)
colIdx
- column index to return map forpublic Map<DataCell,Integer>[] getNominalValues()
public String getWarning()
public static Statistics2Table load(NodeSettingsRO sett) throws InvalidSettingsException
sett
- to load this table fromInvalidSettingsException
- if the settings are corruptpublic void save(NodeSettingsWO sett)
sett
- this object is saved to
KNIME GmbH, Konstanz, Germany
You may not modify, publish, transmit, transfer or sell, reproduce, create derivative works from, distribute, perform, display, or in any way exploit any of the content, in whole or in part, except as otherwise expressly permitted in writing by the copyright owner or as specified in the license file distributed with this product.