ibm-research/WatsonxDocsQARetrieval huggingface dataset:
# Sample node #

You can use Sample nodes to select a subset of records for analysis, or to specify a proportion of records to discard\. A variety of sample types are supported, including stratified, clustered, and nonrandom (structured) samples\.

Sampling can be used for several reasons:

<!-- <ul> -->

 *  To improve performance by estimating models on a subset of the data\. Models estimated from a sample are often as accurate as those derived from the full dataset, and may be more so if the improved performance allows you to experiment with different methods you might not otherwise have attempted\.
 *  To select groups of related records or transactions for analysis, such as selecting all the items in an online shopping cart (or market basket), or all the properties in a specific neighborhood\.
 *  To identify units or cases for random inspection in the interest of quality assurance, fraud prevention, or security\.

<!-- </ul> -->

Note: If you simply want to partition your data into training and test samples for purposes of validation, a Partition node can be used instead\. See [Partition node](https://dataplatform.cloud.ibm.com/docs/content/wsd/nodes/partition.html#partition) for more information\.
<!-- </article "role="article" "> -->
# appendnode properties #

![Append node icon](https://dataplatform.cloud.ibm.com/docs/content/wsd/nodes/scripting_guide/clementine/images/appendnodeicon.png) The Append node concatenates sets of records\. It's useful for combining datasets with similar structures but different data\.

<!-- <table "summary="appendnode properties" class="defaultstyle" "> -->

appendnode properties  

Table 1\. appendnode properties

| `appendnode` properties | Data type        | Property description                                                                                                          |
| ----------------------- | ---------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| `match_by`              | `Position``Name` | You can append datasets based on the position of fields in the main data source or the name of fields in the input datasets\. |
| `match_case`            | *flag*           | Enables case sensitivity when matching field names\.                                                                          |
| `include_fields_from`   | `Main``All`      |                                                                                                                               |
| `create_tag_field`      | *flag*           |                                                                                                                               |
| `tag_field_name`        | *string*         |                                                                                                                               |

<!-- </table "summary="appendnode properties" class="defaultstyle" "> -->

<!-- </article "role="article" "> -->
# applyapriorinode properties #

You can use Apriori modeling nodes to generate an Apriori model nugget\. The scripting name of this model nugget is *applyapriorinode*\. For more information on scripting the modeling node itself, see [apriorinode properties](https://dataplatform.cloud.ibm.com/docs/content/wsd/nodes/scripting_guide/clementine/apriorinodeslots.html#apriorinodeslots)\.

<!-- <table "summary="applyapriorinode properties" id="apriorinuggetnodeslots__table_czw_jj3_cdb" class="defaultstyle" "> -->

applyapriorinode properties  

Table 1\. applyapriorinode properties

| `applyapriorinode` Properties | Values                                                  | Property description                                                                                                                             |
| ----------------------------- | ------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| `max_predictions`             | *number (integer)*                                      |                                                                                                                                                  |
| `ignore_unmatached`           | *flag*                                                  |                                                                                                                                                  |
| `allow_repeats`               | *flag*                                                  |                                                                                                                                                  |
| `check_basket`                | `NoPredictions``Predictions``NoCheck`                   |                                                                                                                                                  |
| `criterion`                   | `Confidence``Support``RuleSupport``Lift``Deployability` |                                                                                                                                                  |
| `enable_sql_generation`       | `udf``native`                                           | When using data from a database, SQL code can be pushed back to the database for execution, providing superior performance for many operations\. |

<!-- </table "summary="applyapriorinode properties" id="apriorinuggetnodeslots__table_czw_jj3_cdb" class="defaultstyle" "> -->

<!-- </article "role="article" "> -->
# applyautoclassifiernode properties #

You can use Auto Classifier modeling nodes to generate an Auto Classifier model nugget\. The scripting name of this model nugget is *applyautoclassifiernode*\. For more information on scripting the modeling node itself, see [autoclassifiernode properties](https://dataplatform.cloud.ibm.com/docs/content/wsd/nodes/scripting_guide/clementine/binaryclassifiernodeslots.html#binaryclassifiernodeslots)\.

<!-- <table "summary="applyautoclassifiernode properties" id="autoclassifiernuggetnodeslots__table_r5l_kj3_cdb" class="defaultstyle" "> -->

applyautoclassifiernode properties  

Table 1\. applyautoclassifiernode properties

| `applyautoclassifiernode` Properties | Values                                                                                                   | Property description                                                                                                                    |
| ------------------------------------ | -------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| `flag_ensemble_method`               | `Voting``ConfidenceWeightedVoting``RawPropensityWeightedVoting``HighestConfidence``AverageRawPropensity` | Specifies the method used to determine the ensemble score\. This setting applies only if the selected target is a flag field\.          |
| `flag_voting_tie_selection`          | `Random``HighestConfidence``RawPropensity`                                                               | If a voting method is selected, specifies how ties are resolved\. This setting applies only if the selected target is a flag field\.    |
| `set_ensemble_method`                | `Voting``ConfidenceWeightedVoting``HighestConfidence`                                                    | Specifies the method used to determine the ensemble score\. This setting applies only if the selected target is a set field\.           |
| `set_voting_tie_selection`           | `Random``HighestConfidence`                                                                              | If a voting method is selected, specifies how ties are resolved\. This setting applies only if the selected target is a nominal field\. |

<!-- </table "summary="applyautoclassifiernode properties" id="autoclassifiernuggetnodeslots__table_r5l_kj3_cdb" class="defaultstyle" "> -->

<!-- </article "role="article" "> -->
# applyautoclusternode properties #

You can use Auto Cluster modeling nodes to generate an Auto Cluster model nugget\. The scripting name of this model nugget is *applyautoclusternode*\. No other properties exist for this model nugget\. For more information on scripting the modeling node itself, see [autoclusternode properties](https://dataplatform.cloud.ibm.com/docs/content/wsd/nodes/scripting_guide/clementine/autoclusternodeslots.html#autoclusternodeslots)\.

<!-- </article "role="article" "> -->
# applyautonumericnode properties #

You can use Auto Numeric modeling nodes to generate an Auto Numeric model nugget\. The scripting name of this model nugget is *applyautonumericnode*\.For more information on scripting the modeling node itself, see [autonumericnode properties](https://dataplatform.cloud.ibm.com/docs/content/wsd/nodes/scripting_guide/clementine/rangepredictornodeslots.html#rangepredictornodeslots)\.

<!-- <table "summary="applyautonumericnode properties" id="autonumericnuggetnodeslots__table_lcn_nj3_cdb" class="defaultstyle" "> -->

applyautonumericnode properties  

Table 1\. applyautonumericnode properties

| `applyautonumericnode` Properties | Values | Property description |
| --------------------------------- | ------ | -------------------- |
| `calculate_standard_error`        | *flag* |                      |

<!-- </table "summary="applyautonumericnode properties" id="autonumericnuggetnodeslots__table_lcn_nj3_cdb" class="defaultstyle" "> -->

<!-- </article "role="article" "> -->
# Node properties overview #

Each type of node has its own set of legal properties, and each property has a type\. This type may be a general type—number, flag, or string—in which case settings for the property are coerced to the correct type\. An error is raised if they can't be coerced\. Alternatively, the property reference may specify the range of legal values, such as `Discard`, `PairAndDiscard`, and `IncludeAsText`, in which case an error is raised if any other value is used\. Flag properties should be read or set by using values of `true` and `false`\. (Variations including `Off`, `OFF`, `off`, `No`, `NO`, `no`, `n`, `N`, `f`, `F`, `false`, `False`, `FALSE`, or `0` are also recognized when setting values, but may cause errors when reading property values in some cases\. All other values are regarded as true\. Using `true` and `false` consistently will avoid any confusion\.) In this documentation's reference tables, the structured properties are indicated as such in the  Property description column, and their usage formats are provided\.

<!-- </article "role="article" "> -->
# balancenode properties #

![Balance node icon](https://dataplatform.cloud.ibm.com/docs/content/wsd/nodes/scripting_guide/clementine/images/balancenodeicon.png) The Balance node corrects imbalances in a dataset, so it conforms to a specified condition\. The balancing directive adjusts the proportion of records where a condition is true by the factor specified\.

<!-- <table "summary="balancenode properties" id="balancenodeslots__table_zvt_pj3_cdb" class="defaultstyle" "> -->

balancenode properties  

Table 1\. balancenode properties

| `balancenode` properties | Data type | Property description                                                                                                                 |
| ------------------------ | --------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| `directives`             |           | Structured property to balance proportion of field values based on number specified\.                                                |
| `training_data_only`     | *flag*    | Specifies that only training data should be balanced\. If no partition field is present in the stream, then this option is ignored\. |

<!-- </table "summary="balancenode properties" id="balancenodeslots__table_zvt_pj3_cdb" class="defaultstyle" "> -->

This node property uses the format:

\[\[ *number, string* \] \\ \[ *number, string*\] \\ \.\.\. \[*number, string* \]\]\.

Note: If strings (using double quotation marks) are embedded in the expression, they must be preceded by the escape character `" \ "`\. The `" \ "` character is also the line continuation character, which you can use to align the arguments for clarity\.
<!-- </article "role="article" "> -->
# applybayesnetnode properties #

You can use Bayesian network modeling nodes to generate a Bayesian network model nugget\. The scripting name of this model nugget is *applybayesnetnode*\. For more information on scripting the modeling node itself, see [bayesnetnode properties](https://dataplatform.cloud.ibm.com/docs/content/wsd/nodes/scripting_guide/clementine/bayesnetnodeslots.html#bayesnetnodeslots)\.

<!-- <table "summary="applybayesnetnode properties" class="defaultstyle" "> -->

applybayesnetnode properties  

Table 1\. applybayesnetnode properties

| `applybayesnetnode` Properties    | Values          | Property description                                                                                                                             |
| --------------------------------- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| `all_probabilities`               | *flag*          |                                                                                                                                                  |
| `raw_propensity`                  | *flag*          |                                                                                                                                                  |
| `adjusted_propensity`             | *flag*          |                                                                                                                                                  |
| `calculate_raw_propensities`      | *flag*          |                                                                                                                                                  |
| `calculate_adjusted_propensities` | *flag*          |                                                                                                                                                  |
| `enable_sql_generation`           | `false``native` | When using data from a database, SQL code can be pushed back to the database for execution, providing superior performance for many operations\. |

<!-- </table "summary="applybayesnetnode properties" class="defaultstyle" "> -->

<!-- </article "role="article" "> -->
# applyc50node properties #

You can use C5\.0 modeling nodes to generate a C5\.0 model nugget\. The scripting name of this model nugget is *applyc50node*\. For more information on scripting the modeling node itself, see [c50node properties](https://dataplatform.cloud.ibm.com/docs/content/wsd/nodes/scripting_guide/clementine/c50nodeslots.html#c50nodeslots)\.

<!-- <table "summary="applyc50node properties" id="c50nuggetnodeslots__table_xyy_xj3_cdb" class="defaultstyle" "> -->

applyc50node properties  

Table 1\. applyc50node properties

| `applyc50node` Properties         | Values                        | Property description                                                                                             |
| --------------------------------- | ----------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| `sql_generate`                    | `udf``Never``NoMissingValues` | Used to set SQL generation options during rule set execution\. The default value is `udf`\.                      |
| `calculate_conf`                  | *flag*                        | Available when SQL generation is enabled; this property includes confidence calculations in the generated tree\. |
| `calculate_raw_propensities`      | *flag*                        |                                                                                                                  |
| `calculate_adjusted_propensities` | *flag*                        |                                                                                                                  |

<!-- </table "summary="applyc50node properties" id="c50nuggetnodeslots__table_xyy_xj3_cdb" class="defaultstyle" "> -->

<!-- </article "role="article" "> -->
# applycarmanode properties #

You can use Carma modeling nodes to generate a Carma model nugget\. The scripting name of this model nugget is *applycarmanode*\. For more information on scripting the modeling node itself, see [carmanode properties](https://dataplatform.cloud.ibm.com/docs/content/wsd/nodes/scripting_guide/clementine/carmanodeslots.html#carmanodeslots)\.

<!-- <table "summary="applycarmanode properties" id="carmanuggetnodeslots__table_otk_dj3_cdb" class="defaultstyle" "> -->

applycarmanode properties  

Table 1\. applycarmanode properties

| `applycarmanode` Properties | Values        | Property description                                                                                                                             |
| --------------------------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| `enable_sql_generation`     | `udf``native` | When using data from a database, SQL code can be pushed back to the database for execution, providing superior performance for many operations\. |

<!-- </table "summary="applycarmanode properties" id="carmanuggetnodeslots__table_otk_dj3_cdb" class="defaultstyle" "> -->

<!-- </article "role="article" "> -->
# applycartnode properties #

You can use C&R Tree modeling nodes to generate a C&R Tree model nugget\. The scripting name of this model nugget is *applycartnode*\. For more information on scripting the modeling node itself, see [cartnode properties](https://dataplatform.cloud.ibm.com/docs/content/wsd/nodes/scripting_guide/clementine/cartnodeslots.html#cartnodeslots)\.

<!-- <table "summary="applycartnode properties" id="cartnuggetnodeslots__table_ffc_ck3_cdb" class="defaultstyle" "> -->

applycartnode properties  

Table 1\. applycartnode properties

| `applycartnode` Properties        | Values                                          | Property description                                                                                                                             |
| --------------------------------- | ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| `calculate_conf`                  | *flag*                                          | Available when SQL generation is enabled; this property includes confidence calculations in the generated tree\.                                 |
| `display_rule_id`                 | *flag*                                          | Adds a field in the scoring output that indicates the ID for the terminal node to which each record is assigned\.                                |
| `calculate_raw_propensities`      | *flag*                                          |                                                                                                                                                  |
| `calculate_adjusted_propensities` | *flag*                                          |                                                                                                                                                  |
| `sql_generate`                    | `Never``NoMissingValues``MissingValues``native` | When using data from a database, SQL code can be pushed back to the database for execution, providing superior performance for many operations\. |

<!-- </table "summary="applycartnode properties" id="cartnuggetnodeslots__table_ffc_ck3_cdb" class="defaultstyle" "> -->

<!-- </article "role="article" "> -->
# applychaidnode properties #

You can use CHAID modeling nodes to generate a CHAID model nugget\. The scripting name of this model nugget is *applychaidnode*\. For more information on scripting the modeling node itself, see [chaidnode properties](https://dataplatform.cloud.ibm.com/docs/content/wsd/nodes/scripting_guide/clementine/chaidnodeslots.html#chaidnodeslots)\.

<!-- <table "summary="applychaidnode properties" id="chaidnuggetnodeslots__table_s4j_dk3_cdb" class="defaultstyle" "> -->

applychaidnode properties  

Table 1\. applychaidnode properties

| `applychaidnode` Properties       | Values                                          | Property description                                                                                                                             |
| --------------------------------- | ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| `calculate_conf`                  | *flag*                                          |                                                                                                                                                  |
| `display_rule_id`                 | *flag*                                          | Adds a field in the scoring output that indicates the ID for the terminal node to which each record is assigned\.                                |
| `calculate_raw_propensities`      | *flag*                                          |                                                                                                                                                  |
| `calculate_adjusted_propensities` | *flag*                                          |                                                                                                                                                  |
| `sql_generate`                    | `Never``NoMissingValues``MissingValues``native` | When using data from a database, SQL code can be pushed back to the database for execution, providing superior performance for many operations\. |

<!-- </table "summary="applychaidnode properties" id="chaidnuggetnodeslots__table_s4j_dk3_cdb" class="defaultstyle" "> -->

<!-- </article "role="article" "> -->
# dvcharts properties #

![Charts node icon](https://dataplatform.cloud.ibm.com/docs/content/wsd/nodes/scripting_guide/clementine/images/chartsnodeicon.png)With the Charts node, you can launch the chart builder and create chart definitions to save with your flow\. Then when you run the node, chart output is generated\.

<!-- <table "summary="dvcharts properties" id="chartsnodeslots__table_x2s_ll3_cdb" class="defaultstyle" "> -->

dvcharts properties  

Table 1\. dvcharts properties

| `dvcharts` properties | Data type | Property description                                                                                                                           |
| --------------------- | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| `chart_definition`    | `list`    | List of chart definitions, including chart type (string), chart name (string), chart template (string), and used fields (list of field names), |

<!-- </table "summary="dvcharts properties" id="chartsnodeslots__table_x2s_ll3_cdb" class="defaultstyle" "> -->

<!-- </article "role="article" "> -->
# applycoxregnode properties #

You can use Cox modeling nodes to generate a Cox model nugget\. The scripting name of this model nugget is *applycoxregnode*\. For more information on scripting the modeling node itself, see [coxregnode properties](https://dataplatform.cloud.ibm.com/docs/content/wsd/nodes/scripting_guide/clementine/coxregnodeslots.html#coxregnodeslots)\.

<!-- <table "summary="applycoxregnode properties" id="coxregnuggetnodeslots__table_vcl_gbj_cdb" class="defaultstyle" "> -->

applycoxregnode properties  

Table 1\. applycoxregnode properties

| `applycoxregnode` Properties | Values              | Property description                                                                                                                             |
| ---------------------------- | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| `future_time_as`             | `Intervals``Fields` |                                                                                                                                                  |
| `time_interval`              | *number*            |                                                                                                                                                  |
| `num_future_times`           | *integer*           |                                                                                                                                                  |
| `time_field`                 | *field*             |                                                                                                                                                  |
| `past_survival_time`         | *field*             |                                                                                                                                                  |
| `all_probabilities`          | *flag*              |                                                                                                                                                  |
| `cumulative_hazard`          | *flag*              |                                                                                                                                                  |
| `enable_sql_generation`      | `false``native`     | When using data from a database, SQL code can be pushed back to the database for execution, providing superior performance for many operations\. |

<!-- </table "summary="applycoxregnode properties" id="coxregnuggetnodeslots__table_vcl_gbj_cdb" class="defaultstyle" "> -->

<!-- </article "role="article" "> -->
# dataassetexport properties #

![Data Asset Export node icon](https://dataplatform.cloud.ibm.com/docs/content/wsd/nodes/scripting_guide/clementine/images/dataassetexportnode.png)You can use the Data Asset Export node to write to remove data sources using connections, write to a data file on your local computer, or write data to a project\.

<!-- <table "summary="dataassetexport properties" class="defaultstyle" "> -->

dataassetexport properties  

Table 1\. dataassetexport properties

| `dataassetexport` properties | Data type | Property description                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| ---------------------------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `user_settings`              | *string*  | Escaped JSON string containing the interaction properties for the connection\. Contact IBM for details about available interaction points\.<br><br>Example:<br><br>`user_settings: "{\"interactionProperties\":{\"write_mode\":\"write\",\"file_name\":\"output.csv\",\"file_format\":\"csv\",\"quote_numerics\":true,\"encoding\":\"utf-8\",\"first_line_header\":true,\"include_types\":false}}"`<br><br>Note that these values will change based on the type of connection you're using\. |

<!-- </table "summary="dataassetexport properties" class="defaultstyle" "> -->

<!-- </article "role="article" "> -->
# dataassetimport properties #

![Data Asset Import node icon](https://dataplatform.cloud.ibm.com/docs/content/wsd/nodes/scripting_guide/clementine/images/dataassetnodeicon.png) You can use the Data Asset import node to pull in data from remote data sources using connections or from your local computer\.

<!-- <table "summary="dataassetimport properties" class="defaultstyle" "> -->

dataassetimport properties  

Table 1\. dataassetimport properties

| `dataassetimport` properties | Data type | Property description                                                                                                                                       |
| ---------------------------- | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `connection_path`            | string    | Name of the data asset (table) you want to access from a selected connection\. The value of this property is: `/asset_name` or `/schema_name/table_name`\. |

<!-- </table "summary="dataassetimport properties" class="defaultstyle" "> -->

<!-- </article "role="article" "> -->
# applydecisionlistnode properties #

You can use Decision List modeling nodes to generate a Decision List model nugget\. The scripting name of this model nugget is *applydecisionlistnode*\. For more information on scripting the modeling node itself, see [decisionlistnode properties](https://dataplatform.cloud.ibm.com/docs/content/wsd/nodes/scripting_guide/clementine/decisionlistnodeslots.html#decisionlistnodeslots)\.

<!-- <table "summary="applydecisionlistnode properties" id="decisionlistnuggetnodeslots__table_yky_kbj_cdb" class="defaultstyle" "> -->

applydecisionlistnode properties  

Table 1\. applydecisionlistnode properties

| `applydecisionlistnode` Properties | Values                | Property description                                                                                                                             |
| ---------------------------------- | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| `enable_sql_generation`            | *flag*                | When true, SPSS Modeler will try to push back the Decision List model to SQL\.                                                                   |
| `calculate_raw_propensities`       | *flag*                |                                                                                                                                                  |
| `calculate_adjusted_propensities`  | *flag*                |                                                                                                                                                  |
| `enable_sql_generation`            | `false``true``native` | When using data from a database, SQL code can be pushed back to the database for execution, providing superior performance for many operations\. |

<!-- </table "summary="applydecisionlistnode properties" id="decisionlistnuggetnodeslots__table_yky_kbj_cdb" class="defaultstyle" "> -->

<!-- </article "role="article" "> -->
# SuperNode properties #

The tables in this section describe properties that are specific to SuperNodes\. Note that common node properties also apply to SuperNodes\.

<!-- <table "summary="Terminal supernode properties" id="defining_slot_parameters_in_supernodes__table_epf_pbj_cdb" class="defaultstyle" "> -->

Terminal supernode properties  

Table 1\. Terminal supernode properties

| Property name    | Property type/List of values | Property description |
| ---------------- | ---------------------------- | -------------------- |
| `execute_method` | `Script``Normal`             |                      |
| `script`         | *string*                     |                      |

<!-- </table "summary="Terminal supernode properties" id="defining_slot_parameters_in_supernodes__table_epf_pbj_cdb" class="defaultstyle" "> -->

<!-- </article "role="article" "> -->
# applydiscriminantnode properties #

You can use Discriminant modeling nodes to generate a Discriminant model nugget\. The scripting name of this model nugget is *applydiscriminantnode*\. For more information on scripting the modeling node itself, see [discriminantnode properties](https://dataplatform.cloud.ibm.com/docs/content/wsd/nodes/scripting_guide/clementine/discriminantnodeslots.html#discriminantnodeslots)\.

<!-- <table "summary="applydiscriminantnode properties" id="discriminantnuggetnodeslots__table_ekg_tbj_cdb" class="defaultstyle" "> -->

applydiscriminantnode properties  

Table 1\. applydiscriminantnode properties

| `applydiscriminantnode` Properties | Values          | Property description                                                                                                                             |
| ---------------------------------- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| `calculate_raw_propensities`       | *flag*          |                                                                                                                                                  |
| `calculate_adjusted_propensities`  | *flag*          |                                                                                                                                                  |
| `enable_sql_generation`            | `false``native` | When using data from a database, SQL code can be pushed back to the database for execution, providing superior performance for many operations\. |

<!-- </table "summary="applydiscriminantnode properties" id="discriminantnuggetnodeslots__table_ekg_tbj_cdb" class="defaultstyle" "> -->

<!-- </article "role="article" "> -->
# distributionnode properties #

![Distribution node icon](https://dataplatform.cloud.ibm.com/docs/content/wsd/nodes/scripting_guide/clementine/images/distributionnodeicon.png)The Distribution node shows the occurrence of symbolic (categorical) values, such as mortgage type or gender\. Typically, you might use the Distribution node to show imbalances in the data, which you could then rectify using a Balance node before creating a model\.

<!-- <table "summary="distributionnode properties" id="distributionnodeslots__table_k1p_vbj_cdb" class="defaultstyle" "> -->

distributionnode properties  

Table 1\. distributionnode properties

| `distributionnode` properties | Data type                 | Property description |
| ----------------------------- | ------------------------- | -------------------- |
| `plot`                        | `SelectedFields``Flags`   |                      |
| `x_field`                     | *field*                   |                      |
| `color_field`                 | *field*                   | Overlay field\.      |
| `normalize`                   | *flag*                    |                      |
| `sort_mode`                   | `ByOccurence``Alphabetic` |                      |
| `use_proportional_scale`      | *flag*                    |                      |
| `use_grid`                    | *boolean*                 | Display gridlines\.  |

<!-- </table "summary="distributionnode properties" id="distributionnodeslots__table_k1p_vbj_cdb" class="defaultstyle" "> -->

<!-- </article "role="article" "> -->
# Flow script example: Training a neural net #

You can use a flow to train a neural network model when executed\. Normally, to test the model, you might run the modeling node to add the model to the flow, make the appropriate connections, and run an Analysis node\.

Using an  SPSS Modeler script, you can automate the process of testing the model nugget after you create it\. Following is an example:

    stream = modeler.script.stream()
    neuralnetnode = stream.findByType("neuralnetwork", None)
    results = []
    neuralnetnode.run(results)
    appliernode = stream.createModelApplierAt(results[0], "Drug", 594, 187)
    analysisnode = stream.createAt("analysis", "Drug", 688, 187)
    typenode = stream.findByType("type", None)
    stream.linkBetween(appliernode, typenode, analysisnode)
    analysisnode.run([])

The following bullets describe each line in this script example\.

<!-- <ul> -->

 *  The first line defines a variable that points to the current flow
 *  In line 2, the script finds the Neural Net builder node
 *  In line 3, the script creates a list where the execution results can be stored
 *  In line 4, the Neural Net model nugget is created\. This is stored in the list defined on line 3\.
 *  In line 5, a model apply node is created for the model nugget and placed on the flow canvas
 *  In line 6, an analysis node called `Drug` is created
 *  In line 7, the script finds the Type node
 *  In line 8, the script connects the model apply node created in line 5 between the Type node and the Analysis node
 *  Finally, the Analysis node runs to produce the Analysis report

<!-- </ul> -->

It's possible to use a script to build and run a flow from scratch, starting with a blank canvas\. To learn more about the scripting language in general, see [Scripting overview](https://dataplatform.cloud.ibm.com/docs/content/wsd/nodes/scripting_guide/clementine/using_scripting.html)\.

<!-- </article "role="article" "> -->
# extensionexportnode properties #

![Extension Export node icon](https://dataplatform.cloud.ibm.com/docs/content/wsd/nodes/scripting_guide/clementine/images/extensionexportnode.png)With the Extension Export node, you can run R or Python for Spark scripts to export data\.

<!-- <table "summary="extensionexportnode properties" class="defaultstyle" "> -->

extensionexportnode properties  

Table 1\. extensionexportnode properties

| `extensionexportnode` properties | Data type                         | Property description                                                                      |
| -------------------------------- | --------------------------------- | ----------------------------------------------------------------------------------------- |
| `syntax_type`                    | *R**Python*                       | Specify which script runs: R or Python (R is the default)\.                               |
| `r_syntax`                       | *string*                          | The R scripting syntax to run\.                                                           |
| `python_syntax`                  | *string*                          | The Python scripting syntax to run\.                                                      |
| `convert_flags`                  | `StringsAndDoubles LogicalValues` | Option to convert flag fields\.                                                           |
| `convert_missing`                | *flag*                            | Option to convert missing values to the R NA value\.                                      |
| `convert_datetime`               | *flag*                            | Option to convert variables with date or datetime formats to R date/time formats\.        |
| `convert_datetime_class`         | `POSIXct POSIXlt`                 | Options to specify to what format variables with date or datetime formats are converted\. |

<!-- </table "summary="extensionexportnode properties" class="defaultstyle" "> -->

<!-- </article "role="article" "> -->
# extensionimportnode properties #

![Extension Import node icon](https://dataplatform.cloud.ibm.com/docs/content/wsd/nodes/scripting_guide/clementine/images/extensionimportnode.png) With the Extension Import node, you can run R or Python for Spark scripts to import data\.

<!-- <table "summary="extensionimportnode properties" class="defaultstyle" "> -->

extensionimportnode properties  

Table 1\. extensionimportnode properties

| `extensionimportnode` properties | Data type   | Property description                                         |
| -------------------------------- | ----------- | ------------------------------------------------------------ |
| `syntax_type`                    | *R**Python* | Specify which script runs – R or Python (R is the default)\. |
| `r_syntax`                       | *string*    | The R scripting syntax to run\.                              |
| `python_syntax`                  | *string*    | The Python scripting syntax to run\.                         |

<!-- </table "summary="extensionimportnode properties" class="defaultstyle" "> -->

<!-- </article "role="article" "> -->
# extensionmodelnode properties #

![Extension Model node icon](https://dataplatform.cloud.ibm.com/docs/content/wsd/nodes/scripting_guide/clementine/images/extensionmodelnode.png)With the Extension Model node, you can run R or Python for Spark scripts to build and score results\.

Note that many of the properties and much of the information on this page is only applicable to SPSS Modeler Desktop streams\.

<!-- <table "summary="extensionmodelnode properties" class="defaultstyle" "> -->

extensionmodelnode properties  

Table 1\. extensionmodelnode properties

| `extensionmodelnode` Properties | Values                                   | Property description                                                                      |
| ------------------------------- | ---------------------------------------- | ----------------------------------------------------------------------------------------- |
| `syntax_type`                   | *R**Python*                              | Specify which script runs: R or Python (R is the default)\.                               |
| `r_build_syntax`                | *string*                                 | The R scripting syntax for model building\.                                               |
| `r_score_syntax`                | *string*                                 | The R scripting syntax for model scoring\.                                                |
| `python_build_syntax`           | *string*                                 | The Python scripting syntax for model building\.                                          |
| `python_score_syntax`           | *string*                                 | The Python scripting syntax for model scoring\.                                           |
| `convert_flags`                 | `StringsAndDoubles`  <br>`LogicalValues` | Option to convert flag fields\.                                                           |
| `convert_missing`               | *flag*                                   | Option to convert missing values to R NA value\.                                          |
| `convert_datetime`              | *flag*                                   | Option to convert variables with date or datetime formats to R date/time formats\.        |
| `convert_datetime_class`        | `POSIXct`  <br>  <br>`POSIXlt`  <br>     | Options to specify to what format variables with date or datetime formats are converted\. |
| `output_html`                   | *flag*                                   | Option to display graphs in the R model nugget\.                                          |
| `output_text`                   | *flag*                                   | Option to write R console text output to the R model nugget\.                             |

<!-- </table "summary="extensionmodelnode properties" class="defaultstyle" "> -->

<!-- </article "role="article" "> -->
# applyextension properties #

You can use Extension Model nodes to generate an Extension model nugget\. The scripting name of this model nugget is *applyextension*\. For more information on scripting the modeling node itself, see [extensionmodelnode properties](https://dataplatform.cloud.ibm.com/docs/content/wsd/nodes/scripting_guide/clementine/extensionmodelnodeslots.html#extensionmodelnodeslots)\.

<!-- <table "summary="applyextension properties" class="defaultstyle" "> -->

applyextension properties  

Table 1\. applyextension properties

| `applyextension` Properties | Values                                   | Property Description                                                                      |
| --------------------------- | ---------------------------------------- | ----------------------------------------------------------------------------------------- |
| `r_syntax`                  | *string*                                 | R scripting syntax for model scoring\.                                                    |
| `python_syntax`             | *string*                                 | Python scripting syntax for model scoring\.                                               |
| `use_batch_size`            | *flag*                                   | Enable use of batch processing\.                                                          |
| `batch_size`                | *integer*                                | Specify the number of data records to be included in each batch\.                         |
| `convert_flags`             | `StringsAndDoubles`  <br>`LogicalValues` | Option to convert flag fields\.                                                           |
| `convert_missing`           | *flag*                                   | Option to convert missing values to the R NA value\.                                      |
| `convert_datetime`          | *flag*                                   | Option to convert variables with date or datetime formats to R date/time formats\.        |
| `convert_datetime_class`    | `POSIXct`  <br>  <br>`POSIXlt`           | Options to specify to what format variables with date or datetime formats are converted\. |

<!-- </table "summary="applyextension properties" class="defaultstyle" "> -->

<!-- </article "role="article" "> -->