Sorry, they isn't problem with String attribute.
It's when evalutionClusterer call printClusterStats(), the attribute value
of Instance "inst" below is strange they are always the same and don't
change. Is the DataSource class not doing good?
private static String printClusterStats(Clusterer clusterer, String
fileName)
{
...
if (fileName.length() != 0) {
DataSource source = new DataSource(fileName);
Instances structure = source.getStructure();
Instances forBatchPredictors =
(clusterer instanceof BatchPredictor && ((BatchPredictor) clusterer)
.implementsMoreEfficientBatchPrediction()) ? new Instances(
source.getStructure(), 0) : null;
Instance inst;
while (source.hasMoreElements(structure)) {
inst = source.nextElement(structure); //<-- here always generate a
very strange Instance with the same wrong value
if (forBatchPredictors != null) {
forBatchPredictors.add(inst);
} else {
try {
cnum = clusterer.clusterInstance(inst); //<- so here
clusterInstance can't recognise the Instance to return the cluster
if (clusterer instanceof DensityBasedClusterer) {
loglk +=
((DensityBasedClusterer)
clusterer).logDensityForInstance(inst);
// temp = Utils.sum(dist);
}
instanceStats[cnum]++;
} catch (Exception e) {
unclusteredInstances++;
}
i++;
}
}
...
}
--
Sent from:
https://weka.8497.n7.nabble.com/_______________________________________________
Wekalist mailing list --
[hidden email]
Send posts to: To unsubscribe send an email to
[hidden email]
To subscribe, unsubscribe, etc., visit
https://list.waikato.ac.nz/postorius/lists/wekalist.list.waikato.ac.nzList etiquette:
http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html