|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuk.ac.ed.inf.taweka.ArffProperties
public class ArffProperties
Contains the properties for a Weka ARFF file It contains: 1. the properties read from properties file 2. the path of the properties file itself 3. the name of the arff file including a timestamp 4. (optional) some statistics for the data (number of attributes, classes, instances.
| Field Summary | |
|---|---|
static java.lang.String |
ARFF_FILE_PATH_PROP
the file path where the ARFF file will be written, inclusive of file name. |
static java.lang.String |
CLASS_NAME_PROP
The class name. |
static java.lang.String |
DATA_PROPERTIES_FILE_PATH_PROP
the path to the properties file itself, from which the other properties were read |
static java.lang.String |
DATASET_NAME_PROP
the experiment short name |
static java.lang.String |
DESCRIPTION_PROP
|
static java.lang.String |
INSTANCE_ATTRIBUTE_QUERY_PROP
The query to get the attributes for each instance |
static java.lang.String |
INSTANCE_CLASS_QUERY_PROP
The query to get the class value for each instance |
static java.lang.String |
NUMBER_OF_ATTRIBUTES
the total number of possible attributes for the dataset |
static java.lang.String |
NUMBER_OF_CLASS_VALUES
the total number of possible class values for the dataset |
static int |
NUMBER_OF_CORE_PROPERTIES
the number of properties that should be available on the properties file (check) |
static java.lang.String |
NUMBER_OF_INSTANCES
the number of instances (rows) in the arff file |
static int |
NUMBER_OF_STATISTICS_PROPERTIES
the number of properties + number of data statistics (check: should be 9 + 3) |
static java.lang.String |
TIMESTAMP_FIELD
the timestamp field |
| Constructor Summary | |
|---|---|
ArffProperties(java.lang.String propertiesFilePath)
Constructor loads the properties from file |
|
| Method Summary | |
|---|---|
boolean |
checkPropertiesKeys(java.util.Properties props)
|
java.util.TreeSet<java.lang.String> |
coreKeys()
The core ARFF properties, essential to generate a Weka ARFF file |
boolean |
corePropertiesAreCorrect(java.util.Properties props)
|
java.lang.String |
getArffFilePath()
Get the path to the ARFF file |
uk.ac.ed.inf.utils.database.DbConn |
getDbConn()
|
java.util.Properties |
getProperties()
Get the properties |
java.lang.String |
getPropertiesFilePath()
Get the properties file path |
java.lang.String |
getProperty(java.lang.String propertyName)
Get a property value |
boolean |
initialisationIsCorrect()
|
boolean |
propertiesAreCorrect(java.util.Properties props)
|
java.util.TreeSet<java.lang.String> |
propertiesKeys()
All properties: core + statistics |
void |
saveStatisticsAsProperties(java.lang.String numberOfAttributes,
java.lang.String numberOfClassValues,
java.lang.String numberOfInstances)
|
void |
setInitialisation(boolean isCorrect)
|
java.util.TreeSet<java.lang.String> |
statisticsKeys()
The data statistics properties (number of attributes, classes, instances) added after the arff file generation |
boolean |
statsPropertiesAreCorrect(java.util.Properties props)
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String ARFF_FILE_PATH_PROP
public static final java.lang.String CLASS_NAME_PROP
public static final java.lang.String DATA_PROPERTIES_FILE_PATH_PROP
public static final java.lang.String DATASET_NAME_PROP
public static final java.lang.String DESCRIPTION_PROP
public static final java.lang.String INSTANCE_ATTRIBUTE_QUERY_PROP
public static final java.lang.String INSTANCE_CLASS_QUERY_PROP
public static final java.lang.String NUMBER_OF_ATTRIBUTES
public static final java.lang.String NUMBER_OF_CLASS_VALUES
public static final java.lang.String NUMBER_OF_INSTANCES
public static final int NUMBER_OF_CORE_PROPERTIES
public static final int NUMBER_OF_STATISTICS_PROPERTIES
public static final java.lang.String TIMESTAMP_FIELD
| Constructor Detail |
|---|
public ArffProperties(java.lang.String propertiesFilePath)
propertiesFilePath - the path to the properties file e.g.
/home/me/myexperiment.props| Method Detail |
|---|
public java.lang.String getArffFilePath()
public uk.ac.ed.inf.utils.database.DbConn getDbConn()
public java.util.Properties getProperties()
public java.lang.String getPropertiesFilePath()
public java.lang.String getProperty(java.lang.String propertyName)
propertyName - the name of the property (key)
public java.lang.String toString()
toString in class java.lang.Object
public void saveStatisticsAsProperties(java.lang.String numberOfAttributes,
java.lang.String numberOfClassValues,
java.lang.String numberOfInstances)
public java.util.TreeSet<java.lang.String> propertiesKeys()
public java.util.TreeSet<java.lang.String> coreKeys()
public java.util.TreeSet<java.lang.String> statisticsKeys()
public boolean checkPropertiesKeys(java.util.Properties props)
public boolean propertiesAreCorrect(java.util.Properties props)
public boolean corePropertiesAreCorrect(java.util.Properties props)
public boolean statsPropertiesAreCorrect(java.util.Properties props)
public boolean initialisationIsCorrect()
initialisationIsCorrect in interface Initialisationpublic void setInitialisation(boolean isCorrect)
setInitialisation in interface Initialisation
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||