Dengue Forecasting with Neural Network

binsetyawanbinsetyawan Member Posts: 46 Guru
edited November 2018 in Help

Hello everyone,

first im sorry if im bad at english

 

i have dataset of dengue fever patient every hospital in my city from 2009 to 2014 and i want to forecast the data with neural network for next 2015.

To forecast a hospital, I add other data such as temperature, rainfall, humidity and will apply to other hospitals.

below is model that i build to forecast 1 hospital

model for 1 hospital.PNG

and here is the forecasting result

result.PNG

 

There are some questions I want to ask

1. How to get a forecast the next year? because the prediction result is the same month with actual data

2. Model that i build is just for 1 hospital, there are 20 hospital next, how to simplify the model? should i try loop or script?

 

Many thanks in advance,
Bintang

Answers

  • Thomas_OttThomas_Ott RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 1,761 Unicorn

    A few things. Since this is time series, I would use the Sliding Window Validation and Windowing operators included in the Series Extension. Then search the Community for some forecasting processes using these operators. This one comes to mind: http://community.rapidminer.com/t5/RapidMiner-Studio-Forum/Financial-Time-Series-Prediction/m-p/33456

  • binsetyawanbinsetyawan Member Posts: 46 Guru

    thank you, i'll try to use windowing and slding window validation from the reference

    and got any idea to simplify the model? it change 1 attributte with other 1 attributte for next 20

    should i try script or can be solved with looping?

  • Thomas_OttThomas_Ott RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 1,761 Unicorn

    Ok, so if I understand it you want to model the Dengue forecast for each hospital, right?  If yes, that you can use a combination of macros and loops to Filter based on the hospital and then run each Validation on that.

     

    Something like this sample

     

    <?xml version="1.0" encoding="UTF-8"?><process version="7.5.000">
    <context>
    <input/>
    <output/>
    <macros/>
    </context>
    <operator activated="true" class="process" compatibility="7.5.000" expanded="true" name="Process">
    <process expanded="true">
    <operator activated="true" class="retrieve" compatibility="7.5.000" expanded="true" height="68" name="Retrieve Deals" width="90" x="45" y="34">
    <parameter key="repository_entry" value="//Samples/data/Deals"/>
    </operator>
    <operator activated="true" class="filter_example_range" compatibility="7.5.000" expanded="true" height="82" name="Filter Example Range" width="90" x="179" y="34">
    <parameter key="first_example" value="1"/>
    <parameter key="last_example" value="10"/>
    </operator>
    <operator activated="true" class="extract_macro" compatibility="7.5.000" expanded="true" height="68" name="Extract Macro" width="90" x="313" y="34">
    <parameter key="macro" value="num"/>
    <parameter key="attribute_name" value="Payment Method"/>
    <list key="additional_macros"/>
    </operator>
    <operator activated="true" class="concurrency:loop" compatibility="7.5.000" expanded="true" height="82" name="Loop" width="90" x="447" y="34">
    <parameter key="number_of_iterations" value="%{num}"/>
    <process expanded="true">
    <operator activated="true" class="extract_macro" compatibility="7.5.000" expanded="true" height="68" name="Extract Macro (2)" width="90" x="112" y="34">
    <parameter key="macro" value="filter"/>
    <parameter key="macro_type" value="data_value"/>
    <parameter key="attribute_name" value="Payment Method"/>
    <parameter key="example_index" value="%{iteration}"/>
    <list key="additional_macros"/>
    </operator>
    <operator activated="true" class="filter_examples" compatibility="7.5.000" expanded="true" height="103" name="Filter Examples" width="90" x="246" y="34">
    <list key="filters_list">
    <parameter key="filters_entry_key" value="Payment Method.equals.%{filter}"/>
    </list>
    </operator>
    <connect from_port="input 1" to_op="Extract Macro (2)" to_port="example set"/>
    <connect from_op="Extract Macro (2)" from_port="example set" to_op="Filter Examples" to_port="example set input"/>
    <connect from_op="Filter Examples" from_port="example set output" to_port="output 1"/>
    <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>
    <connect from_op="Retrieve Deals" from_port="output" to_op="Filter Example Range" to_port="example set input"/>
    <connect from_op="Filter Example Range" from_port="example set output" to_op="Extract Macro" to_port="example set"/>
    <connect from_op="Extract Macro" from_port="example set" to_op="Loop" to_port="input 1"/>
    <connect from_op="Loop" from_port="output 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>
  • binsetyawanbinsetyawan Member Posts: 46 Guru

    is there another reference for me to learn macro and loop like that? its a bit hard to understand from that example

  • Thomas_OttThomas_Ott RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 1,761 Unicorn

    References? But of course. Have a look at these results. The top is where you want to start: http://community.rapidminer.com/t5/forums/searchpage/tab/message?q=macro

  • mattari_26mattari_26 Member Posts: 7 Contributor II

    Dear Manager, Im PhD student working on classification of Cardio-vascular data using ensemble based data minng model. For the above purpose, I have made neural network model using rapid miner giving accuracy of 81%. Kindly guide me about, how to improve the accuracy of above model for acceptable predictive modelling. The sample data is enclosed for reference.

     

    Mustafa Jan

    NUST, PNEC

  • binsetyawanbinsetyawan Member Posts: 46 Guru

    hello sir, i dont know if this helps you but my suggestion is for validation to your training data, you can use optimize parameter (grid) operator to help you get the best parameter for your neural network operator and will help you to imrove the accuracy, here is tutorial about optimize parameter optimize parameter operator

  • mattari_26mattari_26 Member Posts: 7 Contributor II

    Dear Fellow, I have tried parameter optimizer while using neural network classifier , its a good operator. But I dont know the reasons, that after ruinning the model the system keeps processing for so long and no results come out. 

  • binsetyawanbinsetyawan Member Posts: 46 Guru

    have you try to connect port par with purple color from optimize parameter operator to the res port so the result will come out?

  • mattari_26mattari_26 Member Posts: 7 Contributor II

    I have tried with all options at Grid operator, but after running the process, the system goes in sleeping and no results come out. Kindly if u have tried this operator with any type of data, the same model can be shared with me. I have followed the steps shown in tutorial and not able to understand the reasons of above query. The screen shot of process in sleep after running is enclosed  

  • binsetyawanbinsetyawan Member Posts: 46 Guru

    have you try to connect port par with purple color from optimize parameter operator to the res port so the result will come out?res.PNG

     

     

     

     

  • mattari_26mattari_26 Member Posts: 7 Contributor II

    Dear Manager, I have tried the same port conneced to Res port as u guided, but results remain same. Kindly review the options and guide me for clearance of my query.

    Regards

  • binsetyawanbinsetyawan Member Posts: 46 Guru

    would you send me the xml code of your process? thank you

  • mattari_26mattari_26 Member Posts: 7 Contributor II

    Sory Im late in reply due to my sickness and other issues. The xml code of my process is enclosed, pls request for guidance

  • binsetyawanbinsetyawan Member Posts: 46 Guru

    it works fine and the results show up. Try on result tab and open view -> restore default view and then try run your process again

  • mattari_26mattari_26 Member Posts: 7 Contributor II

    Kindly Pls share your model screen shots using parameter optimizer. Just to clear my query. I have tried on result tab with restored default view, still results are not coming. Pls use my enclosed CVD data for your model with parameter optimizer. 

Sign In or Register to comment.