[prev in list] [next in list] [prev in thread] [next in thread]
List: wekalist
Subject: R: [Wekalist] Build your own Instances: error
From: "Cosimo Palmisano" <c.palmisano () poliba ! it>
Date: 2006-02-24 18:00:53
Message-ID: 200602241750.k1OHo5Zv011413 () mail ! poliba ! it
[Download RAW message or body]
In your opinion what are the hierarchical clustering algorithms. I
identified the cobweb. Are there any others implemented in weka?
Ciao
-----Messaggio originale-----
Da: Daniel Midgley [mailto:dmidgley@cyllene.uwa.edu.au]
Inviato: venerd́ 24 febbraio 2006 6.08
A: wekalist@list.scms.waikato.ac.nz
Oggetto: [Wekalist] Build your own Instances: error
Hello.
I'm trying to get into Weka's classes to hork some info out of certain
methods.
But I'm getting an error.
Here's what I'm doing:
1) I successfully create a new FileReader (from java.io.FileReader (string),
and the string I give it is the name of an .arff file.
(e.g. "Weather.arff")
2) I successfully create an Instances(Reader) object (from
weka.core.Instances), passing the FileReader to Instances as an argument.
3) I successfully create a Classifier ( let's just pick
weka.classifiers.trees.J48() )
4) Now here comes the problem. I try to call my new Classifier's
buildClassifier method. I pass it the name of my new Instances object, and
it throws an exception.
weka.core.Instances:355
UnassignedClassException
Class index is negative(not set)! in weka.core.Instances
Clearly I'm running afoul of the classAttribute() method in Instances, but I
can't figure out how to get past it, or what I'm doing wrong.
My ultimate goal is to use the DistributionForInstances method on a
Classifier object.
Any ideas?
Thanks,
Daniel
=-=-=-=-=-=-=-=-=-=-=-=-=
Daniel Midgley
University of Western Australia, Linguistics dmidgley at cyllene dot uwa dot
edu dot au =-=-=-=-=-=-=-=-=-=-=-=-=
_______________________________________________
Wekalist mailing list
Wekalist@list.scms.waikato.ac.nz
https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic