|
|||||||||
前のクラス 次のクラス | フレームあり フレームなし | ||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.ObjectjAudioFeatureExtractor.ACE.DataTypes.SegmentedClassification
public class SegmentedClassification
Objects of this class each hold classifications for an instance. These classifications can be model classifications or the output of a classifier.
Each SegmentedClassification object may be divided into sections, each with its own class. If only overall classifications are needed for an instance, then there is no need for sub-sections, as each SegmentedClassification can have its own class(es). Each instance may be classified as belonging to one, multiple or no classes.
Meta-information can also be stored regarding each SegmentedClassification object.
Static methods are provided to extract the labels (both overall and for sub-sections) of DataSets based on SegmentedClassifications.
フィールドの概要 | |
---|---|
java.lang.String[] |
classifications
The class(es) that this top-level SegmentedClassification or section belongs to. |
java.lang.String |
identifier
The name of the dataset referred to by a top-level SegmentedClassification. |
java.lang.String[] |
misc_info_info
Can store various pieces of meta-data regarding a recording. |
java.lang.String[] |
misc_info_key
Stores titles identifying the meta-data in the misc_info_info field. |
java.lang.String |
role
Can be used internally by ACE to determine what a particular instance is for (e.g. training, testing, resulting classification of an unknown. |
double |
start
Identifies the start of a sub-classification. |
double |
stop
Identifies the end of a sub-classification. |
SegmentedClassification[] |
sub_classifications
Classifications corresponding to sub-sections of an instance. |
コンストラクタの概要 | |
---|---|
SegmentedClassification()
Generate an empty SegmentedClassification with the name "Undefined Segmented Classification". |
メソッドの概要 | |
---|---|
java.lang.String |
getClassificationDescription(int depth)
Generate a formatted strind detailing the contents of this SegmentedClassification. |
static java.lang.String |
getClassificationDescriptions(SegmentedClassification[] seg_classes)
Returns a formatted text description of the given SegmentedClassification objects. |
static java.lang.String[] |
getLeafClasses(SegmentedClassification[] seg_classes)
Returns an array containing the names of all classes that any instances or sub-sections of the given SegmentedClassification belong to. |
static int |
getNumberOverallInstancesBelongingToClass(SegmentedClassification[] model_classifications,
java.lang.String class_of_interest)
Returns the number of given instances that belong to the given class. |
static int |
getNumberSectionsInInstancesBelongingToClass(SegmentedClassification[] model_classifications,
java.lang.String class_of_interest)
Returns the number of given instances that have sections belonging to the given class. |
static java.lang.String[][] |
getOverallLabelsOfDataSets(DataSet[] data_sets,
SegmentedClassification[] set_classifications)
Returns a 2-D array describing the top-level label(s) of the given DataSets, according to the given SegmentedClassifications. |
static java.lang.String[][][] |
getSubSectionLabelsOfDataSets(DataSet[] data_sets,
SegmentedClassification[] set_classifications)
Returns a 3-D array describing the sub-section label(s) of the given DataSets, according to the given SegmentedClassifications. |
static java.lang.String |
getSuccessRate(SegmentedClassification[] models,
SegmentedClassification[] results)
Compares the given classifications with the given model classifications and returns a string describing the success rates (both false positives and faluse negatives) for overall instances and/or sections of instances, whichever is appropriate for the given data. |
static SegmentedClassification[] |
parseClassificationsFile(java.lang.String data_set_file_path)
Parses a classifications_file XML file and returns an array of SegmentedClassification objects holding its contents. |
static void |
saveClassifications(SegmentedClassification[] seg_classifications,
java.io.File to_save_to,
java.lang.String comments)
Saves a classifications_file XML file with the contents specified in the given SegmentedClassification array and the comments specified in the comments parameter. |
static boolean |
verifyUniquenessOfIdentifiers(SegmentedClassification[] seg_classes)
Verifies that none of the given set of SegmentedClassification refer to data sets with the same identifiers. |
クラス java.lang.Object から継承されたメソッド |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
フィールドの詳細 |
---|
public java.lang.String identifier
public java.lang.String[] classifications
public java.lang.String[] misc_info_info
public java.lang.String[] misc_info_key
public java.lang.String role
public SegmentedClassification[] sub_classifications
public double start
public double stop
コンストラクタの詳細 |
---|
public SegmentedClassification()
メソッドの詳細 |
---|
public java.lang.String getClassificationDescription(int depth)
depth
- How deep this SegmentedClassification is in a hierarchy
of SegmentedClassification (i.e. through the
sub_classifications field). This parameter should
generally be 0 when called externally, as this method
operates recursively.
public static java.lang.String getClassificationDescriptions(SegmentedClassification[] seg_classes)
seg_classes
- The classifications to describe.
public static int getNumberOverallInstancesBelongingToClass(SegmentedClassification[] model_classifications, java.lang.String class_of_interest)
model_classifications
- The model classifications to search
for the number of instances belonging
to the given class.class_of_interest
- The class to search for.
public static int getNumberSectionsInInstancesBelongingToClass(SegmentedClassification[] model_classifications, java.lang.String class_of_interest)
model_classifications
- The model classifications to search
for the number of instance sections
belonging to the given class.class_of_interest
- The class to search for.
public static java.lang.String[] getLeafClasses(SegmentedClassification[] seg_classes)
seg_classes
- The classifications whose classes are to be returned.
public static boolean verifyUniquenessOfIdentifiers(SegmentedClassification[] seg_classes)
seg_classes
- The SegmentedClassifications to verify the uniqueness of.
public static java.lang.String[][] getOverallLabelsOfDataSets(DataSet[] data_sets, SegmentedClassification[] set_classifications) throws java.lang.Exception
The returned array has a first dimension size equal to the number of data sets in the data_sets parameter. The first dimension will be set to null if the corresponding DataSet does not have a corresponding entry in the given SegmentedClassifications with the same identifier or if the classifications in the corresponding SegmentedClassifications entry are null.
data_sets
- The DataSets to find top-level labels for.set_classifications
- Model classifications.
java.lang.Exception
- An exception is thrown if the given
SegmentedClassification contain multiple
data sets with the same identifier.public static java.lang.String[][][] getSubSectionLabelsOfDataSets(DataSet[] data_sets, SegmentedClassification[] set_classifications) throws java.lang.Exception
The returned array has a first dimension size equal to the number of data sets in the data_sets parameter. The first dimension of the returned array will be set to null if the corresponding DataSet does not have a corresponding entry in the given SegmentedClassifications with the same identifier. The second dimension of the returned array will be null if there is no corresponding section is available in the set_classifications for the given section. The third dimension of the returned array will be null if no classifications are available in the corresponding SegmentedClassification for the given section.
data_sets
- The DataSets to find sub-section labels for.set_classifications
- Model classifications.
java.lang.Exception
- An exception is thrown if the given
SegmentedClassification contain multiple
data sets with the same identifier.public static java.lang.String getSuccessRate(SegmentedClassification[] models, SegmentedClassification[] results)
If an instance belongs to multiple classes in its model classifications, and only a fraction of these are found, then the calculation of the overall success rate will treat this as fractionally succesful.
The reported value for false positives includes wrong classifications as well as additional classifications beyond the correct ones (sincce a given instance may have an arbitrary number of correct classes).
models
- The model classifications.results
- The classifications to compare to the models.
public static SegmentedClassification[] parseClassificationsFile(java.lang.String data_set_file_path) throws java.lang.Exception
data_set_file_path
- The path of the XML file to parse.
java.lang.Exception
- Informative exceptions is thrown if an
invalid file or file path is specified.public static void saveClassifications(SegmentedClassification[] seg_classifications, java.io.File to_save_to, java.lang.String comments) throws java.lang.Exception
seg_classifications
- The SegmentedClassifications to save.to_save_to
- The file to save to.comments
- Any comments to be saved inside the
comments element of the XML file.
java.lang.Exception
- An informative exception is thrown if the
file cannot be saved.
|
|||||||||
前のクラス 次のクラス | フレームあり フレームなし | ||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |