The RapidMiner community is on read-only mode until further notice. Technical support via cases will continue to work as is. For any urgent licensing related requests from Students/Faculty members, please use the Altair academic forum here.
Compare value with 5 others and pick the closest, but smaller value
Hello altogether,
i am facing a logistic problem and hope that someone can help:
Lets say i have got a column which contains the delivered quantity and in 5 other columns i have the different package sizes.
E.g.
The Quantity is 21 pieces and the package units for this material are: 1 unit, 10 per carton, 25 per box and 100 per palette and so on.
It is obvious, that the delivery has been carried out with 2,1 boxes (i know that this is not quite correct but this is the aprox best solution).
What i want is that rapidminer shows the next smaller value in an extra column.
Ive attached an image for better understanding
Thanks for your help! ;-)
1
Answers
Do you maybe know something @mschmitz? I saw that you replied to @eldenoso, which's topic seemingly was comparable to mine.
Thanks in advance
Hi,
nothing quick.. I would write a groovy script but i am not sure if this counts as solution. Maybe @sgenzer can help?
Best,
Martin
Dortmund, Germany
hello @kp903847 - ok I have some thoughts but let me just understand better. If you have quantity=21, you are looking at 2,1 cartons, not boxes - correct? And you want RapidMiner to tell you the number of each size of shipping container you will need so that you maximize? Something like this:
quantity palette box carton single units
21 0 0 1 1
40 0 1 1 5
Is that correct? This might be what your headers are but I cannot decipher them.
Scott
Good Morning altogether,
this kind of solution was something i was looking for. i solved it in excel with about 100.000 rows but now iam facing 1,7 million rows which isnt handable in excel. maybe the function i used in excel is helpful.
thanks alot!
Hi kp903847,
i've taken the time and build a quick groovy script. it takes four attributes and adds a new attribute called min_att which tells you which attribute was the minimum of these. The attributes are at the moment hard coded. you can just change the lines with att.add( " ..") to your attribute names (likely deltas) to get what you want.
Is that what you need? I can easily turn this into an operator with a nicer interface (e.g. attribute selection and min,max, value mode).
Best,
Martin
Dortmund, Germany
greetings martin!
thanks alot for taking time for my issue. the algorithm works fine with positive values, but identifies the wrong one when there are negative values.
e.g.
Hi,
attached is the groovy with abs() around the values.
Best,
Martin
Dortmund, Germany
For future reference,
we solved this via PM. I missunderstood the question a bit. The solution is attached.
~Martin
Dortmund, Germany