Package edu.kit.mcda.core.normalization
Class AutoSoftmax
java.lang.Object
edu.kit.mcda.core.normalization.AbstractNormalization
edu.kit.mcda.core.normalization.AutoSoftmax
- All Implemented Interfaces:
DomainBounds
,Gain
,Invertible
A linear normalisation of values with bounds taken from
automatically computed bounds.
The values are normalised according to the minimum and maximum of values
of the specified criterion.
- Author:
- Tim Mueller
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionclone()
org.jdom2.Element
Export data structure to a XML node.double
Get the upper bound of the domain.double
Get the lower bound of the domain.double[]
getDomainRange
(Criterion _criterion) Get the actual range of the domain to which the values are normalised.getGain()
Get the type of the gain.boolean
Whether this domain bounds can be determined automatically or not.void
importFromXML
(org.jdom2.Element _masterNode) Imports the normalisation parameters from a specified XML node.boolean
boolean
boolean
double
Normalize a single values according to the values contained in the passed criterion.void
setAutoMaximum
(boolean autoMaximum) void
setAutoMinimum
(boolean autoMinimum) boolean
setDomainBounds
(double _minimum, double _maximum) Set the domain bounds.void
Set the type of the gain.void
setInverse
(boolean _inverse) void
updateDomainRange
(Criterion _criterion) Methods inherited from class edu.kit.mcda.core.normalization.AbstractNormalization
clearChanged, doNormalize, getNodeTag, getPlot, hasChanged, isHarmonise, normalize, normalize, rankIndex, rankIndex, rankValues, rankValues, setChanged, setHarmonise, toString
-
Constructor Details
-
AutoSoftmax
public AutoSoftmax()Beanstyle constructor of AbstractNormalizeFunction. No parameters required. Calls preInit(), init() and postInit();
-
-
Method Details
-
clone
- Specified by:
clone
in classAbstractNormalization
-
importFromXML
public void importFromXML(org.jdom2.Element _masterNode) Description copied from class:AbstractNormalization
Imports the normalisation parameters from a specified XML node.- Specified by:
importFromXML
in classAbstractNormalization
- Parameters:
_masterNode
- the XML node to import the paramters from
-
exportToXML
public org.jdom2.Element exportToXML()Export data structure to a XML node. Missing data, see class javadoc for details Returns null if an error occured during export- Specified by:
exportToXML
in classAbstractNormalization
- Returns:
- the master node where the data structure values are anchored
-
hasAutoBounds
public boolean hasAutoBounds()Description copied from interface:DomainBounds
Whether this domain bounds can be determined automatically or not.- Specified by:
hasAutoBounds
in interfaceDomainBounds
- Returns:
- true if bounds can be automatically determined
-
isAutoMinimum
public boolean isAutoMinimum()- Specified by:
isAutoMinimum
in interfaceDomainBounds
- Returns:
-
setAutoMinimum
public void setAutoMinimum(boolean autoMinimum) - Specified by:
setAutoMinimum
in interfaceDomainBounds
- Parameters:
autoMinimum
- the autoMinimum to set
-
isAutoMaximum
public boolean isAutoMaximum()- Specified by:
isAutoMaximum
in interfaceDomainBounds
- Returns:
- the autoMaximum
-
setAutoMaximum
public void setAutoMaximum(boolean autoMaximum) - Specified by:
setAutoMaximum
in interfaceDomainBounds
- Parameters:
autoMaximum
- the autoMaximum to set
-
isInverse
public boolean isInverse()- Specified by:
isInverse
in interfaceInvertible
- Returns:
- the inverse
-
setInverse
public void setInverse(boolean _inverse) - Specified by:
setInverse
in interfaceInvertible
- Parameters:
_inverse
- the inverse to set
-
getGain
Description copied from interface:Gain
Get the type of the gain. -
setGain
Description copied from interface:Gain
Set the type of the gain. -
getDomainMinimum
public double getDomainMinimum()Description copied from interface:DomainBounds
Get the lower bound of the domain.- Specified by:
getDomainMinimum
in interfaceDomainBounds
- Returns:
- the minimum
-
getDomainMaximum
public double getDomainMaximum()Description copied from interface:DomainBounds
Get the upper bound of the domain.- Specified by:
getDomainMaximum
in interfaceDomainBounds
- Returns:
- the maximum
-
setDomainBounds
public boolean setDomainBounds(double _minimum, double _maximum) Description copied from interface:DomainBounds
Set the domain bounds. Both values are set synchronous to allow consistency checks.- Specified by:
setDomainBounds
in interfaceDomainBounds
- Parameters:
_minimum
- the lower domain bound to be set_maximum
- the upper domain bound to be set- Returns:
- true if the domain bounds are valid, false otherwise
-
normalize
Description copied from class:AbstractNormalization
Normalize a single values according to the values contained in the passed criterion.- Specified by:
normalize
in classAbstractNormalization
- Parameters:
_criterion
- the criterion which is referred to for normalisation_value
- the value to be normalised- Returns:
- the normalised value according to the the values of the criterion
-
updateDomainRange
-
getDomainRange
Description copied from class:AbstractNormalization
Get the actual range of the domain to which the values are normalised. This is sometimes explicitly set and sometimes computed from the criteria values themselves.- Specified by:
getDomainRange
in classAbstractNormalization
- Parameters:
_criterion
- the criterion for which the domain range is requested- Returns:
- an array containing the lower and upper bound of the domain
-