Package adams.ml.data
Class DatasetInfo
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.ml.data.DatasetInfo
-
- All Implemented Interfaces:
LoggingSupporter
,SizeOfHandler
,Serializable
public class DatasetInfo extends LoggingObject
Contains information about the dataset structure but no actual data.- Version:
- $Revision$
- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Set<String>
m_ClassColumns
the class columns.protected Map<String,Collection<Cell.ContentType>>
m_ColumnTypes
the datatypes per column.protected Dataset
m_Header
the header.-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description DatasetInfo(Dataset data)
Initializes the dataset structure.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<String>
getClassColumns()
Returns the class columns.int
getColumnCount()
Returns the number of columns in the dataset.Collection<Cell.ContentType>
getColumnTypes(int col)
Returns the column types for the specified column.Collection<Cell.ContentType>
getColumnTypes(String colName)
Returns the column types for the specified column.Dataset
getHeader()
Returns the header.-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
-
-
-
Field Detail
-
m_Header
protected Dataset m_Header
the header.
-
m_ColumnTypes
protected Map<String,Collection<Cell.ContentType>> m_ColumnTypes
the datatypes per column.
-
-
Constructor Detail
-
DatasetInfo
public DatasetInfo(Dataset data)
Initializes the dataset structure.- Parameters:
data
- the data to get the info from
-
-
Method Detail
-
getHeader
public Dataset getHeader()
Returns the header.- Returns:
- the header
-
getColumnCount
public int getColumnCount()
Returns the number of columns in the dataset.- Returns:
- the number of columns
-
getColumnTypes
public Collection<Cell.ContentType> getColumnTypes(int col)
Returns the column types for the specified column.- Parameters:
col
- the column to get the types for- Returns:
- the types
-
getColumnTypes
public Collection<Cell.ContentType> getColumnTypes(String colName)
Returns the column types for the specified column.- Parameters:
colName
- the column to get the types for- Returns:
- the types
-
-