Workflow: Ranking values in a variable with the Rank block
Ian Balanzá-Davis
Altair Employee
The Rank block enables you to grade observations of numeric variables based on their values through a ranking order.
The following demonstrates how to use the Rank block to rank the values in the MockResult variable in an input dataset ExamResults.csv (which contains observations that describe a range of test scores from a school) based on how well each student performed in the test:
- Import the ExamResults.csv dataset onto a Workflow canvas using the Text File Import block.
- Expand the Data Preparation group in the Workflow palette, then click and drag a Rank block onto the Workflow canvas.
- Click the Output port of the ExamResults dataset block and drag a connection towards the Input port of the Rank block.
- Double-click the Rank block to display the Configure Rank dialog box.
- In the Configure Rank dialog box:
- In the Unselected Variables list, select MockResult.
- Click Select to move the variable to the Selected Variables list.
- Click OK to save the configuration and close the Configure Rank dialog box.
A green execution status is displayed in the Output ports of the Rank block and the new Working Dataset. The dataset contains the input ExamResults dataset with a new variable that represents the ranking of each observation.
0