2.2.22 rank

Brief Information

Rank data with user-specified thresholds

Command Line Usage

1. rank irng:=col(a) orng:=col(b);

2. rank irng:=col(1) from:=0 to:=3 method:=1 threshold:="0 0.5 0.6 1";

Variables

Display
Name
Variable
Name
I/O
and
Type
Default
Value
Description
Input irng

Input

Range

<active>

Specifies the input data range.

Number of Ranks interval

Input

double

2

This variable is available only when the method variable is set to 0. It is a positive integer that specifies the number of ranks or levels.

From from

Input

double

1

Specifies the first rank. For data points that belong to the first level, the rows in the destination range that correspond to these data points will be filled with the value of this variable.

To to

Input

double

2

Specifies the last rank. For data points that belong to the last level, the rows in the destination range that correspond to these data points will be filled with the value of this variable.

User Defined Thresholds method

Input

int

0

Specifies whether or not to use user-defined thresholds.

If this variable is 1, you can specify the user-defined thresholds in the Thresholds edit box, and the number of ranks is automatically calculated from the thresholds.

Thresholds threshold

Input

string

This variable is available only when the method variable is set to 1. It specifies the beginning values for the ranks/levels. The thresholds should be separated with space.

From Minimum Value min

Input

double

This variable is available only when the method variable is set to 0. It specifies the minimum value of the data points that will be ranked. Rows in the output range that correspond to data points less than this value will be set to missing. By default, the minimum value of the input data will be automatically used for this variable. If you want to specify another value, you can uncheck the Auto checkbox and then enter the value in the edit box.

To Maximum Value max

Input

double

This variable is available only when the method variable is set to 0. It specifies the maximum value of the data points that will be ranked. Rows in the output range that correspond to data points greater than this value will be set to missing. By default, the maximum value of the input data will be automatically used for this variable. If you want to specify another value, you can uncheck the Auto checkbox and then enter the value in the edit box.

Output orng

Output

Range

<new>

Specifies the destination for the output result.

See the syntax here.

Description

This X-Function can be used to decide whether some data points are within certain ranges.

The variables min, max and thresholds determine the ranges. Each data point in the input range is examined. If its value is within a certain range, the corresponding row in the output range will be filled with the rank/level for this range.


Keywords:ranking, classify, classification