The Data Mining Forum                             open-source data mining software data mining conferences Data Science for Social and Behavioral Analytics DSSBA 2022 data science journal
IMPORTANT: This is the old Data Mining forum.
I keep it online so that you can read the old messages.

Please post your new messages in the new forum: https://forum2.philippe-fournier-viger.com/index.php
 
BUG: ItemValued Class
Posted by: Dana
Date: February 01, 2013 08:50AM

Your Item Valued class has a bug where the min and max values to do not display if the min OR max values in the cluster are zero. Why would zero not be a valid item value? I'm using grade-based data and an F has a value of zero. I could easily alter my data, but why? Like your sequenceID, I would suggest instead, initializing min and max to -1 and then testing against that value. I've put this fix in my own code and it works perfectly, displaying all of the min/max values:

// Data members:
private double min = -1;
private double max = -1;

// toString method:
public String toString(){
StringBuffer temp = new StringBuffer();
temp.append(getId());
temp.append(" ("winking smiley;
temp.append(getValue());
if(min != -1 && max != -1){
temp.append(", min="winking smiley;
temp.append(getMin());
temp.append(" max=" );
temp.append(getMax());
}
temp.append(')');
if(getCluster() != null){
temp.append('[');
temp.append(getCluster().getMedian());
temp.append(']');
}
return temp.toString();
}

Options: ReplyQuote
Re: BUG: ItemValued Class
Date: February 04, 2013 07:53PM

Hi Dana,

Thanks for reporting this issue.

Actually, I had done this purposely in previous version of SPMF because I had a sequential pattern mining algorithm that was using the clustering algorithm and I did not want to show the min and max for items without values (In my code, an item without value, was an item with a value of 0). But you are right, it can be interesting to show the value 0.

I take note of this and will fix this in the next release.

Best,

Philippe

Options: ReplyQuote


This forum is powered by Phorum and provided by P. Fournier-Viger (© 2012).
Terms of use.