The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here
Data Preprocessing - Need urgently help
Hello Everbody..
i will transform a given data, but i dont know how can i do it in Rapidminer.
Given data:
Client Date Product
Client 1 14.02.1980 Product1
Client 1 14.02.1980 Product 2
Client 1 14.02.1980 Product 3
Client 1 14.02.1980 Product 4
Client 1 14.02.1980 Product 5
Client 1 13.02.1934 Product 1
Client 1 13.02.1934 Product 2
Client 1 13.02.1934 Product 3
Client 1 13.02.1934 Product 4
Client 3 14.02.1934 Product 1
Client 3 14.02.1934 Product 2
Client 3 14.02.1934 Product 3
Client 4 15.02.1934 Product 1
Client 4 15.02.1934 Product 2
Client 5 16.02.1934 Product 1
this is what i want..
Client Date Product1 Product 2 Product 3 Product 4 Product 5
Client 1 14.02.1980 1 1 1 1 1
Client 1 13.02.1934 1 1 1 1 0
Client 3 14.02.1934 1 1 1 0 0
Client 4 15.02.1934 1 1 0 0 0
Client 5 16.02.1934 1 0 0 0 0
I would be very happy if someone can help me. It is very urgent and important
Greetings!
i will transform a given data, but i dont know how can i do it in Rapidminer.
Given data:
Client Date Product
Client 1 14.02.1980 Product1
Client 1 14.02.1980 Product 2
Client 1 14.02.1980 Product 3
Client 1 14.02.1980 Product 4
Client 1 14.02.1980 Product 5
Client 1 13.02.1934 Product 1
Client 1 13.02.1934 Product 2
Client 1 13.02.1934 Product 3
Client 1 13.02.1934 Product 4
Client 3 14.02.1934 Product 1
Client 3 14.02.1934 Product 2
Client 3 14.02.1934 Product 3
Client 4 15.02.1934 Product 1
Client 4 15.02.1934 Product 2
Client 5 16.02.1934 Product 1
this is what i want..
Client Date Product1 Product 2 Product 3 Product 4 Product 5
Client 1 14.02.1980 1 1 1 1 1
Client 1 13.02.1934 1 1 1 1 0
Client 3 14.02.1934 1 1 1 0 0
Client 4 15.02.1934 1 1 0 0 0
Client 5 16.02.1934 1 0 0 0 0
I would be very happy if someone can help me. It is very urgent and important
Greetings!
0
Answers
in data transformation, type conversion
thank you for your answer.
yes, i can use it for type conversion.
But how can i get this table structure?
In Example: If a Client buys some Articles on 14.02.1980, it represents one Data set.
If the same Client buys on another day articles, it represents onother Data set..and so on..
Can you show me an Example-Workflow in Rapidminer?
Thanks!!
I think this may help..
Here's the data...
Client, Date, Product
Client 1, 14.02.1980, Product 1
Client 1, 14.02.1980, Product 2
Client 1, 14.02.1980, Product 3
Client 1, 14.02.1980, Product 4
Client 1, 14.02.1980, Product 5
Client 1, 13.02.1934, Product 1
Client 1, 13.02.1934, Product 2
Client 1, 13.02.1934, Product 3
Client 1, 13.02.1934, Product 4
Client 3, 14.02.1934, Product 1
Client 3, 14.02.1934, Product 2
Client 3, 14.02.1934, Product 3
Client 4, 15.02.1934, Product 1
Client 4, 15.02.1934, Product 2
Client 5, 16.02.1934, Product 1
And here's the code.. Hope so, good weekend to all!
good weekend !
Thanks for acknowledging, far too often folks don't bother to do that.
Have fun!
PS After I posted I thought it might be better to aggregate the data, here's how...
the workflow works correct, but there is a little Problem!
Here is the data:
Client Date Product
Client 1 14.02.1980 Product 1
Client 1 14.02.1980 Product 1
Client 1 14.02.1980 Product 1
Client 1 15.02.1980 Product 1
Client 1 14.02.1980 Product 3
Client 1 14.02.1980 Product 4
Client 1 14.02.1980 Product 5
Client 1 13.02.1934 Product 1
Client 1 13.02.1934 Product 2
Client 1 13.02.1934 Product 3
Client 1 13.02.1934 Product 4
Client 3 14.02.1934 Product 1
Client 3 14.02.1934 Product 2
Client 3 14.02.1934 Product 3
Client 4 15.02.1934 Product 1
Client 4 15.02.1934 Product 2
Client 5 16.02.1934 Product 1
So the Output in the Workflow is:
Row Client Date Prod.1 Prod.2 Prod.3 Prod.4 Prod5
1 Client 1 14.02.1980 3.0 0.0 1.0 1.0 1.0
2 Client 1 15.02.1980 1.0 0.0 0.0 0.0 0.0
3 Client 1 13.02.1934 1.0 1.0 1.0 1.0 0.0
4 Client 3 14.02.1934 1.0 1.0 1.0 0.0 0.0
5 Client 4 15.02.1934 1.0 1.0 0.0 0.0 0.0
6 Client 5 16.02.1934 1.0 0.0 0.0 0.0 0.0
It Aggregates the number of the Products..
So what i want to do is..group by Date (it´s correct here) and..:
1. if a Cust. buys a few Products on a same Date, it is one Dataset ( Transaktion) for the Table. ( so i will know, wich Products are bought
together) -->correct
2. So the grouping by date is here correkt.. because if the same Client buys another day, it is a new row and a new Transaction.
MY PROBLEM IS:
--> I dont want the sum of the Product.. i just want a "1" for buy.. "0" for not buy
how can i do this? daddock??
You can add a discretizing operator, which puts values in bands, like this...