πŸŽ‰ πŸŽ‰. RAPIDMINER 9.8 IS OUT!!! πŸŽ‰ πŸŽ‰

RapidMiner 9.8 continues to innovate in data science collaboration, connectivity and governance

CLICK HERE TO DOWNLOAD

"How to Loop

dragonedisondragonedison Member Posts: 17  Maven
edited May 2019 in Help
Dear everyone,

I use "Loop Attribute Subsets" to implement the classification process, and I would like the classification result of each case in the dataset be stored, so I use the "Write CSV File" opererator to save it. However, I discovered that this operator doesn't implement an "attach" writing like the "Write as Text" operator, which means that each time this operator deletes the content of the file and write new results to it. I would like to know if there is any way to let the "Write CSV File" operator create a new file for writing results each time while keeping the old results.

I know that there is a "Loop Files" operator, but I don't know how to use it to implement this task.

Thanks.
Gary

Answers

  • colocolo Member Posts: 236  Guru
    Hi Gary,

    how about appending a counting value to the output filenames? You could initialize a counter just before the Loop operator is called (Generate Macro) and increment it inside the loop. If you append this macro to the filename for the CSV files you will get one file per loop run / case.

    This should easily solve the problem. Or did you expect something different (for example all contents in a single file)?

    Regards,
    Matthias

    PS. Loop files just works for existing files, it doesn't generate new ones.
  • dragonedisondragonedison Member Posts: 17  Maven
    Dear Matthias,

    Thanks for your advice! I will try.

    Regards,
    Gary
Sign In or Register to comment.