Mapping Variables

Mapping Variables

In Rubiscape, you can create, train, test, and publish models for further use in workbooks or workflows. For this, we configure a model using a dataset. When you publish a trained model, it appears in the model section under Model Studio or Machine Learning.

When you connect a reader (dataset) to a published model, you map the reader variables with the model variables. This mapping should occur according to the internal configuration of the model. If the configured variables are accurately mapped through the reader, the model is published successfully, and you get accurate results.

(info)

Notes:

  • Before mapping the reader and model variables, the model should be published.

  • The reader node should be joined to the model node.

  • Only the column name and variable type are mapped.

  • Actual values from the reader and model are not mapped since every reader contains a fresh set of values for a given variable.

For example, consider a published model Poisson_Regression and a reader BicycleCountData. The two nodes are connected to map the reader and model variables.

When you click the reader node, you see the Reader Properties in the right-hand pane.

The Data Fields contain a list of reader variables in the sequence they appear in the dataset. Thus, Date is the first reader variable, and BB_COUNT is the last variable in the sequence.


When you click the model node, you see the Model Properties in the right-hand pane.

In this pane, the radio buttons for the mapping options are available. These are

  • No Mapping/Default Mapping

  • Map By Name

  • Map By Sequence

You also see the variables present in the published model. (These variables are derived from the dataset used to train the model.)

For example, the model Poisson_Regression contains the following three variables.

  • HIGH_T

  • LOW_T

  • PRECIP

The dropdown for each model variable contains a sequential list of reader variables. This list is used for manual mapping of the reader variables with each model variable.


The table below describes the three types of Mapping Options.

Table: Description of Variable Mapping Options

Mapping Options

Description

Remark

No Mapping/ Default Mapping


It allows you manually map the reader and model variables.

  • This option is selected by default.
  • The reader and model variables are unmapped initially.
  • You can manually see the reader variables from the model variable dropdown to map the two types of variables one by one.
  • It is necessary to be careful while mapping the variables manually since incorrect mapping may adversely affect the model’s performance and accuracy.

Map By Name


It automatically maps the reader and model variables having the matching name.

  • This option maps the variable with matching names.
  • If no reader variable of the same name is available corresponding to a model variable, it remains unmapped.
  • Even a slight change in variable names leads to no mapping.
  • For example, column names PetalWidth and PetalWidth_1 cannot be mapped.

Map By Sequence

It automatically maps the model variables with the reader variables in the sequence in which they appear in the reader.

  • You can see the sequence of reader variables in Data Fields on exploring the reader.
  • For this mapping, the first variable in the reader gets mapped with the first model variable, the second with the second, and so on.
  • If the number of model variables is more than the number of reader variables, the excess model variables in the sequence remain unmapped.


(info)

Notes:

  • The options for mapping variables appear in the properties pane of only the published model. They do not appear on any other functionality, reader, or algorithm.

  • If you correctly map the reader variable with the model variable, the results are more accurate.

Mapping Options

There are three types of options for mapping reader variables to the model variables. These are

  • No Mapping/Default Mapping

  • Map By Name

  • Map By Sequence

The effect of these mapping options is shown below.

No Mapping/Default Mapping:

This option is selected by default. In this option, you see that none of the model variables are mapped to any reader variable.

However, you can click the model variable dropdown and map the reader variables from the list with each model variable.


(info)

Notes:

  • You cannot select a reader variable to be mapped with more than one model variable.

  • Once a reader variable is mapped with one model variable, that reader variable does not appear in the dropdown for the remaining model variables.

  • For example, we select/map LOW_T reader variable from HIGH_T model variable dropdown then, it will not appear in the drop down for the remaining two model variables LOW_T and PRECIP.

Map By Name:

When you select the Map By Name button, the reader variables are mapped with model variables possessing matching names. This mapping helps align the test data (reader) with the trained model.

For example, the reader variable PRECIP is mapped to the model variable PRECIP in the image below.

This mapping option yields no result if the names of model variables and reader variables are completely different.


Map By Sequence:

When you select the Map By Sequence option, the reader variables are sequentially mapped (in which they appear in the reader dataset) to the model variables.

For example, in the image below, the reader variable Date is mapped to the model variable HIGH_T, the reader variable HIGH_T to model variable LOW_T, and the reader variable LOW_T to the model variable PRECIP.

In this mapping option, if the number of model variables is more than the number of reader variables, the excess model variables remain unmapped.


    • Related Articles

    • Mapping Variables

      In Rubiscape, you can create, train, test, and publish models for further use in workbooks or workflows. For this, we configure a model using a dataset. When you publish a trained model, it appears in the model section under Model Studio or Machine ...
    • Geographical Variables

      In RubiSight, you can use Numerical, Textual, Interval, Categorical, and Geographical types of variables. Creating a Dataset with Geographical Variable Type To create a dataset containing a geographical variable type, follow the steps given below Add ...
    • Usage of Variables

      In Rubiscape, you can add a variable at the workbook or workflow level. Refer to Adding a Variable. Rubiscape provides variable support, that is, its usage, for all tasks anywhere in workbooks or workflows like creating a dataset, performing data ...
    • Usage of Variables

      In Rubiscape, you can add a variable at the workbook or workflow level. Refer to Adding a Variable. Rubiscape provides variable support, that is, its usage, for all tasks anywhere in workbooks or workflows like creating a dataset, performing data ...
    • Defining Your Own Variables

      Rubiscape provides the facility to declare a variable at the workbook level. You can add a variable, edit its value, and delete it when it is no longer required. You can use this variable in Custom Components and even in conditional task execution. ...