[SOLVED] Issue: how to implemet a dynamic filter on Rapidminer

jseekerjseeker MemberPosts:12Contributor I
edited August 2019 inHelp
Dear community members,
I'm using RapidMiner and RapidAnalytics for analyse a dataset, downloaded fromhttp://archive.ics.uci.edu/ml/machine-learning-databases/00257/Data_User_Modeling_Dataset_Hamdi%20Tolga%20KAHRAMAN.xls
I want to filter my dataset by UNS column.
In rapidMiner I already implemented a process like thisimageand I export this process on RapidAnalytics.
How we can see the last block is a filter example with attribute_value_filter set on UNS with regular expression value.
Now i'm going to implement a dynamic filter, but i dont know how do that.
I have to filter data by label : Very Low, Low, Middle and High.
My final result should be a dynamic process on RapidAnalytics that allows to see four data view.
Anyone could help me ?

Thank in advance.

bye
Tagged:

Answers

  • MariusHelfMariusHelf RapidMiner Certified Expert, MemberPosts:1,869Unicorn
    Hi,

    how do you access RapidAnalytics? Are you using a webservice? In that case you could make use of macros.

    In RapidMiner define a macro called "filterValue" in the Process Context (you find it next to the Parameters tab in the upper right).
    Then define your filter as
    UNS = .*%{filterValue}.*
    This allows you to provide the filterValue as a macro value in RapidMiner. This macro value can also be exported to the webservice, and you can call it by something likehttp://my.rapidminer.server.com/myWebservice?filterValue=High

    Best regards,
    Marius
  • jseekerjseeker MemberPosts:12Contributor I
    Hi Marius,
    thank you so much for the answer.
    I access to rapidAnalytics with firefox browser and i use a webservice.
    Added the macro in rapidMiner, image attached
    image
    Now , I would export this macro into webservice, but when i set up the service i don't find anything.
    image
    Right now, i tryed to insert the macro in url query parameter like this
    image
    My result on service test is
    image
    I typed the low value but the filter doesn't work:(
    where is my mistake?

    Thank you

    Regards.
  • MariusHelfMariusHelf RapidMiner Certified Expert, MemberPosts:1,869Unicorn
    Hi,

    you are using the Set Macro operator, but to make the filter work you have to use the process context as described above.

    Best regards,
    Marius
  • jseekerjseeker MemberPosts:12Contributor I
    Hi,
    unfortunately i've no result in my table.
    It's becoming a nightmare.
    I'm going to write what i did. So, i restored my previous process context in rapidMiner.
    I'm using a filter example with :
    - condition_class -> attribute_value_filter
    - parameter string -> UNS = .*%{filterValue}.*
    I even exported the process in rapidAnalytic such as service and added the same rapidMiner's macro.

    In Service Settings
    Parameter binding :
    - URL query parameter -> filterValue
    - Target (macro/operator parameter) -> UNS = .*%{filterValue}.*

    when I tried to test the service, it request me the parameter, i write for example Low and my result always is empty table:(

    Why ?

    I must finish this project as soon as possibile.
    And you Marius are my hope.

    Thank for the patience
    Regards.
  • Marco_BoeckMarco_Boeck Administrator, Moderator, Employee, Member, University ProfessorPosts:1,984RM Engineering
    Hi,

    in the service settings on the server, URL-Query-Parameter and Target must be identical, i.e. "filterValue" in your case.

    Testprocess:








    filterValue







    <运营商激活= " true " class = " filter_examples”compatibility="5.3.014" expanded="true" height="76" name="Filter Examples" width="90" x="179" y="30">













    These two must be identical and match the macro value in the process context and the filter operator
    image

    This is an example of a test with the filter set to "value0".
    image

    Regards,
    Marco
  • jseekerjseeker MemberPosts:12Contributor I
    Hi,
    最后,我解决了我的问题=)
    Thank you so much.
    I'll open very soon another post for how to predict the level of user's knowledge.
    I'm using the same dataset, i have five attributes and one UNS label, that says me the level of user belongs.
    I'm very thankful for your precious help.

    Regards.

    :)
Sign InorRegisterto comment.