ARMA model

fofo33fofo33 Member Posts: 1 Contributor I
edited November 2018 in Help
Hi dears,

I'm trying to perform an ARMA model. I have no problems with the AR part but I cannot understand how to realize the Moving average part.

The AR part described here is performed with the windowing block.

https://en.wikipedia.org/wiki/Autoregressive_model

But I have no idea within the Moving average part, described in the following link, is realized in the moving average block?

https://en.wikipedia.org/wiki/Autoregressive%E2%80%93moving-average_model


In summary, if I want to apply the ARMA model described in:

image

Is correct the following program?
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<process version="5.3.015">
  <context>
    <input/>
    <output/>
    <macros/>
  </context>
  <operator activated="true" class="process" compatibility="5.3.015" expanded="true" name="Process">
    <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"/>
    <parameter key="parallelize_main_process" value="false"/>
    <process expanded="true">
      <operator activated="true" class="generate_data" compatibility="5.3.015" expanded="true" height="60" name="Generate Data" width="90" x="447" y="210">
        <parameter key="target_function" value="sum"/>
        <parameter key="number_examples" value="200"/>
        <parameter key="number_of_attributes" value="2"/>
        <parameter key="attributes_lower_bound" value="-10.0"/>
        <parameter key="attributes_upper_bound" value="10.0"/>
        <parameter key="use_local_random_seed" value="false"/>
        <parameter key="local_random_seed" value="1992"/>
        <parameter key="datamanagement" value="double_array"/>
      </operator>
      <operator activated="true" class="series:windowing" compatibility="5.3.000" expanded="true" height="76" name="Windowing" width="90" x="581" y="210">
        <parameter key="series_representation" value="encode_series_by_examples"/>
        <parameter key="window_size" value="2"/>
        <parameter key="step_size" value="1"/>
        <parameter key="create_single_attributes" value="true"/>
        <parameter key="create_label" value="true"/>
        <parameter key="select_label_by_dimension" value="false"/>
        <parameter key="label_attribute" value="label"/>
        <parameter key="horizon" value="1"/>
        <parameter key="add_incomplete_windows" value="false"/>
        <parameter key="stop_on_too_small_dataset" value="true"/>
      </operator>
      <operator activated="true" class="series:moving_average" compatibility="5.3.000" expanded="true" height="76" name="Moving Average" width="90" x="715" y="210">
        <parameter key="attribute_name" value="label"/>
        <parameter key="window_width" value="3"/>
        <parameter key="aggregation_function" value="product"/>
        <parameter key="ignore_missings" value="false"/>
        <parameter key="result_position" value="end"/>
        <parameter key="window_weighting" value="Gaussian"/>
        <parameter key="keep_original_attribute" value="true"/>
      </operator>
      <operator activated="true" class="filter_examples" compatibility="5.3.015" expanded="true" height="76" name="Filter Examples" width="90" x="849" y="210">
        <parameter key="condition_class" value="no_missing_attributes"/>
        <parameter key="invert_filter" value="false"/>
      </operator>
      <operator activated="true" class="split_data" compatibility="5.3.015" expanded="true" height="94" name="Split Data" width="90" x="983" y="210">
        <enumeration key="partitions">
          <parameter key="ratio" value="0.65"/>
          <parameter key="ratio" value="0.35"/>
        </enumeration>
        <parameter key="sampling_type" value="linear sampling"/>
        <parameter key="use_local_random_seed" value="false"/>
        <parameter key="local_random_seed" value="1992"/>
      </operator>
      <operator activated="true" class="linear_regression" compatibility="5.3.015" expanded="true" height="94" name="Linear Regression" width="90" x="1117" y="120">
        <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="true" class="apply_model" compatibility="5.3.015" expanded="true" height="76" name="Apply Model" width="90" x="1251" y="210">
        <list key="application_parameters"/>
        <parameter key="create_view" value="false"/>
      </operator>
      <operator activated="true" class="performance_regression" compatibility="5.3.015" expanded="true" height="76" name="Performance" width="90" x="1318" y="75">
        <parameter key="main_criterion" value="first"/>
        <parameter key="root_mean_squared_error" value="false"/>
        <parameter key="absolute_error" value="false"/>
        <parameter key="relative_error" value="true"/>
        <parameter key="relative_error_lenient" value="false"/>
        <parameter key="relative_error_strict" value="false"/>
        <parameter key="normalized_absolute_error" value="false"/>
        <parameter key="root_relative_squared_error" value="false"/>
        <parameter key="squared_error" value="false"/>
        <parameter key="correlation" value="true"/>
        <parameter key="squared_correlation" value="false"/>
        <parameter key="prediction_average" value="false"/>
        <parameter key="spearman_rho" value="false"/>
        <parameter key="kendall_tau" value="false"/>
        <parameter key="skip_undefined_labels" value="true"/>
        <parameter key="use_example_weights" value="true"/>
      </operator>
      <connect from_op="Generate Data" from_port="output" to_op="Windowing" to_port="example set input"/>
      <connect from_op="Windowing" from_port="example set output" to_op="Moving Average" to_port="example set input"/>
      <connect from_op="Moving Average" 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="Split Data" to_port="example set"/>
      <connect from_op="Split Data" from_port="partition 1" to_op="Linear Regression" to_port="training set"/>
      <connect from_op="Split Data" from_port="partition 2" to_op="Apply Model" to_port="unlabelled data"/>
      <connect from_op="Linear Regression" from_port="model" to_op="Apply Model" to_port="model"/>
      <connect from_op="Apply Model" from_port="labelled data" to_op="Performance" to_port="labelled data"/>
      <connect from_op="Apply Model" from_port="model" to_port="result 2"/>
      <connect from_op="Performance" from_port="performance" to_port="result 3"/>
      <connect from_op="Performance" from_port="example set" to_port="result 1"/>
      <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"/>
      <portSpacing port="sink_result 4" spacing="0"/>
    </process>
  </operator>
</process>

Really, really thanks!  :D:D:D:D


Sign In or Register to comment.