Package smile.data.measure
Class OrdinalScale
java.lang.Object
smile.data.measure.CategoricalMeasure
smile.data.measure.OrdinalScale
- All Implemented Interfaces:
Serializable
,Measure
The ordinal type allows for rank order (1st, 2nd, 3rd, etc.) by which
data can be sorted, but still does not allow for relative degree of
difference between them. The psychological measurement, such as
measurement of opinions, usually operates on ordinal scales.
For example, 'completely agree', 'mostly agree', 'mostly disagree',
'completely disagree' when measuring opinion.
The median, i.e. middle-ranked, item is allowed as the measure of central tendency. But means and standard deviations have no validity. In particular, IQ scores reflect an ordinal scale, in which all scores are meaningful for comparison only. There is no absolute zero, and a 10-point difference may carry different meanings at different points of the scale.
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorDescriptionOrdinalScale
(int[] values, String[] levels) Constructor.OrdinalScale
(Class<? extends Enum<?>> clazz) Constructor.OrdinalScale
(String... levels) Constructor.OrdinalScale
(List<String> levels) Constructor. -
Method Summary
-
Constructor Details
-
OrdinalScale
Constructor.- Parameters:
levels
- the levels of ordinal values.
-
OrdinalScale
Constructor.- Parameters:
values
- the valid values.levels
- the levels of discrete values.
-
OrdinalScale
Constructor.- Parameters:
levels
- the levels of discrete values.
-
OrdinalScale
Constructor.- Parameters:
clazz
- an Enum class.
-
-
Method Details
-
toString
-
equals
- Overrides:
equals
in classCategoricalMeasure
-