public class LorenzVectorCalculator
extends java.lang.Object
FloatField
, IntegerField
and CardinalField
values are allowed for cardinal criteria. It is also checked if preference type for all considered
active condition cardinal criteria is gain.Modifier and Type | Method | Description |
---|---|---|
static MemoryContainer |
applyTo(MemoryContainer oldMemoryContainer) |
Transforms entire memory container by transforming every example.
|
static Example |
transform(int paretoExampleNumber,
MemoryContainer memoryContainer) |
Transforms example's evaluations from Pareto to Lorenz evaluation space.
|
public static Example transform(int paretoExampleNumber, MemoryContainer memoryContainer)
FloatField
, IntegerField
or CardinalField
).
All other values are skipped.CardinalField
or IntegerField
) or floating-point (implemented as FloatField
) numbers and,
additionally, if are greater than zero. It is also checked if preference type for all considered criteria is
equal to Attribute.GAIN
(so criteria's values may be added).
It is possible to mix CardinalField
and IntegerField
numbers but any mix of integer
and FloatField
values is prohibited.paretoExampleNumber
- number of example with evaluations defined in Pareto spacememoryContainer
- reference to memory container given examples belongs tojava.lang.NullPointerException
- when memory container is null
java.lang.IndexOutOfBoundsException
- when given example number is too small or too big for given memory containerInvalidTypeException
- when not all considered values are of the same type - integer or floating-pointInvalidValueException
- when memory container contains no attributes or no examples,
when any of the considered values is less than or equal to zero
(SIC! numeration of objects mentioned in error message starts from one)
or when preference type for any active conditional cardinal criterion is different than gainpublic static MemoryContainer applyTo(MemoryContainer oldMemoryContainer)
transform
method to transform each example from Pareto to Lorenz
evaluation space, it may also throw exceptions specified for that method.MemoryContainersDescriptions
class, this method automatically creates description of new (returned) memory container and stores it in
MemoryContainersDescriptions
class. When creating MemoryContainerDescription
object
for new (returned) memory container, information about how to convert ordinal values to cardinal values
and information about how to convert differences of evaluations on conditional cardinal criteria to the
degrees of the intensity of preference are set to null
. Evaluation space is set to
MemoryContainerDescription.LORENZ
and container type is set to the same value which was stored for
old memory container. Quantities of added minimal values for particular cardinal gain criteria in Lorenz evaluation space
are stored appropriately. Descriptions of the meanings of attributes from new memory container
differ from descriptions of the meanings of attributes from old memory container only for attributes
which are concerned during transformation to Lorenz evaluation space. These are attributes which are active,
conditional, cardinal (of type FloatField
, IntegerField
or CardinalField
)
and has gain preference type assigned. If old memory container is a PCT, then descriptions of concerned
attributes are set to AttributesMeaningsDescriptions.SUM_OF_MIN_PREFERENCE_INTENSITY_DEGREES
.
If old memory container is not a PCT (for example is a decision table), then descriptions of concerned
attributes are set to AttributesMeaningsDescriptions.SUM_OF_MIN_VALUES
.oldMemoryContainer
- memory container to convertjava.lang.NullPointerException
- when old memory container is null
,
when new attributes created in this method cannot be set in new (returned)
memory container
or when any of new examples created in this method cannot be added to new (returned) memory container,
which should generally not happen if this method works correctlyInvalidValueException
- when old memory container contains no attributes or no examples