Should not allow invalid clustering parameters

Issue #56 closed
Robert Leach created an issue

Cluster interface should have valid defaults. When a param is wrong, it should highlight and give feedback

Comments (9)

  1. Christopher Keil repo owner

    Could you specify what you mean with invalid defaults? The only possible invalid options I can think of are negative numbers or non-integer entries for the iterations and cluster numbers in K-Means. Do you mean those?

  2. Robert Leach reporter

    Well, I get errors about invalid values when I select k-means and just click cluster. I'll post some screen caps.

  3. Robert Leach reporter

    So after selecting Cluster->kmeans, I get this window:

    kmeans_defaults.png

    I go with the defaults and click cluster. I then see the error in red about invalid options selected:

    kmeans_valid_opts_error.png

    Then this error pops up:

    kmeans_save_error.png

    I would think it might be a good idea to have some reasonable defaults pre-entered or else mark certain fields as required and disable the cluster button until the required values have been changed.

  4. Christopher Keil repo owner

    ItemListeners and ChangeListeners have been implemented at the JComboboxes and JSpinners to check whether input is valid at every change event.

    Clustering won't even start without valid input parameters.

  5. Robert Leach reporter

    I tested this out. I like the new prevention of running clustering without entering required parameters. Great work. I don't think I could do that.

    Are there a set of defaults that could be pre-filled-in when you bring up the kmeans clustering interface so that one could just click the cluster button and get clustering going? I think that way, the cluster button would never do anything without feedback about invalid parameters (the red messages if they set the values to something that won't work). Either defaults could be used or the cluster button could be grayed out and the required fields could be marked with a red asterisk or something until they have valid parameters. What do you think?

    The cancel button doesn't seem to make the window go away.

    I get an error "When trying to load the cluster file, no file path could be found."

    I don't know if these are all related to this issue.

    I don't know much about kmeans, so I'm probably entering bogus stuff, but I'm sure there will be people out there that do that. Here's 2 screen recordings of my testing:

    http://gen-rlimac.princeton.edu/~rleach/TREEVIEWBUGS/kmeans_error.mov http://gen-rlimac.princeton.edu/~rleach/TREEVIEWBUGS/kmeans_no_cancel.mov

    Rob

  6. Christopher Keil repo owner

    Thanks a lot for testing, Rob. Cancel button doesn't work yet (or rather anymore) as a result of previous restructuring and it's one of the thing's I'll tackle next.

    I really like your suggestions about defaults and graying out the 'Cluster' button when currently chosen parameters are invalid. I should be able to implement this before merging the branch back.

    Every matrix axis has two input fields for k-means. One is the amount of clusters you want to end up with, the other the amount of iterations of the k-means algorithm that clusters the data into these groups. I am pretty sure the particular number someone would pick is largely dependent on the data and also their intentions with it.

    I'll do some research and maybe come up with some sensible default numbers. For now the priorities are to make 'Cancel' work and to let k-means produce meaningful output. Hopefully I'll get this done this week.

  7. Log in to comment