jbnc.dataset
Class DatasetInt
java.lang.Object
jbnc.dataset.Dataset
jbnc.dataset.DatasetInt
- public final class DatasetInt
- extends Dataset
Represents a data set of discreate values.
- Since:
- June 1, 1999
- Author:
- Jarek Sacha
- See Also:
NamesReader
,
DatasetReader
Method Summary |
java.lang.Object |
clone()
Performs a shallow copy of itself. |
void |
discardAllOfType(AttributeType type)
Discards all attributes that match the given type. |
void |
openC45(java.lang.String namesFile,
java.lang.String dataFile)
|
void |
saveCasesC45(java.lang.String fileName)
|
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DatasetInt
public DatasetInt()
- Default constructor.
DatasetInt
public DatasetInt(int[][] data,
AttributeSpecs[] attributeSpecs)
throws java.lang.Exception
- Set names to null. Initialize dataset with the array data .
- Parameters:
data
- Array of cases data[case][variable]attributeSpecs
- Specifications for attributes
- Throws:
java.lang.Exception
- Description of Exception
openC45
public void openC45(java.lang.String namesFile,
java.lang.String dataFile)
throws java.lang.Exception
- Overrides:
openC45
in class Dataset
- Parameters:
namesFile
- dataFile
-
- Throws:
java.lang.Exception
saveCasesC45
public void saveCasesC45(java.lang.String fileName)
throws java.lang.Exception
- Overrides:
saveCasesC45
in class Dataset
- Parameters:
fileName
-
- Throws:
java.lang.Exception
discardAllOfType
public void discardAllOfType(AttributeType type)
- Discards all attributes that match the given type. Removes columns from
the data set and entries from the names vector.
- Overrides:
discardAllOfType
in class Dataset
- Parameters:
type
- Type of attributes to be discarded.
clone
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
- Performs a shallow copy of itself. Member variables in the clone dataset
are references to variables in the parent dataset. Only primitive types
members, like boolean, are actually copied.
- Overrides:
clone
in class Dataset
- Returns:
- a clone of this dataset.
- Throws:
java.lang.CloneNotSupportedException