Importing Example from RapidMiner book - XML

MaerkliMaerkli MemberPosts:84Guru
edited December 2018 inHelp

I try to reproduce the process of Chapter 11 fromhttp://rapidminerbook.com/index.php/chapter-downloads/chapter-11/; I have savedDataset & Processesas .xml in My Documents. From File in RapidMiner Studio, I try to import the XML process but RapidMiner can't find them. What am I doing wrong? Thanks in advance for your support.

Tagged:

Answers

  • lionelderkrikorlionelderkrikor Moderator, RapidMiner Certified Analyst, MemberPosts:1,195Unicorn

    Hi@Maerkli,

    1. You have to open your XML files in a notebook and then copy the whole code.(Ctrl + A then Ctrl + C)

    2. In RapidMiner, you have to activate your XML panel :

    Date_A_B.pnguju

    3. Delete the existing code and paste your XML code in the XML panel.

    Date_A_B_2_B.png

    4. Click on the "check" button.

    Date_A_B_3.png

    5. That's it... the process appears in the main window.

    I hope it helps,

    Regards,

    Lionel

    sgenzer
  • lionelderkrikorlionelderkrikor Moderator, RapidMiner Certified Analyst, MemberPosts:1,195Unicorn

    Hi again@Maerkli,

    I wanted to say :

    "1. You have to open your XML files in anotepad (for example "Wordpad", "Bloc note")and then copy the whole code."

    Regards,

    Lionel

  • MaerkliMaerkli MemberPosts:84Guru

    Thanks, Lionel. I had already tried this way. Question: how, from this point, do I get the process deployed in Process screen? I have the xml code in the XML screen.

    Maerkli

  • Thomas_OttThomas_Ott RapidMiner Certified Analyst, RapidMiner Certified Expert, MemberPosts:1,761Unicorn

    @Maerkliyou should click the green check mark. If there are no errors in the XML, the operators should populate in the Process view.

    sgenzer
  • MaerkliMaerkli MemberPosts:84Guru

    Hallo Thomas,

    That is the point. The green mark is checked. The operators do not populate the Process view. The code used is exactely taken

    fromhttp://rapidminerbook.com/index.php/chapter-downloads/chapter-11/, edited by Dr. Markus Hofmann & Ralf Klinkenberg.

    Maerkli

  • sgenzersgenzer Administrator, Moderator, Employee, RapidMiner Certified Analyst, Community Manager, Member, University Professor, PM ModeratorPosts:2,959Community Manager

    hello@Maerkliwelcome to the community! Some quick recommendations for you:
    • Post your XML process here in this thread (seehttps://youtu.be/KkgB5QXWXJ8and "Read Before Posting" on right when you reply)
    • Attach your dataset if possible (use a fictionalized version if there are privacy concerns)
    • Make sure you have all necessary extensions installed (seehttps://youtu.be/pjBqG3xtXx4)

    Scott

  • MaerkliMaerkli MemberPosts:84Guru

    Hallo Scott,

    Before posting, I have read the recommendations several times. I have attached the xml files in question as well.

    Thanks for the support.

    Maerkli

  • Thomas_OttThomas_Ott RapidMiner Certified Analyst, RapidMiner Certified Expert, MemberPosts:1,761Unicorn

    @MaerkliI just loaded the cluster one fine. See attached RMP file. Haven't checked the other one.

    Cluster.rmp 50.1K
    sgenzer
  • MaerkliMaerkli MemberPosts:84Guru

    Thomas,

    I have tried with your enclosed file and it works. I note that you have a .rmp file. That' s perhaps the explication. From

    http://rapidminerbook.com/index.php/chapter-downloads/chapter-11/, how can I get a .rmp and not an .xml?

    Maerkli

  • Thomas_OttThomas_Ott RapidMiner Certified Analyst, RapidMiner Certified Expert, MemberPosts:1,761Unicorn

    @MaerkliI just downloaded the zip file, extracted it, opened the cluster XML file using a text editor, copy and pasted it into the XML view, and clicked the green check mark. Everything populated.

    If it's not working for you, check that you copy and pasted the entire XML.

    sgenzer
  • MaerkliMaerkli MemberPosts:84Guru

    Thomas,

    I do exactely that but the xml file does not populate the process window. If I copy/paste your rpm file, it works. Really mysterious!

    Maerkli

    PS. Shall I look the Champion's League match Real against Juventus or spend my night trying to solve this issue?

    sgenzer lionelderkrikor
  • lionelderkrikorlionelderkrikor Moderator, RapidMiner Certified Analyst, MemberPosts:1,195Unicorn

    @Maerkli,

    That's mysterious indeed, but many things :

    1. You can try to quit and re-open RapidMiner

    2. Update RapidMiner to the last version

    3. Can you repeat the procedure (copy/paste in the XML panel after deleting the existing code, then click on the check button) with these XML code ( your 2 XML files) :







    numberOfClusterIterations
    15


    processToRun
    readAndProcessEcoliData


    locationOfData
    PathToYourData\ecoli.data


























    <操作符= " true " class = " select_attribute激活s" compatibility="8.1.001" expanded="true" height="82" name="Select Attributes" width="90" x="45" y="120">


















































    <操作符= " true " class = " select_attribute激活s" compatibility="8.1.001" expanded="true" height="76" name="Select cluster1 and id" width="90" x="447" y="30">







    For both data sets, the ground truth is 8 clusters - for other data sets, this number could be different. The recalled example set is the 8th but it does not have to be - the important point is renaming the ground truth cluster indicator - site - to cluster2 later.









    This renames the ground truth cluster which is called site to cluster2

    <操作符= " true " class = " select_attribute激活s" compatibility="8.1.001" expanded="true" height="76" name="Select cluster2 and id" width="90" x="447" y="255">










    Comment out these lines after the first run using ##
    <br>
    <br>
    ##install.packages("mclust")
    ##install.packages("profdpm")




    <操作符= " true " class = " extract_performa激活nce" compatibility="8.1.001" expanded="true" height="76" name="ARI (2)" width="90" x="112" y="30">




    <操作符= " true " class = " extract_performa激活nce" compatibility="8.1.001" expanded="true" height="76" name="FM (2)" width="90" x="112" y="165">




    <操作符= " true " class = " extract_performa激活nce" compatibility="8.1.001" expanded="true" height="76" name="R (2)" width="90" x="313" y="165">




    <操作符= " true " class = " extract_performa激活nce" compatibility="8.1.001" expanded="true" height="76" name="W10 (2)" width="90" x="447" y="165">




    <操作符= " true " class = " extract_performa激活nce" compatibility="8.1.001" expanded="true" height="76" name="W01 (2)" width="90" x="581" y="165">




    <操作符= " true " class = " extract_performa激活nce" compatibility="8.1.001" expanded="true" height="76" name="J (2)" width="90" x="715" y="165">










    <连接from_op = " W01(2)“from_port =“榜样”to_op="J (2)" to_port="example set"/>















    <参数键=“k2”值=”操作符。Recall ground truth.parameter.name"/>

















    <连接from_op = from_por选择cluster2和idt="example set output" to_op="Join cluster1 and cluster2" to_port="right"/>































    <操作符= " true " class = " select_attribute激活s" compatibility="8.1.001" expanded="true" height="76" name="select first cluster and id" width="90" x="447" y="75">

















    <操作符= " true " class = " select_attribute激活s" compatibility="8.1.001" expanded="true" height="76" name="select second cluster and id" width="90" x="447" y="255">












    <操作符= " true " class = " extract_performa激活nce" compatibility="8.1.001" expanded="true" height="76" name="ARI" width="90" x="45" y="30">




    <操作符= " true " class = " extract_performa激活nce" compatibility="8.1.001" expanded="true" height="76" name="FM" width="90" x="179" y="165">




    <操作符= " true " class = " extract_performa激活nce" compatibility="8.1.001" expanded="true" height="76" name="R" width="90" x="313" y="165">




    <操作符= " true " class = " extract_performa激活nce" compatibility="8.1.001" expanded="true" height="76" name="W10" width="90" x="447" y="165">




    <操作符= " true " class = " extract_performa激活nce" compatibility="8.1.001" expanded="true" height="76" name="W01" width="90" x="581" y="165">




    <操作符= " true " class = " extract_performa激活nce" compatibility="8.1.001" expanded="true" height="76" name="J" width="90" x="715" y="165">


























    <参数键=“k2”值=”操作符。记得第二次。parameter.name"/>
















































































































    <连接from_op = from_生成数据进行测试port="output" to_op="Rename" to_port="example set input"/>


















    <连接from_op = "输出集群and partitioning" from_port="output 1" to_port="result 1"/>
    <连接from_op = "输出集群and partitioning" from_port="output 2" to_port="result 2"/>







    <h1>Important note: </h1>
    <br>
    <br>
    <h2>There are three files needed for this process as follows.</h2>
    <ul>
    <li>clusterVisualisation.xml - a RapidMiner process - this file</li>
    <li>readAndProcessEcoliData.xml - a RapidMiner process called from this process</li>
    <li>ecoli.data - the Ecoli data contained in a text file.</li>
    </ul>
    <br>
    Store the processes in your repository.
    <br>
    <h2>Macros</h2>
    In the process context, edit the following macros to ensure you run the correct process to load the ecoli data
    <ul>
    <li>processToRun - set this to the name of the process that reads and processes the Ecoli data - the default is readAndProcessEcoliData.</li>
    <li>locationOfData - set this to the full path to the file containing the Ecoli data that you downloaded.
    </ul>










    fileToRead
    file containing ecoli data






















































    if it doesn't work, you can find in attached file the second process in .rmp file.( to continue your job)

    I hope the mystery will dissipate.

    Regards,

    Lionel

    NB : if you do not support Real Madrid, you will definitely have a bad night:smileyhappy:

    sgenzer
  • MaerkliMaerkli MemberPosts:84Guru

    Hi Lionel,

    I will try your recommendations.

    I am not especially a supporter of Real but I have great respect for them.

    The "Fallrückzieher" of Ronaldo was total grandeur. Sorry for the strange German word... In English, it should be called "bicycle kick", I think.

    Maerkli

Sign InorRegisterto comment.