我如何拯救宏n csv or excel format?

archu92archu92 MemberPosts:11Contributor II
edited November 2018 inHelp

Hi experts,

I want to save performance values for every validation fold which is stored as macros. Need to save it in csv format for further analysis. Please help.

Thank you,

Archana

Tagged:

Best Answers

  • landland RapidMiner Certified Analyst, RapidMiner Certified Expert, MemberPosts:2531年Unicorn
    Solution Accepted

    Hi,

    this is actually much easier:
    With RapidMiner 7.3 you have a new port in the cross validation, called test results. If you put a "Performance to Data" operator on the test side and connect it's output to this port, you will get a table of all the performances on the outside "test" port. You can then simply write it as csv or excel. Here's a process that does it with the sonar dataset. I also add a Generate Attribute to identify the folds, using Martin's %{a} apply count macro suggestion:






    > < /上下文




















































    Greetings,

    Sebastian

    IngoRM MartinLiebig
  • yyhuangyyhuang Administrator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert, MemberPosts:363RM Data Scientist
    Solution Accepted

    Hi@archu92, it is normal to have such doubt. It is not suggested to use error estimation from one single fold. “What a coincidence! 100 accuracy;)” Usually we take average of MSE(mean squared error) or average of accuracy from 10 cross validated models. That is exactly what you will see in the results view for 'Performance' output of a cross-validation operator.

    For example, you can have ouput for different performance criterion in the performance vector view,

    精度: 66.9048% +/- 7.2695% (mikro: 66.8269%) showsaverage精度with its standard deviation

    AUC (optimistic): 0.810101 +/- 0.078353 (mikro: 0.810101) (positive class: Mine) showsaverageAera Under Roc Curve with its standard deviation

    .....

    An insightful post from Ingo;)can also help you understandwhy we need cross validationandhow to interpret it

    also check out his latest“Learn the RIGHT Way to Validate Models” blog post series

    ps. When we talk about model error, we should only care about the error on testing set (testing error), not the training error.

    Thomas_Ott archu92

Answers

  • MartinLiebigMartinLiebig Administrator, Moderator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert, University ProfessorPosts:3,404RM Data Scientist

    Hi Archana,

    i usually use Generate Data By User Specification and build myself the desired example set.

    ~Martin

    - Sr. Director Data Solutions, Altair RapidMiner -
    Dortmund, Germany
  • archu92archu92 MemberPosts:11Contributor II

    Hi Martin,

    Previously you shared a process which stores all performance folds:

    http://community.www.turtlecreekpls.com/t5/RapidMiner-Studio/How-to-store-performance-metrics-from-each-10-fold-cross/m-p/36129#M25010

    I need to save all performance fold results into csv or excel. Is there any way?

    Thank you

    PS: i have used write as text operator but it stores only last result not all.

  • MartinLiebigMartinLiebig Administrator, Moderator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert, University ProfessorPosts:3,404RM Data Scientist

    Hi Again,

    have a look at performance to data. Just use performance to data and Write CSV instead of store. You can use %{a} to write different files. In case you want to do this on the stored performances: You can use Loop Repository here.

    ~Martin

    - Sr. Director Data Solutions, Altair RapidMiner -
    Dortmund, Germany
  • archu92archu92 MemberPosts:11Contributor II

    Hi,


    have a look at performance to data. Just use performance to data and Write CSV instead of store. You can use %{a} to write different files.


    I tried to save it in csv format after using performance to data operator, but it is empty. Where i need to define %{a}?


    In case you want to do this on the stored performances: You can use Loop Repository here.

    As i am new to RM, please help in how to integrate loop operator with stored performance.

    Thank you

  • archu92archu92 MemberPosts:11Contributor II
    Criterion Value Standard Deviation Variance 褶皱
    精度 .0 10.0

    Hi Sebastian,

    I run the process which you have shared, above table shows only one result. Not able to obtain all the 10-fold results.

    Thank you.

  • landland RapidMiner Certified Analyst, RapidMiner Certified Expert, MemberPosts:2531年Unicorn

    Hi,

    if I simply copy the xml into the XML panel of RapidMiner 7.3, press the green button to reload the xml as process, and execute it, it shows then lines as expected. Sorry, I simply cannot reproduce your problem and I assume, you simply changed something in the process before executing it. Did you perhaps insert a breakpoint somewhere?

    Greetings,

    Sebastian

  • Telcontar120Telcontar120 Moderator, RapidMiner Certified Analyst, RapidMiner Certified Expert, MemberPosts:1,635Unicorn

    I confirmed that the example process that@landsupplied works as intended and provides a table of performance output for each of the folds. Make sure the "test" output is connected from the cross-validation operator and you should see it.

    Brian T.
    Lindon Ventures
    Data Science Consulting from Certified RapidMiner Experts
  • archu92archu92 MemberPosts:11Contributor II

    Hi,
    Thanks a lot, yes i split the generate attribute operator to get results in excel instead connecting to test port of validation.
    I have a doubt, should i consider 10th fold result for model error calculations?

Sign InorRegisterto comment.