Applying Operations on Data in the Query Manager

Apply operations execute an operator selected by the user on the examples in the dataset. 

For example, you can compute the average of an attribute, which will then substitute the actual value in all patterns. When used together with grouping the apply operators may become very powerful.

 

Changes you make can be committed run-time or on request.

 

Procedure

  1. Drag and drop the attribute in any cell of the Apply column.


  2. Specify the operator to be used according to the type of the selected attribute.

  3. Click Ok.

The operators that can be used are the following:

 

Attribute type

Operator

Attribute type

Operator

Ordered attributes

  • Mean

  • Standard deviation

  • Median

  • Maximum

  • Minimum

  • Mode

  • Sum

  • Cumulative sum

  • Count (the number of examples)

  • Entropy

  • Enumerate

Nominal attributes

  • Mode

  • Maximum

  • Minimum

  • Entropy

  • Count (the number of examples)

  • Enumerate


Example

The following example is based on the Adult dataset.

 

Sample Datasets

Scenario data can be found in the Datasets folder in your Rulex installation.

 

The apply operation becomes very useful and powerful when coupled with groups, where the selected operation is computed for each group independently.

In the following example, the workclass attribute is grouped and subsequently the following apply operations are performed:

  • an apply operation on age that computes the average of that variable for each group,

  • an apply operation on fnlwgt that computes the number of patterns for each group (one of the few operators, along with Enumerate, that do not depend on the attribute on which they are computed) and

  • an apply operation on marital-status that computes the mode on that variable for each group.

This allows to discover, in a single view, for example that the majority of State-gov workers has no family, that the most represented group is that of Private workers (with 22696 elements) and that Without-pay (47.8 years) and Self-emp-inc (46.0 years) are the oldest workers.

 

Need to get in touch? https://www.rulex.ai/contact/ - Need a license renewal? https://rulex.atlassian.net/servicedesk/customer/user/login?destination=portals
© 2024 Rulex, Inc. All rights reserved.