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

This is the time series Problem. Where 26 weeks data is provided and we ave to predict next 4 weeks

pallavpallav Member Posts: 39 Contributor II
edited March 2020 in Help
In the given problem we have to forecast next 4 weeks of data give past history of past 26 weeks for each client and each product .
We have to forecast  product wise for each client .so ideally in the data four more column(week27,week28,week29,week30) will be added with the forecast result. Attaching dummy data in attachment.

How to do this problem in rapid miner, I tried doing it in rapidminer but was not able to do it . It will be help full  if i can get a demo model of this. I will learn from it and try to implement my problem in rapidminer.
Tagged:

Best Answer

Answers

  • MartinLiebigMartinLiebig Administrator, Moderator, Employee-RapidMiner, RapidMiner Certified Analyst, RapidMiner Certified Expert, University Professor Posts: 3,533 RM Data Scientist
    Hi @pallav ,
    the key operator is called "Multi Horizon Forecast". It allows you to build n-models to predict the n next points. Attached is an example on the german gas station data set. It forecasts the next 6hours of gas station price.
    Best,
    Martin


    <?xml version="1.0" encoding="UTF-8"?><process version="9.6.000"><br>  <context><br>    <input/><br>    <output/><br>    <macros/><br>  </context><br>  <operator activated="true" class="process" compatibility="9.6.000" expanded="true" name="Process"><br>    <parameter key="logverbosity" value="init"/><br>    <parameter key="random_seed" value="2001"/><br>    <parameter key="send_mail" value="never"/><br>    <parameter key="notification_email" value=""/><br>    <parameter key="process_duration_for_mail" value="30"/><br>    <parameter key="encoding" value="SYSTEM"/><br>    <process expanded="true"><br>      <operator activated="true" class="retrieve" compatibility="9.6.000" expanded="true" height="68" name="Retrieve Prices of Gas Station" width="90" x="45" y="187"><br>        <parameter key="repository_entry" value="//Samples/Time Series/data sets/Prices of Gas Station"/><br>      </operator><br>      <operator activated="true" class="time_series:windowing" compatibility="9.6.000" expanded="true" height="82" name="Windowing" width="90" x="179" y="187"><br>        <parameter key="attribute_filter_type" value="single"/><br>        <parameter key="attribute" value="gas price / euro (times 1000)"/><br>        <parameter key="attributes" value=""/><br>        <parameter key="use_except_expression" value="false"/><br>        <parameter key="value_type" value="attribute_value"/><br>        <parameter key="use_value_type_exception" value="false"/><br>        <parameter key="except_value_type" value="time"/><br>        <parameter key="block_type" value="attribute_block"/><br>        <parameter key="use_block_type_exception" value="false"/><br>        <parameter key="except_block_type" value="value_matrix_row_start"/><br>        <parameter key="invert_selection" value="false"/><br>        <parameter key="include_special_attributes" value="false"/><br>        <parameter key="has_indices" value="true"/><br>        <parameter key="indices_attribute" value="date"/><br>        <parameter key="window_size" value="24"/><br>        <parameter key="no_overlapping_windows" value="false"/><br>        <parameter key="step_size" value="1"/><br>        <parameter key="create_horizon_(labels)" value="true"/><br>        <parameter key="horizon_attribute" value="gas price / euro (times 1000)"/><br>        <parameter key="horizon_size" value="6"/><br>        <parameter key="horizon_offset" value="0"/><br>        <description align="center" color="transparent" colored="false" width="126">Horizon Size is 6, so we forecast the next 6h&lt;br/&gt;</description><br>      </operator><br>      <operator activated="true" class="filter_examples" compatibility="9.6.000" expanded="true" height="103" name="Filter Examples" width="90" x="313" y="187"><br>        <parameter key="parameter_expression" value=""/><br>        <parameter key="condition_class" value="custom_filters"/><br>        <parameter key="invert_filter" value="false"/><br>        <list key="filters_list"><br>          <parameter key="filters_entry_key" value="Last date in window.lt.01/01/2018 00:00:00 AM"/><br>        </list><br>        <parameter key="filters_logic_and" value="true"/><br>        <parameter key="filters_check_metadata" value="true"/><br>        <description align="center" color="transparent" colored="false" width="126">simple split validation</description><br>      </operator><br>      <operator activated="true" class="time_series:multi_horizon_forecast_learner" compatibility="9.6.000" expanded="true" height="82" name="Multi Horizon Forecast" width="90" x="514" y="85"><br>        <parameter key="use_default_regular_expression" value="true"/><br>        <parameter key="add_macros" value="false"/><br>        <parameter key="current_horizon_name_macro" value="current_horizon_attribute"/><br>        <parameter key="current_horizon_type_macro" value="current_horizon_type"/><br>        <parameter key="enable_parallel_execution" value="true"/><br>        <process expanded="true"><br>          <operator activated="true" class="h2o:generalized_linear_model" compatibility="9.3.001" expanded="true" height="124" name="Generalized Linear Model (2)" width="90" x="45" y="34"><br>            <parameter key="family" value="AUTO"/><br>            <parameter key="link" value="family_default"/><br>            <parameter key="solver" value="AUTO"/><br>            <parameter key="reproducible" value="false"/><br>            <parameter key="maximum_number_of_threads" value="4"/><br>            <parameter key="use_regularization" value="true"/><br>            <parameter key="lambda_search" value="false"/><br>            <parameter key="number_of_lambdas" value="0"/><br>            <parameter key="lambda_min_ratio" value="0.0"/><br>            <parameter key="early_stopping" value="true"/><br>            <parameter key="stopping_rounds" value="3"/><br>            <parameter key="stopping_tolerance" value="0.001"/><br>            <parameter key="standardize" value="true"/><br>            <parameter key="non-negative_coefficients" value="false"/><br>            <parameter key="add_intercept" value="true"/><br>            <parameter key="compute_p-values" value="false"/><br>            <parameter key="remove_collinear_columns" value="false"/><br>            <parameter key="missing_values_handling" value="MeanImputation"/><br>            <parameter key="max_iterations" value="0"/><br>            <parameter key="specify_beta_constraints" value="false"/><br>            <list key="beta_constraints"/><br>            <parameter key="max_runtime_seconds" value="0"/><br>            <list key="expert_parameters"/><br>          </operator><br>          <connect from_port="training set" to_op="Generalized Linear Model (2)" to_port="training set"/><br>          <connect from_op="Generalized Linear Model (2)" from_port="model" to_port="model"/><br>          <portSpacing port="source_training set" spacing="0"/><br>          <portSpacing port="source_input 1" spacing="0"/><br>          <portSpacing port="sink_model" spacing="0"/><br>          <portSpacing port="sink_output 1" spacing="0"/><br>        </process><br>      </operator><br>      <operator activated="true" class="apply_model" compatibility="9.6.000" expanded="true" height="82" name="Apply Model" width="90" x="648" y="238"><br>        <list key="application_parameters"/><br>        <parameter key="create_view" value="false"/><br>      </operator><br>      <operator activated="true" class="time_series:multi_label_performance_evaluator" compatibility="9.6.000" expanded="true" height="124" name="Multi Label Performance" width="90" x="782" y="34"><br>        <parameter key="auto_detect_label_and_prediction_attributes" value="true"/><br>        <parameter key="attribute_filter_type" value="all"/><br>        <parameter key="attribute" value=""/><br>        <parameter key="attributes" value=""/><br>        <parameter key="use_except_expression" value="false"/><br>        <parameter key="value_type" value="attribute_value"/><br>        <parameter key="use_value_type_exception" value="false"/><br>        <parameter key="except_value_type" value="time"/><br>        <parameter key="block_type" value="attribute_block"/><br>        <parameter key="use_block_type_exception" value="false"/><br>        <parameter key="except_block_type" value="value_matrix_row_start"/><br>        <parameter key="invert_selection" value="false"/><br>        <parameter key="include_special_attributes" value="true"/><br>        <parameter key="add_macros" value="false"/><br>        <parameter key="current_label_name_macro" value="current_label_attribute"/><br>        <parameter key="current_label_type_macro" value="current_label_type"/><br>        <parameter key="enable_parallel_execution" value="true"/><br>        <process expanded="true"><br>          <operator activated="true" class="performance_regression" compatibility="9.6.000" expanded="true" height="82" name="Performance" width="90" x="179" y="34"><br>            <parameter key="main_criterion" value="first"/><br>            <parameter key="root_mean_squared_error" value="true"/><br>            <parameter key="absolute_error" value="true"/><br>            <parameter key="relative_error" value="true"/><br>            <parameter key="relative_error_lenient" value="false"/><br>            <parameter key="relative_error_strict" value="false"/><br>            <parameter key="normalized_absolute_error" value="false"/><br>            <parameter key="root_relative_squared_error" value="false"/><br>            <parameter key="squared_error" value="false"/><br>            <parameter key="correlation" value="false"/><br>            <parameter key="squared_correlation" value="false"/><br>            <parameter key="prediction_average" value="false"/><br>            <parameter key="spearman_rho" value="false"/><br>            <parameter key="kendall_tau" value="false"/><br>            <parameter key="skip_undefined_labels" value="true"/><br>            <parameter key="use_example_weights" value="true"/><br>          </operator><br>          <connect from_port="labelled set" to_op="Performance" to_port="labelled data"/><br>          <connect from_op="Performance" from_port="performance" to_port="performance"/><br>          <portSpacing port="source_labelled set" spacing="0"/><br>          <portSpacing port="source_input 1" spacing="0"/><br>          <portSpacing port="sink_performance" spacing="0"/><br>          <portSpacing port="sink_output 1" spacing="0"/><br>        </process><br>      </operator><br>      <connect from_op="Retrieve Prices of Gas Station" from_port="output" to_op="Windowing" to_port="example set"/><br>      <connect from_op="Windowing" from_port="windowed example set" to_op="Filter Examples" to_port="example set input"/><br>      <connect from_op="Filter Examples" from_port="example set output" to_op="Multi Horizon Forecast" to_port="training set"/><br>      <connect from_op="Filter Examples" from_port="unmatched example set" to_op="Apply Model" to_port="unlabelled data"/><br>      <connect from_op="Multi Horizon Forecast" from_port="model" to_op="Apply Model" to_port="model"/><br>      <connect from_op="Apply Model" from_port="labelled data" to_op="Multi Label Performance" to_port="labelled set"/><br>      <connect from_op="Apply Model" from_port="model" to_port="result 3"/><br>      <connect from_op="Multi Label Performance" from_port="collection of performances" to_port="result 1"/><br>      <connect from_op="Multi Label Performance" from_port="performance" to_port="result 2"/><br>      <portSpacing port="source_input 1" spacing="0"/><br>      <portSpacing port="sink_result 1" spacing="0"/><br>      <portSpacing port="sink_result 2" spacing="42"/><br>      <portSpacing port="sink_result 3" spacing="105"/><br>      <portSpacing port="sink_result 4" spacing="0"/><br>    </process><br>  </operator><br></process><br><br>


    - Sr. Director Data Solutions, Altair RapidMiner -
    Dortmund, Germany
  • pallavpallav Member Posts: 39 Contributor II
    @mschmitz- I cannot find  attached example 
  • MartinLiebigMartinLiebig Administrator, Moderator, Employee-RapidMiner, RapidMiner Certified Analyst, RapidMiner Certified Expert, University Professor Posts: 3,533 RM Data Scientist
    Hi,
    the XML is in the spoiler.Just click on "show".
    Cheers,
    Martin
    - Sr. Director Data Solutions, Altair RapidMiner -
    Dortmund, Germany
  • pallavpallav Member Posts: 39 Contributor II
    @mschmitz - unfortunately i can see any process inside it 
    One one line is there.

Sign In or Register to comment.