I would like to inquire about the 'Prescriptive Optimization' operator settings
kimjk3559
Altair Community Member
Referring to the tutorial, I created the process as follows:
<?xml version="1.0" encoding="UTF-8"?><process version="10.1.002">
<context>
<input/>
<output/>
<macros/>
</context>
<operator activated="true" class="process" compatibility="10.1.002" expanded="true" name="Process" origin="GENERATED_TUTORIAL">
<parameter key="logverbosity" value="init"/>
<parameter key="random_seed" value="2001"/>
<parameter key="send_mail" value="never"/>
<parameter key="notification_email" value=""/>
<parameter key="process_duration_for_mail" value="30"/>
<parameter key="encoding" value="SYSTEM"/>
<process expanded="true">
<operator activated="true" class="read_excel" compatibility="10.1.002" expanded="true" height="68" name="Read Excel" width="90" x="179" y="34">
<parameter key="excel_file" value="C:\Users\kimjk\OneDrive\문서\RapidMiner\Local Repository\data\sw_hitec\sw_hitec.xlsx"/>
<parameter key="sheet_selection" value="sheet number"/>
<parameter key="sheet_number" value="1"/>
<parameter key="imported_cell_range" value="A1"/>
<parameter key="encoding" value="SYSTEM"/>
<parameter key="first_row_as_names" value="true"/>
<list key="annotations"/>
<parameter key="date_format" value=""/>
<parameter key="time_zone" value="SYSTEM"/>
<parameter key="locale" value="English (United States)"/>
<parameter key="read_all_values_as_polynominal" value="false"/>
<list key="data_set_meta_data_information">
<parameter key="0" value="Νο.false.integer.attribute"/>
<parameter key="1" value="A.true.real.attribute"/>
<parameter key="2" value="B.true.real.attribute"/>
<parameter key="3" value="C.true.real.attribute"/>
<parameter key="4" value="D.true.real.attribute"/>
<parameter key="5" value="kg.true.real.attribute"/>
<parameter key="6" value="kN.true.real.attribute"/>
</list>
<parameter key="read_not_matching_values_as_missings" value="false"/>
</operator>
<operator activated="true" breakpoints="after" class="blending:set_role" compatibility="10.1.002" expanded="true" height="82" name="Set Role" origin="GENERATED_TUTORIAL" width="90" x="313" y="34">
<list key="set_roles">
<parameter key="kg" value="metadata"/>
<parameter key="kN" value="metadata"/>
</list>
</operator>
<operator activated="true" class="multiply" compatibility="10.1.002" expanded="true" height="103" name="Multiply" width="90" x="447" y="34"/>
<operator activated="true" class="filter_example_range" compatibility="10.1.002" expanded="true" height="82" name="Filter Example Range (3)" width="90" x="648" y="34">
<parameter key="first_example" value="3"/>
<parameter key="last_example" value="3"/>
<parameter key="invert_filter" value="false"/>
</operator>
<operator activated="true" class="time_series:multi_label_model_learner" compatibility="10.1.000" expanded="true" height="82" name="Multi Label Modeling" origin="GENERATED_TUTORIAL" width="90" x="648" y="136">
<parameter key="attribute_filter_type" value="subset"/>
<parameter key="attribute" value=""/>
<parameter key="attributes" value="kg|kN"/>
<parameter key="use_except_expression" value="false"/>
<parameter key="value_type" value="attribute_value"/>
<parameter key="use_value_type_exception" value="false"/>
<parameter key="except_value_type" value="time"/>
<parameter key="block_type" value="attribute_block"/>
<parameter key="use_block_type_exception" value="false"/>
<parameter key="except_block_type" value="value_matrix_row_start"/>
<parameter key="invert_selection" value="false"/>
<parameter key="include_special_attributes" value="true"/>
<parameter key="add_macros" value="true"/>
<parameter key="current_label_name_macro" value="current_label_attribute"/>
<parameter key="current_label_type_macro" value="current_label_type"/>
<parameter key="enable_parallel_execution" value="true"/>
<process expanded="true">
<operator activated="true" class="branch" compatibility="10.1.002" expanded="true" height="103" name="Branch" origin="GENERATED_TUTORIAL" width="90" x="514" y="34">
<parameter key="condition_type" value="expression"/>
<parameter key="expression" value="contains(%{current_label_type},"nominal")"/>
<parameter key="io_object" value="ANOVAMatrix"/>
<parameter key="return_inner_output" value="true"/>
<process expanded="true">
<operator activated="true" class="filter_examples" compatibility="10.1.002" expanded="true" height="103" name="Filter Examples (2)" origin="GENERATED_TUTORIAL" width="90" x="179" y="34">
<parameter key="parameter_expression" value=""/>
<parameter key="condition_class" value="no_missing_labels"/>
<parameter key="invert_filter" value="false"/>
<list key="filters_list">
<parameter key="filters_entry_key" value="%{current_label_attribute}.is_not_missing."/>
</list>
<parameter key="filters_logic_and" value="true"/>
<parameter key="filters_check_metadata" value="true"/>
<description align="center" color="transparent" colored="false" width="126">As the GLM cannot handle missing label values, we remove these Examples</description>
</operator>
<operator activated="true" class="concurrency:parallel_decision_tree" compatibility="10.1.002" expanded="true" height="103" name="Decision Tree" origin="GENERATED_TUTORIAL" width="90" x="380" y="34">
<parameter key="criterion" value="gain_ratio"/>
<parameter key="maximal_depth" value="10"/>
<parameter key="apply_pruning" value="true"/>
<parameter key="confidence" value="0.1"/>
<parameter key="apply_prepruning" value="true"/>
<parameter key="minimal_gain" value="0.01"/>
<parameter key="minimal_leaf_size" value="2"/>
<parameter key="minimal_size_for_split" value="4"/>
<parameter key="number_of_prepruning_alternatives" value="3"/>
<description align="center" color="transparent" colored="false" width="126">Train a Decision Tree for the nominal label attributes<br/><br/>The warning can be ignored, cause in the Meta Data only one label attribute can be shown. This is in this case a numerical label attribute</description>
</operator>
<connect from_port="input 1" to_op="Filter Examples (2)" to_port="example set input"/>
<connect from_op="Filter Examples (2)" from_port="example set output" to_op="Decision Tree" to_port="training set"/>
<connect from_op="Decision Tree" from_port="model" to_port="input 1"/>
<portSpacing port="source_condition" spacing="0"/>
<portSpacing port="source_input 1" spacing="0"/>
<portSpacing port="source_input 2" spacing="0"/>
<portSpacing port="sink_input 1" spacing="0"/>
<portSpacing port="sink_input 2" spacing="0"/>
</process>
<process expanded="true">
<operator activated="true" class="blending:select_attributes" compatibility="10.1.002" expanded="true" height="82" name="Select Attributes (3)" origin="GENERATED_TUTORIAL" width="90" x="45" y="34">
<parameter key="type" value="include attributes"/>
<parameter key="attribute_filter_type" value="a subset"/>
<parameter key="select_attribute" value=""/>
<parameter key="select_subset" value="A␞B␞C␞D␞kg␞kN"/>
<parameter key="also_apply_to_special_attributes_(id,_label..)" value="false"/>
<description align="center" color="transparent" colored="false" width="126">Remove ID like attributes</description>
</operator>
<operator activated="true" class="filter_examples" compatibility="10.1.002" expanded="true" height="103" name="Filter Examples" origin="GENERATED_TUTORIAL" width="90" x="179" y="34">
<parameter key="parameter_expression" value=""/>
<parameter key="condition_class" value="no_missing_labels"/>
<parameter key="invert_filter" value="false"/>
<list key="filters_list">
<parameter key="filters_entry_key" value="%{current_label_attribute}.is_not_missing."/>
</list>
<parameter key="filters_logic_and" value="true"/>
<parameter key="filters_check_metadata" value="true"/>
<description align="center" color="transparent" colored="false" width="126">As the GLM cannot handle missing label values, we remove these Examples</description>
</operator>
<operator activated="true" class="multiply" compatibility="10.1.002" expanded="true" height="82" name="Multiply (2)" width="90" x="313" y="34"/>
<operator activated="true" class="h2o:generalized_linear_model" compatibility="10.1.000" expanded="true" height="124" name="Generalized Linear Model" origin="GENERATED_TUTORIAL" width="90" x="447" y="34">
<parameter key="family" value="AUTO"/>
<parameter key="link" value="family_default"/>
<parameter key="solver" value="AUTO"/>
<parameter key="reproducible" value="false"/>
<parameter key="maximum_number_of_threads" value="4"/>
<parameter key="use_regularization" value="true"/>
<parameter key="lambda_search" value="false"/>
<parameter key="number_of_lambdas" value="0"/>
<parameter key="lambda_min_ratio" value="0.0"/>
<parameter key="early_stopping" value="true"/>
<parameter key="stopping_rounds" value="3"/>
<parameter key="stopping_tolerance" value="0.001"/>
<parameter key="standardize" value="true"/>
<parameter key="non-negative_coefficients" value="false"/>
<parameter key="add_intercept" value="true"/>
<parameter key="compute_p-values" value="false"/>
<parameter key="remove_collinear_columns" value="false"/>
<parameter key="missing_values_handling" value="MeanImputation"/>
<parameter key="max_iterations" value="0"/>
<parameter key="specify_beta_constraints" value="false"/>
<list key="beta_constraints"/>
<parameter key="max_runtime_seconds" value="0"/>
<list key="expert_parameters"/>
<description align="center" color="transparent" colored="false" width="126">We train a GLM for the non-nominal attributes</description>
</operator>
<operator activated="false" class="linear_regression" compatibility="10.1.002" expanded="true" height="103" name="Linear Regression" width="90" x="380" y="238">
<parameter key="feature_selection" value="M5 prime"/>
<parameter key="alpha" value="0.05"/>
<parameter key="max_iterations" value="10"/>
<parameter key="forward_alpha" value="0.05"/>
<parameter key="backward_alpha" value="0.05"/>
<parameter key="eliminate_colinear_features" value="true"/>
<parameter key="min_tolerance" value="0.05"/>
<parameter key="use_bias" value="true"/>
<parameter key="ridge" value="1.0E-8"/>
</operator>
<operator activated="false" class="concurrency:parallel_decision_tree" compatibility="10.1.002" expanded="true" height="103" name="Decision Tree (2)" origin="GENERATED_TUTORIAL" width="90" x="380" y="340">
<parameter key="criterion" value="least_square"/>
<parameter key="maximal_depth" value="10"/>
<parameter key="apply_pruning" value="true"/>
<parameter key="confidence" value="0.1"/>
<parameter key="apply_prepruning" value="true"/>
<parameter key="minimal_gain" value="0.01"/>
<parameter key="minimal_leaf_size" value="2"/>
<parameter key="minimal_size_for_split" value="4"/>
<parameter key="number_of_prepruning_alternatives" value="3"/>
</operator>
<operator activated="false" class="h2o:deep_learning" compatibility="10.1.000" expanded="true" height="103" name="Deep Learning" width="90" x="380" y="442">
<parameter key="activation" value="Rectifier"/>
<enumeration key="hidden_layer_sizes">
<parameter key="hidden_layer_sizes" value="50"/>
<parameter key="hidden_layer_sizes" value="50"/>
</enumeration>
<enumeration key="hidden_dropout_ratios"/>
<parameter key="reproducible_(uses_1_thread)" value="false"/>
<parameter key="use_local_random_seed" value="false"/>
<parameter key="local_random_seed" value="1992"/>
<parameter key="epochs" value="10.0"/>
<parameter key="compute_variable_importances" value="false"/>
<parameter key="train_samples_per_iteration" value="-2"/>
<parameter key="adaptive_rate" value="true"/>
<parameter key="epsilon" value="1.0E-8"/>
<parameter key="rho" value="0.99"/>
<parameter key="learning_rate" value="0.005"/>
<parameter key="learning_rate_annealing" value="1.0E-6"/>
<parameter key="learning_rate_decay" value="1.0"/>
<parameter key="momentum_start" value="0.0"/>
<parameter key="momentum_ramp" value="1000000.0"/>
<parameter key="momentum_stable" value="0.0"/>
<parameter key="nesterov_accelerated_gradient" value="true"/>
<parameter key="standardize" value="true"/>
<parameter key="L1" value="1.0E-5"/>
<parameter key="L2" value="0.0"/>
<parameter key="max_w2" value="10.0"/>
<parameter key="loss_function" value="Automatic"/>
<parameter key="distribution_function" value="AUTO"/>
<parameter key="early_stopping" value="false"/>
<parameter key="stopping_rounds" value="1"/>
<parameter key="stopping_metric" value="AUTO"/>
<parameter key="stopping_tolerance" value="0.001"/>
<parameter key="missing_values_handling" value="MeanImputation"/>
<parameter key="max_runtime_seconds" value="0"/>
<list key="expert_parameters"/>
<list key="expert_parameters_"/>
</operator>
<connect from_port="input 1" to_op="Select Attributes (3)" to_port="example set input"/>
<connect from_op="Select Attributes (3)" from_port="example set output" to_op="Filter Examples" to_port="example set input"/>
<connect from_op="Filter Examples" from_port="example set output" to_op="Multiply (2)" to_port="input"/>
<connect from_op="Multiply (2)" from_port="output 1" to_op="Generalized Linear Model" to_port="training set"/>
<connect from_op="Generalized Linear Model" from_port="model" to_port="input 1"/>
<portSpacing port="source_condition" spacing="0"/>
<portSpacing port="source_input 1" spacing="0"/>
<portSpacing port="source_input 2" spacing="0"/>
<portSpacing port="sink_input 1" spacing="0"/>
<portSpacing port="sink_input 2" spacing="0"/>
</process>
<description align="center" color="transparent" colored="false" width="126">nominal / real label</description>
</operator>
<connect from_port="training set" to_op="Branch" to_port="input 1"/>
<connect from_op="Branch" from_port="input 1" to_port="model"/>
<portSpacing port="source_training set" spacing="0"/>
<portSpacing port="source_input 1" spacing="0"/>
<portSpacing port="sink_model" spacing="0"/>
<portSpacing port="sink_output 1" spacing="0"/>
</process>
</operator>
<operator activated="true" class="prescriptive_analytics:prescriptive_optimization" compatibility="0.1.006" expanded="true" height="124" name="Prescriptive Optimization (3)" width="90" x="849" y="34">
<parameter key="attribute_filter_type" value="subset"/>
<parameter key="attribute" value=""/>
<parameter key="attributes" value="|A|B|C|D"/>
<parameter key="use_except_expression" value="false"/>
<parameter key="value_type" value="numeric"/>
<parameter key="use_value_type_exception" value="false"/>
<parameter key="except_value_type" value="real"/>
<parameter key="block_type" value="value_series"/>
<parameter key="use_block_type_exception" value="false"/>
<parameter key="except_block_type" value="value_series_end"/>
<parameter key="invert_selection" value="false"/>
<parameter key="include_special_attributes" value="true"/>
<parameter key="optimization_method" value="Grid"/>
<parameter key="number_of_candidates" value="1"/>
<parameter key="method_for_start_values" value="input example"/>
<parameter key="reference_example_index" value="0"/>
<list key="configure_bounds">
<parameter key="kg" value="3\.0.3\.2"/>
<parameter key="kN" value="22\.0.25\.0"/>
<parameter key="A" value="25\.0.40\.0"/>
<parameter key="B" value="5\.0.11\.0"/>
<parameter key="C" value="10\.0.21\.0"/>
<parameter key="D" value="1\.0.4\.0"/>
</list>
<parameter key="use_interpolation_points_default" value="true"/>
<parameter key="number_of_interpolation_points" value="10"/>
<parameter key="max_evaluations" value="10000"/>
<parameter key="initial_radius" value="10.0"/>
<parameter key="stopping_radius" value="1.0E-8"/>
<parameter key="max_generations" value="100"/>
<parameter key="use_early_stopping" value="false"/>
<parameter key="generations_without_improval" value="2"/>
<parameter key="specify_population_size" value="true"/>
<parameter key="population_size" value="5"/>
<parameter key="keep_best" value="true"/>
<parameter key="mutation_type" value="gaussian_mutation"/>
<parameter key="selection_type" value="tournament"/>
<parameter key="tournament_fraction" value="0.25"/>
<parameter key="crossover_prob" value="0.9"/>
<parameter key="use_local_random_seed" value="false"/>
<parameter key="local_random_seed" value="1992"/>
<parameter key="show_convergence_plot" value="true"/>
<parameter key="steps" value="5"/>
<parameter key="sigma_factor" value="1.0"/>
<parameter key="stopping_threshold" value="0.001"/>
<parameter key="active_cma" value="true"/>
<parameter key="number_of_diagonal_iterations" value="0"/>
<parameter key="relative_stopping_threshold" value="0.001"/>
<process expanded="true">
<operator activated="true" class="apply_model" compatibility="10.1.002" expanded="true" height="82" name="Apply Model (5)" origin="GENERATED_TUTORIAL" width="90" x="246" y="34">
<list key="application_parameters"/>
</operator>
<operator activated="true" class="blending:generate_columns" compatibility="10.1.002" expanded="true" height="82" name="Generate Attributes (4)" width="90" x="447" y="34">
<list key="function_descriptions">
<parameter key="amount" value="kN - kg"/>
</list>
<parameter key="keep_all_columns" value="true"/>
</operator>
<operator activated="true" class="extract_performance" compatibility="10.1.002" expanded="true" height="82" name="Performance (5)" origin="GENERATED_TUTORIAL" width="90" x="648" y="34">
<parameter key="performance_type" value="data_value"/>
<parameter key="statistics" value="min"/>
<parameter key="attribute_name" value="amount"/>
<parameter key="example_index" value="1"/>
<parameter key="optimization_direction" value="maximize"/>
</operator>
<connect from_port="training set" to_op="Apply Model (5)" to_port="unlabelled data"/>
<connect from_port="in 1" to_op="Apply Model (5)" to_port="model"/>
<connect from_op="Apply Model (5)" from_port="labelled data" to_op="Generate Attributes (4)" to_port="table input"/>
<connect from_op="Generate Attributes (4)" from_port="table output" to_op="Performance (5)" to_port="example set"/>
<connect from_op="Performance (5)" from_port="performance" to_port="Performance Vector"/>
<portSpacing port="source_training set" spacing="0"/>
<portSpacing port="source_in 1" spacing="0"/>
<portSpacing port="source_in 2" spacing="0"/>
<portSpacing port="sink_Performance Vector" spacing="0"/>
</process>
</operator>
<connect from_op="Read Excel" from_port="output" to_op="Set Role" to_port="example set input"/>
<connect from_op="Set Role" from_port="example set output" to_op="Multiply" to_port="input"/>
<connect from_op="Multiply" from_port="output 1" to_op="Filter Example Range (3)" to_port="example set input"/>
<connect from_op="Multiply" from_port="output 2" to_op="Multi Label Modeling" to_port="training set"/>
<connect from_op="Filter Example Range (3)" from_port="example set output" to_op="Prescriptive Optimization (3)" to_port="example set input"/>
<connect from_op="Filter Example Range (3)" from_port="original" to_op="Prescriptive Optimization (3)" to_port="ref"/>
<connect from_op="Multi Label Modeling" from_port="model" to_op="Prescriptive Optimization (3)" to_port="in 1"/>
<connect from_op="Prescriptive Optimization (3)" from_port="exa" to_port="result 1"/>
<connect from_op="Prescriptive Optimization (3)" from_port="per" to_port="result 2"/>
<portSpacing port="source_input 1" spacing="0"/>
<portSpacing port="sink_result 1" spacing="0"/>
<portSpacing port="sink_result 2" spacing="0"/>
<portSpacing port="sink_result 3" spacing="0"/>
</process>
</operator>
</process>
To explain briefly:
The data is a multi-label model that predicts kg and kN values using four variable values from A to D.
What I ultimately want is to find the values of variables A~D that minimize the kg value and maximize the kN value
based on the learned model.
based on the learned model.
First, I loaded the data and then designated the label values as meta data.
After multiplying the data, one part created a model.
Actually, don't understand the remaining part, but I made it by following the tutorial. (filter example)
I connected the model and the above filter data to Prescriptive Optimization,
After assigning attributes A to D, I set the bounds of the variables.
Inside the operator, apply model and performance are connected.
Lastly, I used the generate attributes operator by specifying kN - kg = amount and maximizing the amount value.
However, when I run it, I see that only certain values are repeated.
Could you please confirm which part is wrong?
I think the simulator's optimization function and this Prescriptive Optimization operator will be very helpful to me.
thank you
Tagged:
0
Best Answer
-
Hi,I think you want to optimize prediction(kN)-prediction(kg). Because otherwise the values are just contant.Best,Martin0
Answers
-
Hi,I think you want to optimize prediction(kN)-prediction(kg). Because otherwise the values are just contant.Best,Martin0