[prev in list] [next in list] [prev in thread] [next in thread]
List: wekalist
Subject: RE: [Wekalist] call classifier.buildClassifier(train) from C# got
From: "#KIM THI NHU QUYNH#" <KIMT0001 () ntu ! edu ! sg>
Date: 2006-12-30 3:29:50
Message-ID: E34B647509ED144F860435CD5CAA860022B961 () MAIL23 ! student ! main ! ntu ! edu ! sg
[Download RAW message or body]
Hi
If so, can I write an application to call libSVM from Java, then use IKVM to call \
that application in C#. Do you think it is possible to do like that?
Thanks so much,
Kim Thi Nhu Quynh
-----Original Message-----
From: wekalist-bounces@list.scms.waikato.ac.nz on behalf of Peter Reutemann
Sent: Sat 12/30/2006 5:48 AM
To: Weka machine learning workbench list.
Subject: Re: [Wekalist] call classifier.buildClassifier(train) from C# got error: \
ArgumentException
> I am trying to call classifier.buildClassifier(train) in C# (Microsoft
> Visual Studio 2005) whereas classifier =
> weka.classifiers.Classifier.makeCopy(template);
> and weka.core.Instances train = inst.trainCV(numFolds, fold, random);
>
> the logic is nearly the same as the code in
> ClassifierPanel.startClassifier()
> but I got the error is
>
> Build classifier : System.ArgumentException: Type must be a type provided
> by the runtime.
> Parameter name: elementType
> at System.Array.CreateInstance(Type elementType, Int32 length)
> at IKVM.NativeCode.java.lang.reflect.VMArray.createObjectArray(Object
> clazz, Int32 dim)
> at java.lang.reflect.VMArray.createObjectArray(Class, Int32)
> at java.lang.reflect.Array.createMultiArray(Class, Int32[], Int32)
> at java.lang.reflect.Array.newInstance(Class componentType, Int32[]
> dimensions)
> at weka.classifiers.functions.LibSVM.newArray(Object obj, String str,
> Class c, Int32[] iarr)
> at weka.classifiers.functions.LibSVM.getProblem(Vector v1, Vector v2)
> at weka.classifiers.functions.LibSVM.buildClassifier(Instancs i)
> at Mechine_Learning_Module.Form1.buttonStartPrediction_Click(....)......
The LibSVM classifier calls the libsvm library via Reflection at runtime,
so no information about types possible at compile-time. That could explain
the error message above. It's quite likely that LibSVM will never work
from C#.
Cheers, Peter
--
Peter Reutemann, Dept. of Computer Science, University of Waikato, NZ
http://www.cs.waikato.ac.nz/~fracpete/ Ph. +64 (7) 858-5174
_______________________________________________
Wekalist mailing list
Wekalist@list.scms.waikato.ac.nz
https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
["winmail.dat" (application/ms-tnef)]
_______________________________________________
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