Package ai.libs.jaicore.ml.metafeatures
Class GlobalCharacterizer
- java.lang.Object
-
- org.openml.webapplication.fantail.dc.Characterizer
-
- ai.libs.jaicore.ml.metafeatures.GlobalCharacterizer
-
- Direct Known Subclasses:
LandmarkerCharacterizer,NoProbingCharacterizer
public class GlobalCharacterizer extends org.openml.webapplication.fantail.dc.CharacterizerCharacterizer that applies a number of Characterizers to a data set. Uses probing. Adapted fromGlobalMetafeatures.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map<org.openml.webapplication.fantail.dc.Characterizer,java.lang.String>characterizerNamesThe names of the characterizers usedprotected java.util.ArrayList<org.openml.webapplication.fantail.dc.Characterizer>characterizersThe list of characterizers used in the computation of meta featuresprotected java.util.Map<java.lang.String,java.lang.Double>computationTimesThe time it took to compute the meta features for each characterizer by nameprotected static java.lang.StringCP_ASCprotected static java.lang.StringCP_DSprotected static java.lang.StringCP_IBKprotected static java.lang.StringCP_NBprotected java.lang.String[]idsThe names of all the meta features that are computed by this characterizerprotected static java.lang.StringPREPROCESSING_PREFIX
-
Constructor Summary
Constructors Constructor Description GlobalCharacterizer()Initializes a new characterizer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddLandmarkerCharacterizers(java.util.ArrayList<org.openml.webapplication.fantail.dc.Characterizer> characterizerList)protected voidaddNoProbingCharacterizers(java.util.ArrayList<org.openml.webapplication.fantail.dc.Characterizer> characterizerList)java.util.Map<java.lang.String,java.lang.Double>characterize(weka.core.Instances instances)java.util.Map<java.lang.String,java.util.List<java.lang.String>>getCharacterizerGroups()Gets the mapping of a Characterizer to the meta features it computes.java.util.List<java.lang.String>getCharacterizerNames()Gets the names of the used Characterizers.java.util.Map<org.openml.webapplication.fantail.dc.Characterizer,java.lang.String>getCharacterizerNamesMappings()Gets names for the used Characterizers.java.util.List<org.openml.webapplication.fantail.dc.Characterizer>getCharacterizers()Gets the list of characterizers used in the computation of meta features.java.lang.String[]getIDs()java.util.Map<java.lang.String,java.lang.Double>getMetaFeatureComputationTimes()Gets the time in milliseconds it took to compute each group of meta features (Computed by a Characterizer).protected voidinitializeCharacterizerNames()InitializescharacterizerNames.protected voidinitializeCharacterizers()Adds the required characterizers tocharacterizers.protected voidinitializeMetaFeatureIds()Initializesids.java.lang.StringtoString()
-
-
-
Field Detail
-
PREPROCESSING_PREFIX
protected static final java.lang.String PREPROCESSING_PREFIX
- See Also:
- Constant Field Values
-
CP_IBK
protected static final java.lang.String CP_IBK
- See Also:
- Constant Field Values
-
CP_NB
protected static final java.lang.String CP_NB
- See Also:
- Constant Field Values
-
CP_ASC
protected static final java.lang.String CP_ASC
- See Also:
- Constant Field Values
-
CP_DS
protected static final java.lang.String CP_DS
- See Also:
- Constant Field Values
-
ids
protected java.lang.String[] ids
The names of all the meta features that are computed by this characterizer
-
characterizers
protected java.util.ArrayList<org.openml.webapplication.fantail.dc.Characterizer> characterizers
The list of characterizers used in the computation of meta features
-
characterizerNames
protected java.util.Map<org.openml.webapplication.fantail.dc.Characterizer,java.lang.String> characterizerNames
The names of the characterizers used
-
computationTimes
protected java.util.Map<java.lang.String,java.lang.Double> computationTimes
The time it took to compute the meta features for each characterizer by name
-
-
Constructor Detail
-
GlobalCharacterizer
public GlobalCharacterizer() throws DatasetCharacterizerInitializationFailedExceptionInitializes a new characterizer. CallsinitializeCharacterizers(),initializeCharacterizerNames()andinitializeMetaFeatureIds()in order.- Throws:
DatasetCharacterizerInitializationFailedException- if the characterizer cannot be initialized properly
-
-
Method Detail
-
characterize
public java.util.Map<java.lang.String,java.lang.Double> characterize(weka.core.Instances instances)
- Specified by:
characterizein classorg.openml.webapplication.fantail.dc.Characterizer
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getCharacterizers
public java.util.List<org.openml.webapplication.fantail.dc.Characterizer> getCharacterizers()
Gets the list of characterizers used in the computation of meta features.- Returns:
- The characterizers
-
getMetaFeatureComputationTimes
public java.util.Map<java.lang.String,java.lang.Double> getMetaFeatureComputationTimes()
Gets the time in milliseconds it took to compute each group of meta features (Computed by a Characterizer). The computation times for the last time thatcharacterize(Instances)was called are returned. The time is NaN if the meta feature could not be computed.- Returns:
- The meta feature computation times
-
getCharacterizerNames
public java.util.List<java.lang.String> getCharacterizerNames()
Gets the names of the used Characterizers.- Returns:
- The names of the characterizers
-
getCharacterizerNamesMappings
public java.util.Map<org.openml.webapplication.fantail.dc.Characterizer,java.lang.String> getCharacterizerNamesMappings()
Gets names for the used Characterizers.- Returns:
- The used Characterizers mapped to their names
-
getCharacterizerGroups
public java.util.Map<java.lang.String,java.util.List<java.lang.String>> getCharacterizerGroups()
Gets the mapping of a Characterizer to the meta features it computes.- Returns:
- The mapping of Characterizer names to their meta features
-
getIDs
public java.lang.String[] getIDs()
- Specified by:
getIDsin classorg.openml.webapplication.fantail.dc.Characterizer
-
initializeCharacterizers
protected void initializeCharacterizers() throws java.lang.ExceptionAdds the required characterizers tocharacterizers.- Throws:
java.lang.Exception
-
addNoProbingCharacterizers
protected void addNoProbingCharacterizers(java.util.ArrayList<org.openml.webapplication.fantail.dc.Characterizer> characterizerList)
-
addLandmarkerCharacterizers
protected void addLandmarkerCharacterizers(java.util.ArrayList<org.openml.webapplication.fantail.dc.Characterizer> characterizerList) throws java.lang.Exception- Throws:
java.lang.Exception
-
initializeCharacterizerNames
protected void initializeCharacterizerNames()
InitializescharacterizerNames.
-
initializeMetaFeatureIds
protected void initializeMetaFeatureIds()
Initializesids.
-
-