Package microsim.statistics.regression
Class MultiLogitRegression<T extends Enum<T>>
java.lang.Object
microsim.statistics.regression.MultiLogitRegression<T>
- All Implemented Interfaces:
MultipleChoiceRegression<T>
public class MultiLogitRegression<T extends Enum<T>>
extends Object
implements MultipleChoiceRegression<T>
-
Constructor Summary
ConstructorDescriptionMultiLogitRegression
(@NonNull Map<T, MultiKeyCoefficientMap> maps) MultiLogitRegression
(@NonNull Map<T, MultiKeyCoefficientMap> maps, @NonNull Random random) -
Method Summary
Modifier and TypeMethodDescriptionWarning - only use when MultiLogitRegression's maps field has values that are MultiKeyCoefficientMaps with only one key.eventType
(DoubleSource iDblSrc, Class<E> Regressors, Class<T> enumType) double
getLogitTransformOfScore
(T event, @NonNull Object individual) double
getLogitTransformOfScore
(T event, @NonNull Map<String, Double> values) Warning - only use when MultiLogitRegression's maps field has values that are MultiKeyCoefficientMaps with only one key.<E extends Enum<E>>
doublegetLogitTransformOfScore
(T event, @NonNull DoubleSource iDblSrc, @NonNull Class<E> Regressors)
-
Constructor Details
-
MultiLogitRegression
-
MultiLogitRegression
public MultiLogitRegression(@NonNull @NonNull Map<T, MultiKeyCoefficientMap> maps, @NonNull @NonNull Random random)
-
-
Method Details
-
getLogitTransformOfScore
public double getLogitTransformOfScore(@NonNull T event, @NonNull @NonNull Map<String, Double> values) Warning - only use when MultiLogitRegression's maps field has values that are MultiKeyCoefficientMaps with only one key. This method only looks at the first key of the MultiKeyCoefficientMap field of LinearRegression, so any other keys that are used to distinguish a unique multiKey (i.e. if the first key occurs more than once) will be ignored! If the first key of the multiKey appears more than once, the method would return an incorrect value, so will throw an exception.- Parameters:
values
-- Returns:
-
getLogitTransformOfScore
-
eventType
- Specified by:
eventType
in interfaceMultipleChoiceRegression<T extends Enum<T>>
-
eventType
Warning - only use when MultiLogitRegression's maps field has values that are MultiKeyCoefficientMaps with only one key. This method only looks at the first key of the MultiKeyCoefficientMap field of LinearRegression, so any other keys that are used to distinguish a unique multiKey (i.e. if the first key occurs more than once) will be ignored! If the first key of the multiKey appears more than once, the method would return an incorrect value, so will throw an exception.- Specified by:
eventType
in interfaceMultipleChoiceRegression<T extends Enum<T>>
- Parameters:
values
-- Returns:
-
getLogitTransformOfScore
public <E extends Enum<E>> double getLogitTransformOfScore(@NonNull T event, @NonNull @NonNull DoubleSource iDblSrc, @NonNull @NonNull Class<E> Regressors) -
eventType
-