Due to recent updates, all users are required to create an Altair One account to login to the RapidMiner community. Click the Register button to create your account using the same email that you have previously used to login to the RapidMiner community. This will ensure that any previously created content will be synced to your Altair One account. Once you login, you will be asked to provide a username that identifies you to other Community users. Email us at Community with questions.
Historgam Question [SOLVED]
Alex_Pelaez
Member Posts: 3 Contributor I
I have a dataset, and am trying to create a histogram. Unfortunately, I am trying to sort the categories in the histogram. I have tried to sort the data set ,I even tried to create a new attribute. I cannot get the histogram to either show the highest frequencies on the left or the right. Can anyone provide some insight?
Alex
Alex
0
Answers
unfortunately it is not possible to sort the axes of the plotter explicitly. The values aren't sorted alphabetically either, but by the order they have been added to the dataset. So to get a sorted histogram, you have to create a new attribute and add the values ordered by their frequency. This requires a rather large and clumsy process, but it is possible: see the attached process.
After generating some data, it is aggregated manually by att1, the sorted by the frequencies. Then a new attribute natt1 is created, with the same values as att1. Since after sorting the example set is in the desired order, and Generate Attributes processes the data set from top to bottom, the values are added in the correct order. The problem is, that we are working on the aggregated data. You could now plot it using a scatter plot, but then you would have dots instead of bars. So we have to join it with the original data. Here it is important to do a left join, otherwise the order won't be kept.
The last two operators remove the original att1 and rename the new attribute natt1 to att1.
If you now create a histogram as usual on att1, it will be ordered by the frequencies.
Yes, it is quite complicated and confusing, but it's the only possibilty that comes into my mind. Maybe there is another creative head around who finds a better solution
Best, Marius