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

Time Series Prediction Model by Kotu And Deshpande 2015

cosmicbeingcosmicbeing Member Posts: 4 Contributor I
edited November 2018 in Help
Time Series Prediction Model by Kotu And Deshpande 2015

I am trying to set up the Time Series Prediction model example that is found in Kotu/Deshpande - Predictive Analytics using Rapidminer - 2015

I got most of the model connected but I cannot find a few of the operators used in the article...

One operator it calls for is...Extract Example...that connects from the 2nd Window box and then output to the Filter Example box...

"Extract Example" operator is not in RMS v6.5...

Same with "Increase Date" operator...used for the Loop...not found.

Are there a suitable replacements for these operators for this particular Time Series example...?

BTW...thanks to the authors... One of the best descriptions on Time Series windowing I have read.

Now it would be really great if I can find the right operators to get this neat Time Series example working in Rapidminer...!

Thanks,
Robert
Tagged:

Answers

  • MartinLiebigMartinLiebig Administrator, Moderator, Employee-RapidMiner, RapidMiner Certified Analyst, RapidMiner Certified Expert, University Professor Posts: 3,533 RM Data Scientist
    I don't know those operators as well. But as you might know, operators can be renamed. Maybe this is a standard operator renamed to this.

    ~Martin
    - Sr. Director Data Solutions, Altair RapidMiner -
    Dortmund, Germany
  • haddockhaddock Member Posts: 849 Maven
    Hi there,

    I checked on the authors on Amazon and found

    Predictive Analytics and Data Mining: Concepts and Practice with RapidMiner Paperback – 3 Dec 2014

    So the example may be for an earlier version. The labels like "Extract Example" are unfamiliar to me also, so they probably have been renamed by the authors, whom you'll need to contact.

    H
  • cosmicbeingcosmicbeing Member Posts: 4 Contributor I
    Hi Martin and Haddock...

    Thanks to you both for your suggestions...

    Martin...any idea which "standard operators" would do the same thing as those specific two operators in the article...?

    I'm still a novice and am still learning what they all do and don't know which ones might work here.

    Haddock...the article I have is a PDF published by Elsevier - Copyright © 2015 Elsevier Inc.  That may be the same 2014 article as you listed or revised...and I would hope that the more recent one uses the latest RMStudio version...

    But the difference in operator names suggest it is using an older version of RMStudio.  Also...contacting the authors is a good suggestion as they seem to be still around...so I may try that later.

    In the meantime...to all... Has anyone else tried this Time Series model example  by Kotu/Deshpande and got it to work...?

    Or does anyone have other Time Series examples that I can try for RMStudio v6.5...?

    I was going to upload the two screens with the two specific operators that I need to find or replace for this Time Series example...

    But I see the "image" icon... with no way to upload any images...? Am I missing something here or are uploads not allowed?

    I also wanted to upload the Kotu/Deshpande article so others could try the example..but again could not find any file upload process?

    Thanks in advance for any help with this.
    Robert


  • haddockhaddock Member Posts: 849 Maven
    Haddock...the article I have is a PDF published by Elsevier - Copyright © 2015 Elsevier Inc.  That may be the same 2014 article as you listed or revised...and I would hope that the more recent one uses the latest RMStudio version...
    Perhaps, and perhaps not.
  • earmijoearmijo Member Posts: 271 Unicorn
    I downloaded the code. The "unusual" operator are renamed operators.

    1) Extract Example .. is an Extract Macro that extracts the number of examples.

    2) Increase Data is a "Generate Attributes" operator that defines the variable "Date" as date_add(Date, 1, DATE_UNIT_MONTH)

    Here's the code he uses:
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <process version="6.5.002">
      <context>
        <input/>
        <output/>
        <macros>
          <macro>
            <key>futureMonths</key>
            <value>15</value>
          </macro>
          <macro>
            <key>horizon</key>
            <value>1</value>
          </macro>
          <macro>
            <key>windowSize</key>
            <value>6</value>
          </macro>
        </macros>
      </context>
      <operator activated="true" class="process" compatibility="6.0.002" expanded="true" name="Process">
        <process expanded="true">
          <operator activated="true" breakpoints="after" class="read_csv" compatibility="6.0.003" expanded="true" height="60" name="Read CSV" width="90" x="45" y="30">
            <parameter key="csv_file" value="/Users/carlosqa/Downloads/Dec 15 2014/10_TimeS_10.2.1_simpleTS.csv"/>
            <parameter key="column_separators" value=","/>
            <parameter key="date_format" value="MM/dd/yyyy"/>
            <parameter key="first_row_as_names" value="false"/>
            <list key="annotations">
              <parameter key="0" value="Name"/>
            </list>
            <parameter key="encoding" value="windows-1252"/>
            <list key="data_set_meta_data_information">
              <parameter key="0" value="Date.true.date.attribute"/>
              <parameter key="1" value="inputYt.true.real.attribute"/>
            </list>
          </operator>
          <operator activated="true" class="set_role" compatibility="5.3.013" expanded="true" height="76" name="Set Role" width="90" x="179" y="30">
            <parameter key="attribute_name" value="Date"/>
            <parameter key="target_role" value="id"/>
            <list key="set_additional_roles"/>
          </operator>
          <operator activated="true" class="select_attributes" compatibility="6.5.002" expanded="true" height="76" name="Select Attributes" width="90" x="179" y="120">
            <parameter key="attribute_filter_type" value="subset"/>
            <parameter key="attributes" value="inputYt"/>
          </operator>
          <operator activated="true" class="filter_examples" compatibility="6.4.000" expanded="true" height="94" name="Filter Examples" width="90" x="179" y="210">
            <parameter key="condition_class" value="no_missing_attributes"/>
            <list key="filters_list"/>
          </operator>
          <operator activated="true" breakpoints="after" class="series:windowing" compatibility="5.2.000" expanded="true" height="76" name="Windowing for Training" width="90" x="380" y="30">
            <parameter key="window_size" value="%{windowSize}"/>
            <parameter key="create_label" value="true"/>
            <parameter key="label_attribute" value="inputYt"/>
            <parameter key="horizon" value="%{horizon}"/>
          </operator>
          <operator activated="true" class="series:windowing" compatibility="5.2.000" expanded="true" height="76" name="Windowing for Application" width="90" x="380" y="120">
            <parameter key="window_size" value="%{windowSize}"/>
            <parameter key="label_attribute" value="inputYt"/>
          </operator>
          <operator activated="true" class="vector_linear_regression" compatibility="6.5.002" expanded="true" height="76" name="Vector Linear Regression" width="90" x="514" y="30"/>
          <operator activated="true" class="extract_macro" compatibility="6.5.002" expanded="true" height="60" name="Extract Example Count" width="90" x="380" y="210">
            <parameter key="macro" value="exampleCount"/>
            <list key="additional_macros"/>
          </operator>
          <operator activated="true" class="filter_example_range" compatibility="6.5.002" expanded="true" height="76" name="Filter Example Range" width="90" x="380" y="300">
            <parameter key="first_example" value="%{exampleCount}"/>
            <parameter key="last_example" value="%{exampleCount}"/>
          </operator>
          <operator activated="true" class="remember" compatibility="6.5.002" expanded="true" height="60" name="Remember" width="90" x="514" y="300">
            <parameter key="name" value="data"/>
          </operator>
          <operator activated="true" class="loop" compatibility="6.5.002" expanded="true" height="76" name="Loop" width="90" x="514" y="165">
            <parameter key="iterations" value="%{futureMonths}"/>
            <process expanded="true">
              <operator activated="true" class="recall" compatibility="6.5.002" expanded="true" height="60" name="Recall" width="90" x="45" y="120">
                <parameter key="name" value="data"/>
              </operator>
              <operator activated="true" class="apply_model" compatibility="6.5.002" expanded="true" height="76" name="Apply Model" width="90" x="179" y="30">
                <list key="application_parameters"/>
              </operator>
              <operator activated="true" class="multiply" compatibility="6.5.002" expanded="true" height="94" name="Multiply" width="90" x="447" y="30"/>
              <operator activated="true" class="materialize_data" compatibility="6.5.002" expanded="true" height="76" name="Materialize Data (2)" width="90" x="179" y="165"/>
              <operator activated="true" class="generate_attributes" compatibility="6.4.000" expanded="true" height="76" name="Increase Date (2)" width="90" x="313" y="165">
                <list key="function_descriptions">
                  <parameter key="Date" value="date_add(Date, 1, DATE_UNIT_MONTH)"/>
                </list>
              </operator>
              <operator activated="true" class="set_role" compatibility="5.3.013" expanded="true" height="76" name="Set Role (2)" width="90" x="447" y="165">
                <parameter key="attribute_name" value="prediction(label)"/>
                <list key="set_additional_roles"/>
              </operator>
              <operator activated="true" class="select_attributes" compatibility="6.5.002" expanded="true" height="76" name="Select Attributes (3)" width="90" x="179" y="300">
                <parameter key="attribute_filter_type" value="single"/>
                <parameter key="attribute" value="inputYt-5"/>
                <parameter key="invert_selection" value="true"/>
              </operator>
              <operator activated="true" class="rename" compatibility="6.5.002" expanded="true" height="76" name="Rename" width="90" x="313" y="300">
                <parameter key="old_name" value="inputYt-4"/>
                <parameter key="new_name" value="inputYt-5"/>
                <list key="rename_additional_attributes">
                  <parameter key="inputYt-3" value="inputYt-4"/>
                  <parameter key="inputYt-2" value="inputYt-3"/>
                  <parameter key="inputYt-1" value="inputYt-2"/>
                  <parameter key="inputYt-0" value="inputYt-1"/>
                  <parameter key="prediction(label)" value="inputYt-0"/>
                </list>
              </operator>
              <operator activated="true" class="remember" compatibility="6.5.002" expanded="true" height="60" name="Remember (2)" width="90" x="447" y="300">
                <parameter key="name" value="data"/>
              </operator>
              <connect from_port="input 1" to_op="Apply Model" to_port="model"/>
              <connect from_op="Recall" from_port="result" to_op="Apply Model" to_port="unlabelled data"/>
              <connect from_op="Apply Model" from_port="labelled data" to_op="Multiply" to_port="input"/>
              <connect from_op="Multiply" from_port="output 1" to_port="output 1"/>
              <connect from_op="Multiply" from_port="output 2" to_op="Materialize Data (2)" to_port="example set input"/>
              <connect from_op="Materialize Data (2)" from_port="example set output" to_op="Increase Date (2)" to_port="example set input"/>
              <connect from_op="Increase Date (2)" from_port="example set output" to_op="Set Role (2)" to_port="example set input"/>
              <connect from_op="Set Role (2)" from_port="example set output" to_op="Select Attributes (3)" to_port="example set input"/>
              <connect from_op="Select Attributes (3)" from_port="example set output" to_op="Rename" to_port="example set input"/>
              <connect from_op="Rename" from_port="example set output" to_op="Remember (2)" to_port="store"/>
              <portSpacing port="source_input 1" spacing="0"/>
              <portSpacing port="source_input 2" spacing="0"/>
              <portSpacing port="sink_output 1" spacing="0"/>
              <portSpacing port="sink_output 2" spacing="0"/>
            </process>
          </operator>
          <operator activated="true" class="append" compatibility="6.5.002" expanded="true" height="76" name="Append" width="90" x="648" y="165"/>
          <connect from_op="Read CSV" from_port="output" to_op="Set Role" to_port="example set input"/>
          <connect from_op="Set Role" from_port="example set output" to_op="Select Attributes" to_port="example set input"/>
          <connect from_op="Select Attributes" 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="Windowing for Training" to_port="example set input"/>
          <connect from_op="Windowing for Training" from_port="example set output" to_op="Vector Linear Regression" to_port="training set"/>
          <connect from_op="Windowing for Training" from_port="original" to_op="Windowing for Application" to_port="example set input"/>
          <connect from_op="Windowing for Application" from_port="example set output" to_op="Extract Example Count" to_port="example set"/>
          <connect from_op="Vector Linear Regression" from_port="model" to_op="Loop" to_port="input 1"/>
          <connect from_op="Extract Example Count" from_port="example set" to_op="Filter Example Range" to_port="example set input"/>
          <connect from_op="Filter Example Range" from_port="example set output" to_op="Remember" to_port="store"/>
          <connect from_op="Loop" from_port="output 1" to_op="Append" to_port="example set 1"/>
          <connect from_op="Append" from_port="merged 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"/>
        </process>
      </operator>
    </process>
  • MartinLiebigMartinLiebig Administrator, Moderator, Employee-RapidMiner, RapidMiner Certified Analyst, RapidMiner Certified Expert, University Professor Posts: 3,533 RM Data Scientist
    thank you for sharing!
    - Sr. Director Data Solutions, Altair RapidMiner -
    Dortmund, Germany
  • cosmicbeingcosmicbeing Member Posts: 4 Contributor I
    earmijo wrote:

    I downloaded the code. The "unusual" operator are renamed operators.

    1) Extract Example .. is an Extract Macro that extracts the number of examples.

    2) Increase Data is a "Generate Attributes" operator that defines the variable "Date" as date_add(Date, 1, DATE_UNIT_MONTH)
    Hi Earmijo,

    Thanks for your good suggestions.

    The coding part is a few steps beyond where I am as a novice coder...and I'm not sure how or where to add that to my process.

    However your explanation really helps me understand what the operators are trying to do...and you gave me some more things to learn about and try for this example...

    I'll work on it more during the weekend...

    Take care and thanks,
    Robert

Sign In or Register to comment.