Assembly: ImslCS (in ImslCS.dll) Version: 6.5.0.0
Syntax
C# |
---|
[SerializableAttribute] public class UnsupervisedOrdinalFilter |
Visual Basic (Declaration) |
---|
<SerializableAttribute> _ Public Class UnsupervisedOrdinalFilter |
Visual C++ |
---|
[SerializableAttribute] public ref class UnsupervisedOrdinalFilter |
Remarks
Class UnsupervisedOrdinalFilter is designed to either encode or decode ordinal variables. Encoding consists of transforming the ordinal classes into percentages, with each percentage being equal to the percentage of the data at or below this class.
Ordinal Encoding
In this case, x is input to the method Encode and is filtered by converting each ordinal class value into a cumulative percentage.
For example, if x[]={2,1,3,4,2,4,1,1,3,3} then nClasses =4, and Encode returns the ordinal class designation with the cumulative percentages displayed in the following table. Cumulative percentages are equal to the percent of the data in this class or a lower class.
Ordinal Class | Frequency | Cumulative Percentage |
---|---|---|
1 | 3 | 30% |
2 | 2 | 50% |
3 | 3 | 80% |
4 | 2 | 100% |
Classes in x must be numbered from 1 to nClasses.
The values returned from encoding or decoding depend upon the setting of Transform. In this example, if the filter was constructed with Transform = TransformMethod.None, then the method Encode will return
If the filter was constructed with Transform = TransformMethod.Sqrt, then the square root of these values is returned; i.e.,
If the filter was constructed with Transform = TransformMethod.AsinSqrt, then the arcsin square root of these values is returned using the following calculation:
Ordinal Decoding
Ordinal decoding takes a transformed cumulative proportion and converts it into an ordinal class value.