|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectmulan.classifier.meta.HierarchyBuilder
public class HierarchyBuilder
Class that builds a hierarchy on flat lables of given mulltilabel data. The hierarchy may be built with three methods.
| Nested Class Summary | |
|---|---|
static class |
HierarchyBuilder.Method
The different types of distributing labels to children nodes |
| Constructor Summary | |
|---|---|
HierarchyBuilder(int partitions,
HierarchyBuilder.Method method)
Constructs a new istance based on given number of partitions and method |
|
| Method Summary | |
|---|---|
MultiLabelInstances |
buildHierarchy(MultiLabelInstances mlData)
Builds a hierarhical multi-label dataset. |
MultiLabelInstances |
buildHierarchyAndSaveFiles(MultiLabelInstances mlData,
String arffName,
String xmlName)
Builds the hierarchy and constructs auxiliary files |
LabelsMetaData |
buildLabelHierarchy(MultiLabelInstances mlData)
Builds a hierarhy of labels on top of the labels of a flat multi-label dataset, by recursively partitioning the labels into a specified number of partitions. |
static MultiLabelInstances |
createHierarchicalDataset(MultiLabelInstances mlData,
LabelsMetaData metaData)
Creates the hierarchical dataset according to the original multilabel instances object and the constructed label hierarchy |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HierarchyBuilder(int partitions,
HierarchyBuilder.Method method)
partitions - the number of partitionsmethod - the partitioning method| Method Detail |
|---|
public MultiLabelInstances buildHierarchy(MultiLabelInstances mlData)
throws Exception
mlData - the multiLabel data on which the new hierarchy will be built
Exception
public LabelsMetaData buildLabelHierarchy(MultiLabelInstances mlData)
throws Exception
mlData - the multiLabel data on with the new hierarchy will be built
Exception
public MultiLabelInstances buildHierarchyAndSaveFiles(MultiLabelInstances mlData,
String arffName,
String xmlName)
throws Exception
mlData - the flat training dataarffName - the name of the hierachical dataxmlName - the filename for the hirearchy
Exception
public static MultiLabelInstances createHierarchicalDataset(MultiLabelInstances mlData,
LabelsMetaData metaData)
throws InvalidDataFormatException
mlData - the original multilabel instancesmetaData - the metadata of the constructed label hierarchy
InvalidDataFormatException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||