The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here

How to use Process Windows operator?

frasaufrasau Member Posts: 9 Learner I
Hi,

I have a time series with two columns: time (hours/minutes/seconds) and frequency values.

The time attribute lasts 30 minutes.

I have to do frequency calculations based on 10-minute sequences of the total time.

I know it should be used the "Process Windows" operator to create windows, but I don't understand how to set the different parameters to get three 10-minute windows.

I have already read the operator's documentation, but I still don't understand.

Can you help me please?
Tagged:

Answers

  • hbajpaihbajpai Member Posts: 102 Unicorn
    Hey @frasau

    I have shared an XML of the process which I use typically to start the process windowing. The dataset I used is in sample datasets, time series > prices of gas station. The process by default aggerates from hourly to 3 hours and you can use this to build your own process.

    <?xml version="1.0" encoding="UTF-8"?><process version="9.7.000">
      <context>
        <input/>
        <output/>
        <macros/>
      </context>
      <operator activated="true" class="process" compatibility="9.4.000" 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"/>
        <process expanded="true">
          <operator activated="true" class="retrieve" compatibility="9.7.000" expanded="true" height="68" name="Retrieve Prices of Gas Station" width="90" x="112" y="34">
            <parameter key="repository_entry" value="//Samples/Time Series/data sets/Prices of Gas Station"/>
          </operator>
          <operator activated="true" class="generate_macro" compatibility="9.7.000" expanded="true" height="82" name="Generate Macro" width="90" x="313" y="34">
            <list key="function_descriptions">
              <parameter key="window size" value="3"/>
            </list>
          </operator>
          <operator activated="true" class="time_series:process_windows" compatibility="9.7.000" expanded="true" height="82" name="Process Windows" width="90" x="514" y="34">
            <parameter key="attribute_filter_type" value="all"/>
            <parameter key="attribute" value=""/>
            <parameter key="attributes" value=""/>
            <parameter key="use_except_expression" value="false"/>
            <parameter key="value_type" value="nominal"/>
            <parameter key="use_value_type_exception" value="false"/>
            <parameter key="except_value_type" value="time"/>
            <parameter key="block_type" value="single_value"/>
            <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="false"/>
            <parameter key="has_indices" value="true"/>
            <parameter key="indices_attribute" value="date"/>
            <parameter key="window_size" value="%{window size}"/>
            <parameter key="no_overlapping_windows" value="true"/>
            <parameter key="step_size" value="1"/>
            <parameter key="create_horizon_(labels)" value="false"/>
            <parameter key="horizon_attribute" value=""/>
            <parameter key="horizon_size" value="1"/>
            <parameter key="horizon_offset" value="0"/>
            <parameter key="add_last_index_in_window_attribute" value="true"/>
            <parameter key="enable_parallel_execution" value="true"/>
            <process expanded="true">
              <operator activated="true" class="time_series:extract_std_descriptive_features" compatibility="9.7.000" expanded="true" height="82" name="Extract Aggregates" width="90" x="112" y="34">
                <parameter key="attribute_filter_type" value="subset"/>
                <parameter key="attribute" value=""/>
                <parameter key="attributes" value="gas price / euro (times 1000)"/>
                <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="false"/>
                <parameter key="sum" value="false"/>
                <parameter key="mean" value="true"/>
                <parameter key="geometric_mean" value="false"/>
                <parameter key="first_quartile" value="false"/>
                <parameter key="median" value="false"/>
                <parameter key="third_quartile" value="false"/>
                <parameter key="min" value="false"/>
                <parameter key="max" value="false"/>
                <parameter key="std_deviation" value="false"/>
                <parameter key="kurtosis" value="false"/>
                <parameter key="skewness" value="false"/>
                <parameter key="add_time_series_name" value="true"/>
                <parameter key="ignore_invalid_values" value="true"/>
              </operator>
              <operator activated="true" class="time_series:differentiation" compatibility="9.7.000" expanded="true" height="68" name="Differentiate" width="90" x="313" y="187">
                <parameter key="attribute_filter_type" value="single"/>
                <parameter key="attribute" value="gas price / euro (times 1000)"/>
                <parameter key="attributes" value="Temperature / Fahrenheit"/>
                <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="false"/>
                <parameter key="overwrite_attributes" value="false"/>
                <parameter key="new_attributes_postfix" value="_differentiated"/>
                <parameter key="lag" value="1"/>
                <parameter key="differentiation_method" value="subtraction"/>
              </operator>
              <operator activated="true" class="time_series:extract_std_descriptive_features" compatibility="9.7.000" expanded="true" height="82" name="Extract Aggregates (2)" width="90" x="447" y="187">
                <parameter key="attribute_filter_type" value="single"/>
                <parameter key="attribute" value="gas price / euro (times 1000)_differentiated"/>
                <parameter key="attributes" value=""/>
                <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="false"/>
                <parameter key="sum" value="true"/>
                <parameter key="mean" value="false"/>
                <parameter key="geometric_mean" value="false"/>
                <parameter key="first_quartile" value="false"/>
                <parameter key="median" value="false"/>
                <parameter key="third_quartile" value="false"/>
                <parameter key="min" value="false"/>
                <parameter key="max" value="false"/>
                <parameter key="std_deviation" value="false"/>
                <parameter key="kurtosis" value="false"/>
                <parameter key="skewness" value="false"/>
                <parameter key="add_time_series_name" value="true"/>
                <parameter key="ignore_invalid_values" value="true"/>
              </operator>
              <operator activated="true" class="operator_toolbox:merge" compatibility="2.5.000" expanded="true" height="103" name="Merge Attributes" width="90" x="648" y="34">
                <parameter key="handling_of_duplicate_attributes" value="rename"/>
                <parameter key="handling_of_special_attributes" value="keep_first_special_other_regular"/>
                <parameter key="handling_of_duplicate_annotations" value="rename"/>
              </operator>
              <operator activated="true" class="subprocess" compatibility="9.7.000" expanded="true" height="82" name="Subprocess" width="90" x="782" y="34">
                <process expanded="true">
                  <operator activated="true" class="rename_by_replacing" compatibility="9.7.000" expanded="true" height="82" name="Rename by Replacing" width="90" x="45" y="34">
                    <parameter key="attribute_filter_type" value="all"/>
                    <parameter key="attribute" value=""/>
                    <parameter key="attributes" value=""/>
                    <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="false"/>
                    <parameter key="replace_what" value="\.mean"/>
                  </operator>
                  <operator activated="true" class="rename_by_replacing" compatibility="9.7.000" expanded="true" height="82" name="Rename by Replacing (2)" width="90" x="179" y="34">
                    <parameter key="attribute_filter_type" value="all"/>
                    <parameter key="attribute" value=""/>
                    <parameter key="attributes" value=""/>
                    <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="false"/>
                    <parameter key="replace_what" value="\.mode.*"/>
                  </operator>
                  <operator activated="true" class="rename" compatibility="9.7.000" expanded="true" height="82" name="Rename" width="90" x="313" y="34">
                    <parameter key="old_name" value="gas price / euro (times 1000)_differentiated.sum"/>
                    <parameter key="new_name" value="gas price / euro Differentiated sum"/>
                    <list key="rename_additional_attributes"/>
                  </operator>
                  <connect from_port="in 1" to_op="Rename by Replacing" to_port="example set input"/>
                  <connect from_op="Rename by Replacing" from_port="example set output" to_op="Rename by Replacing (2)" to_port="example set input"/>
                  <connect from_op="Rename by Replacing (2)" from_port="example set output" to_op="Rename" to_port="example set input"/>
                  <connect from_op="Rename" from_port="example set output" to_port="out 1"/>
                  <portSpacing port="source_in 1" spacing="0"/>
                  <portSpacing port="source_in 2" spacing="0"/>
                  <portSpacing port="sink_out 1" spacing="0"/>
                  <portSpacing port="sink_out 2" spacing="0"/>
                </process>
                <description align="center" color="transparent" colored="false" width="126">Renaming of the feature attributes&lt;br/&gt;</description>
              </operator>
              <connect from_port="windowed example set" to_op="Extract Aggregates" to_port="example set"/>
              <connect from_op="Extract Aggregates" from_port="features" to_op="Merge Attributes" to_port="example set 1"/>
              <connect from_op="Extract Aggregates" from_port="original" to_op="Differentiate" to_port="example set"/>
              <connect from_op="Differentiate" from_port="example set" to_op="Extract Aggregates (2)" to_port="example set"/>
              <connect from_op="Extract Aggregates (2)" from_port="features" to_op="Merge Attributes" to_port="example set 2"/>
              <connect from_op="Merge Attributes" from_port="merged set" to_op="Subprocess" to_port="in 1"/>
              <connect from_op="Subprocess" from_port="out 1" to_port="output 1"/>
              <portSpacing port="source_windowed example set" spacing="0"/>
              <portSpacing port="source_input 1" spacing="0"/>
              <portSpacing port="sink_output 1" spacing="0"/>
              <portSpacing port="sink_output 2" spacing="0"/>
            </process>
          </operator>
          <operator activated="true" class="append" compatibility="9.7.000" expanded="true" height="82" name="Append" width="90" x="648" y="34">
            <parameter key="datamanagement" value="double_array"/>
            <parameter key="data_management" value="auto"/>
            <parameter key="merge_type" value="all"/>
          </operator>
          <operator activated="true" class="subprocess" compatibility="9.7.000" expanded="true" height="82" name="Subprocess (2)" width="90" x="782" y="34">
            <process expanded="true">
              <operator activated="true" class="set_role" compatibility="9.7.000" expanded="true" height="82" name="Set Role" width="90" x="45" y="34">
                <parameter key="attribute_name" value="Last date in window"/>
                <parameter key="target_role" value="id"/>
                <list key="set_additional_roles"/>
              </operator>
              <operator activated="true" class="rename" compatibility="9.7.000" expanded="true" height="82" name="Rename (2)" width="90" x="179" y="34">
                <parameter key="old_name" value="Last date in window"/>
                <parameter key="new_name" value="DateTime"/>
                <list key="rename_additional_attributes"/>
              </operator>
              <connect from_port="in 1" to_op="Set Role" to_port="example set input"/>
              <connect from_op="Set Role" from_port="example set output" to_op="Rename (2)" to_port="example set input"/>
              <connect from_op="Rename (2)" from_port="example set output" to_port="out 1"/>
              <portSpacing port="source_in 1" spacing="0"/>
              <portSpacing port="source_in 2" spacing="0"/>
              <portSpacing port="sink_out 1" spacing="0"/>
              <portSpacing port="sink_out 2" spacing="0"/>
            </process>
            <description align="center" color="transparent" colored="false" width="126">Set role, rename and store&lt;br/&gt;</description>
          </operator>
          <connect from_op="Retrieve Prices of Gas Station" from_port="output" to_op="Generate Macro" to_port="through 1"/>
          <connect from_op="Generate Macro" from_port="through 1" to_op="Process Windows" to_port="example set"/>
          <connect from_op="Process Windows" from_port="output 1" to_op="Append" to_port="example set 1"/>
          <connect from_op="Append" from_port="merged set" to_op="Subprocess (2)" to_port="in 1"/>
          <connect from_op="Subprocess (2)" from_port="out 1" 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"/>
        </process>
      </operator>
    </process>
    


    Best,
    Harshit
  • frasaufrasau Member Posts: 9 Learner I
    thank you very much, now I understand!
Sign In or Register to comment.