|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.knime.base.data.statistics.StatisticsTable
Statistics2Table
@Deprecated public class StatisticsTable
A wrapper table that is able to compute statistics for each row The following moments are available:
DataTable
consider calling the
calculateAllMoments(ExecutionMonitor)
-method first for a faster
processing speed.
Constructor Summary | |
---|---|
protected |
StatisticsTable(DataTable table)
Deprecated. To be used in derived classes that do additional calculations. |
|
StatisticsTable(DataTable table,
ExecutionMonitor exec)
Deprecated. Create new wrapper table from an existing one. |
Method Summary | |
---|---|
protected void |
calculateAllMoments(double rowCount,
ExecutionMonitor exec)
Deprecated. Calculates all the statistical moments in one pass . |
protected void |
calculateAllMoments(ExecutionMonitor exec)
Deprecated. Calculates all the statistical moments in one pass . |
protected void |
calculateMomentInSubClass(DataRow row)
Deprecated. Derived classes may do additional calculations here. |
DataTableSpec |
getDataTableSpec()
Deprecated. Produces a DataTableSpec for the statistics table which contains the range values calculated here. |
double[] |
getdoubleMax()
Deprecated. Returns the maximum for all columns. |
double[] |
getdoubleMin()
Deprecated. Returns the minimum for all columns. |
DataCell[] |
getMax()
Deprecated. Returns the maximum for all columns. |
DataCell |
getMax(int colIdx)
Deprecated. Returns the maximum for the desired column. |
double[] |
getMean()
Deprecated. Returns the means for all columns. |
double |
getMean(int colIdx)
Deprecated. Returns the mean for the desired column. |
DataCell[] |
getMin()
Deprecated. Returns the minimum for all columns. |
DataCell |
getMin(int colIdx)
Deprecated. Returns the minimum for the desired column. |
int |
getNrRows()
Deprecated. Computes the number of rows of the data table. |
int[] |
getNumberMissingValues()
Deprecated. Returns an array of the number of missing values for each dimension. |
int |
getNumberMissingValues(int colIdx)
Deprecated. Returns the number of missing values for the given column index. |
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. |
protected DataTable |
getUnderlyingTable()
Deprecated. Getter for the underlying table. |
double[] |
getVariance()
Deprecated. Returns the variance for all columns. |
double |
getVariance(int colIdx)
Deprecated. Returns the variance for the desired column. |
RowIterator |
iterator()
Deprecated. Returns the row iterator of the original data table. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected StatisticsTable(DataTable table)
table
- To wrap.public StatisticsTable(DataTable table, ExecutionMonitor exec) throws CanceledExecutionException
table
- table to be wrappedexec
- an object to check with if user canceled operation
CanceledExecutionException
- if user canceledDataTable.getDataTableSpec()
Method Detail |
---|
public DataTableSpec getDataTableSpec()
getDataTableSpec
in interface DataTable
public RowIterator iterator()
iterator
in interface Iterable<DataRow>
iterator
in interface DataTable
DataRow
public int getNrRows()
protected DataTable getUnderlyingTable()
protected void calculateAllMoments(ExecutionMonitor exec) throws CanceledExecutionException
exec
- object to check with if user canceled the operation
CanceledExecutionException
- if user canceledprotected void calculateAllMoments(double rowCount, ExecutionMonitor exec) throws CanceledExecutionException
rowCount
- Row count of table for progress, may be NaN if unknown.exec
- object to check with if user canceled the operation
CanceledExecutionException
- if user canceled
IllegalArgumentException
- if rowCount argument < 0protected void calculateMomentInSubClass(DataRow row)
calculateAllMoments(ExecutionMonitor)
with
all of the rows.
row
- For processing.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 calculated
Double.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 calculated
Double.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 int[] getNumberMissingValues()
public int getNumberMissingValues(int colIdx)
colIdx
- column index to consider
public 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 calculated
Double.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 calculated
public double[] getStandardDeviation()
Double.NaN
) for column that are
not compatible to DoubleValue
.
public DataCell getMin(int colIdx)
colIdx
- the index of the column for which the minimum is calculated
public DataCell[] getMin()
public double[] getdoubleMin()
Double.NaN
for
columns that only contain missing cells or for empty data tables.
public DataCell getMax(int colIdx)
colIdx
- the index of the column for which the maximum is calculated
public DataCell[] getMax()
public double[] getdoubleMax()
Double.NaN
for
columns that only contain missing cells or for empty data tables.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |