Loop Examples Error: Too Few Examples
Hi,
I'm running a Loop Examples to identify different items in my dataset. I have 73 items that I'm looking for, which I've put into a macro. The macro reads a file of 74 lines, the first line being a header. When the Loop Examples gets to line 74, instead of exiting the loop, it's telling me that I have Too Few Examples. I think it might be reading the header row as an example, so it's looking for 1 more example which doesn't exist.
I've told Rapidminer that I have a header row and I've even tried changing some other parameters to see if that would make a difference, but it didn't . I couldn't find any documentation about this problem.
Thanks,
Karim
Answers
Hi Karim,
Could please share the XML code of the RapidMiner process you have built (of the screenshot you shared)?
This would help to recreate the process with exact parameters of the operators you have set and check the error.
Cheers,
Here's the XML.
Hi @Pavithra_Rao,
Have you had a chance to work on this?
Thanks,
Karim
Hi @karim_keshavjee - I looked at your process. I notice that your Read Excel operator in the root process (the one that is grayed out) has the "first row as names" parameter checked, but the one inside the Loop Examples operator (not grayed out) does NOT Have this parameter checked. Is this your problem?
Scott
Thanks for the quick response Scott,
I fixed that, but it didn't solve the problem. I did try both before.
The error is appearing inside the Loop Examples process in the Extract Macro subprocess.
Karim
hello @karim_keshavjee - ok I have looked at this again. There are a lot of rather unusual things going on here and it is very hard to unpack. Some observations:
- when you loop examples, you are looping the examples in "Medication Data for Processing". But when you extract the macro, you're doing it from "Drug Database...".
- in Filter Examples(4), you're only selecting those with NULL or ?.
- your Append operator inside the loop has only one connection
I would highly advise you to look at these issues. A good way to debug is to use breakpoints at each step along the way of your process so you can see what your dataset looks like.
Scott
Hi Karem,
Apologies for delay in response. Got tied up in some work.
@sgenzer Thanks for looking to this. Please feel free to let me know if any furter help is needed here.
Cheers,
I still have not solved this problem. Could you propose some more suggestions?
This is no longer urgent because I've found another way to solve my problem, but it would be good to know how to make Loop Examples work because I'm sure I'll need it at some point!
Thanks,
Karim
hi @karim_keshavjee - there are lots of resources both online and built into RapidMiner to learn how to use Loop Examples and macros. Have you completed the tutorials? The one called "Data Handling" would be the one you want. In addition, the "Getting Started with RapidMiner" video series is extremely helpful.
Scott