Emerelle Queen | 14 Aug 2012 12:06
Picon
Favicon

Why weka.classifiers.functions.LibSVM creates different results on same dataset?

Hello,

I was just wondering why I get different results though I use the same
settings of the LibSVM and the same dataset?
I am using following command in the commandline:
weka.classifiers.functions.LibSVM -S 0 -K 1 -D 1 -G 0.0 -R 0.0 -N 0.5 -M
40.0 -C 0.5 -E 0.001 -P 0.1 -B -Z -T "testfile" -t  "trainfile"

It would be great if you can explain it to.
Thanks,
Emerelle
_______________________________________________
Wekalist mailing list
Send posts to: Wekalist <at> list.scms.waikato.ac.nz
List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
Mark Hall | 14 Aug 2012 12:15
Favicon

Re: Why weka.classifiers.functions.LibSVM creates different results on same dataset?

On 14/08/12 10:06 PM, Emerelle Queen wrote:
> Hello,
>
> I was just wondering why I get different results though I use the same
> settings of the LibSVM and the same dataset?
> I am using following command in the commandline:
> weka.classifiers.functions.LibSVM -S 0 -K 1 -D 1 -G 0.0 -R 0.0 -N 0.5 -M
> 40.0 -C 0.5 -E 0.001 -P 0.1 -B -Z -T "testfile" -t  "trainfile"
>
> It would be great if you can explain it to.
> Thanks,
> Emerelle

Newer versions of the libsvm library (>= 3.1) allow a random seed to be 
set, which makes the results deterministic from run to run. LibSVM 
(package for Weka >= 3.7.2) and stable-3-6 has been updated with a -seed 
option. This is available in the nightly snapshots of Weka 3.6 and will 
be in Weka 3.6.8 due out later this week.

Cheers,
Mark.

_______________________________________________
Wekalist mailing list
Send posts to: Wekalist <at> list.scms.waikato.ac.nz
List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html

Emerelle | 14 Aug 2012 14:18
Picon
Favicon

Re: Why weka.classifiers.functions.LibSVM creates different results on same dataset?


Hi,

thank you for your fast answer. I just tried it out with the nightly
snapshot and works perfectly.
Another thing that makes me wonder is why the output model which is created
by weka can't be used with svm-predict from LibSVM. Is there a was to make
it compatible?

Cheers,
Emerelle

Mark Hall-9 wrote:
> 
> On 14/08/12 10:06 PM, Emerelle Queen wrote:
>> Hello,
>>
>> I was just wondering why I get different results though I use the same
>> settings of the LibSVM and the same dataset?
>> I am using following command in the commandline:
>> weka.classifiers.functions.LibSVM -S 0 -K 1 -D 1 -G 0.0 -R 0.0 -N 0.5 -M
>> 40.0 -C 0.5 -E 0.001 -P 0.1 -B -Z -T "testfile" -t  "trainfile"
>>
>> It would be great if you can explain it to.
>> Thanks,
>> Emerelle
> 
> Newer versions of the libsvm library (>= 3.1) allow a random seed to be 
> set, which makes the results deterministic from run to run. LibSVM 
> (package for Weka >= 3.7.2) and stable-3-6 has been updated with a -seed 
> option. This is available in the nightly snapshots of Weka 3.6 and will 
> be in Weka 3.6.8 due out later this week.
> 
> Cheers,
> Mark.
> 
> 
> _______________________________________________
> Wekalist mailing list
> Send posts to: Wekalist <at> list.scms.waikato.ac.nz
> List info and subscription status:
> https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
> List etiquette:
> http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
> 
> 

--

-- 
View this message in context: http://old.nabble.com/Why-weka.classifiers.functions.LibSVM-creates-different-results-on-same-dataset--tp34295962p34296458.html
Sent from the WEKA mailing list archive at Nabble.com.

_______________________________________________
Wekalist mailing list
Send posts to: Wekalist <at> list.scms.waikato.ac.nz
List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
Mark Hall | 20 Aug 2012 10:54
Favicon

Re: Why weka.classifiers.functions.LibSVM creates different results on same dataset?

On 15/08/12 12:18 AM, Emerelle wrote:
>
> Hi,
>
> thank you for your fast answer. I just tried it out with the nightly
> snapshot and works perfectly.
> Another thing that makes me wonder is why the output model which is created
> by weka can't be used with svm-predict from LibSVM. Is there a was to make
> it compatible?

The LibSVM package for the developer version of Weka (>= 3.7.2) has a 
"-model" option that allows the internal libsvm model to be saved out to 
a file. This should be compatible with svm-predict.

Cheers,
Mark.

>
> Cheers,
> Emerelle
>
> Mark Hall-9 wrote:
>>
>> On 14/08/12 10:06 PM, Emerelle Queen wrote:
>>> Hello,
>>>
>>> I was just wondering why I get different results though I use the same
>>> settings of the LibSVM and the same dataset?
>>> I am using following command in the commandline:
>>> weka.classifiers.functions.LibSVM -S 0 -K 1 -D 1 -G 0.0 -R 0.0 -N 0.5 -M
>>> 40.0 -C 0.5 -E 0.001 -P 0.1 -B -Z -T "testfile" -t  "trainfile"
>>>
>>> It would be great if you can explain it to.
>>> Thanks,
>>> Emerelle
>>
>> Newer versions of the libsvm library (>= 3.1) allow a random seed to be
>> set, which makes the results deterministic from run to run. LibSVM
>> (package for Weka >= 3.7.2) and stable-3-6 has been updated with a -seed
>> option. This is available in the nightly snapshots of Weka 3.6 and will
>> be in Weka 3.6.8 due out later this week.
>>
>> Cheers,
>> Mark.
>>
>>
>> _______________________________________________
>> Wekalist mailing list
>> Send posts to: Wekalist <at> list.scms.waikato.ac.nz
>> List info and subscription status:
>> https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
>> List etiquette:
>> http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>>
>>
>

_______________________________________________
Wekalist mailing list
Send posts to: Wekalist <at> list.scms.waikato.ac.nz
List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html

Emerelle | 21 Aug 2012 09:47
Picon
Favicon

Re: Why weka.classifiers.functions.LibSVM creates different results on same dataset?


I just take a look at the "-model" option and it works with svm-predict.
However I already created a lot of models with the "-d" option. Is it
possible to convert them or do I really have to retrain my models and save
with the new option?

I tried to use following command line
weka.Run LibSVM -l existingModel.model -Test.arff -model
compatibleLibSVM.model 

but I get an error. I guess I can't use "-l"  "-model" at the same time?

Cheers,
Emerelle

Mark Hall-9 wrote:
> 
> On 15/08/12 12:18 AM, Emerelle wrote:
>>
>> Hi,
>>
>> thank you for your fast answer. I just tried it out with the nightly
>> snapshot and works perfectly.
>> Another thing that makes me wonder is why the output model which is
>> created
>> by weka can't be used with svm-predict from LibSVM. Is there a was to
>> make
>> it compatible?
> 
> The LibSVM package for the developer version of Weka (>= 3.7.2) has a 
> "-model" option that allows the internal libsvm model to be saved out to 
> a file. This should be compatible with svm-predict.
> 
> Cheers,
> Mark.
> 
>>
>> Cheers,
>> Emerelle
>>
>> Mark Hall-9 wrote:
>>>
>>> On 14/08/12 10:06 PM, Emerelle Queen wrote:
>>>> Hello,
>>>>
>>>> I was just wondering why I get different results though I use the same
>>>> settings of the LibSVM and the same dataset?
>>>> I am using following command in the commandline:
>>>> weka.classifiers.functions.LibSVM -S 0 -K 1 -D 1 -G 0.0 -R 0.0 -N 0.5
>>>> -M
>>>> 40.0 -C 0.5 -E 0.001 -P 0.1 -B -Z -T "testfile" -t  "trainfile"
>>>>
>>>> It would be great if you can explain it to.
>>>> Thanks,
>>>> Emerelle
>>>
>>> Newer versions of the libsvm library (>= 3.1) allow a random seed to be
>>> set, which makes the results deterministic from run to run. LibSVM
>>> (package for Weka >= 3.7.2) and stable-3-6 has been updated with a -seed
>>> option. This is available in the nightly snapshots of Weka 3.6 and will
>>> be in Weka 3.6.8 due out later this week.
>>>
>>> Cheers,
>>> Mark.
>>>
>>>
>>> _______________________________________________
>>> Wekalist mailing list
>>> Send posts to: Wekalist <at> list.scms.waikato.ac.nz
>>> List info and subscription status:
>>> https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
>>> List etiquette:
>>> http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>>>
>>>
>>
> 
> 
> _______________________________________________
> Wekalist mailing list
> Send posts to: Wekalist <at> list.scms.waikato.ac.nz
> List info and subscription status:
> https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
> List etiquette:
> http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
> 
> 

--

-- 
View this message in context: http://old.nabble.com/Why-weka.classifiers.functions.LibSVM-creates-different-results-on-same-dataset--tp34295962p34327913.html
Sent from the WEKA mailing list archive at Nabble.com.

_______________________________________________
Wekalist mailing list
Send posts to: Wekalist <at> list.scms.waikato.ac.nz
List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
Mark Hall | 21 Aug 2012 10:06
Favicon

Re: Why weka.classifiers.functions.LibSVM creates different results on same dataset?

On 21/08/12 7:47 PM, Emerelle wrote:
>
> I just take a look at the "-model" option and it works with svm-predict.
> However I already created a lot of models with the "-d" option. Is it
> possible to convert them or do I really have to retrain my models and save
> with the new option?
>
> I tried to use following command line
> weka.Run LibSVM -l existingModel.model -Test.arff -model
> compatibleLibSVM.model
>
> but I get an error. I guess I can't use "-l"  "-model" at the same time?

I'm afraid that you will have to re-train those models. The -model 
option is applied during buildClassifier() (at training time). Loading a 
Weka serialized model with -d and using it for prediction does not 
invoke buildClassifier().

Cheers,
Mark.

_______________________________________________
Wekalist mailing list
Send posts to: Wekalist <at> list.scms.waikato.ac.nz
List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html

Emerelle | 21 Aug 2012 10:10
Picon
Favicon

Re: Why weka.classifiers.functions.LibSVM creates different results on same dataset?


Thank you for your fast answers! They helped me a lot. :)

Cheers,
Emerelle  

Mark Hall-9 wrote:
> 
> On 21/08/12 7:47 PM, Emerelle wrote:
>>
>> I just take a look at the "-model" option and it works with svm-predict.
>> However I already created a lot of models with the "-d" option. Is it
>> possible to convert them or do I really have to retrain my models and
>> save
>> with the new option?
>>
>> I tried to use following command line
>> weka.Run LibSVM -l existingModel.model -Test.arff -model
>> compatibleLibSVM.model
>>
>> but I get an error. I guess I can't use "-l"  "-model" at the same time?
> 
> I'm afraid that you will have to re-train those models. The -model 
> option is applied during buildClassifier() (at training time). Loading a 
> Weka serialized model with -d and using it for prediction does not 
> invoke buildClassifier().
> 
> Cheers,
> Mark.
> 
> 
> _______________________________________________
> Wekalist mailing list
> Send posts to: Wekalist <at> list.scms.waikato.ac.nz
> List info and subscription status:
> https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
> List etiquette:
> http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
> 
> 

--

-- 
View this message in context: http://old.nabble.com/Why-weka.classifiers.functions.LibSVM-creates-different-results-on-same-dataset--tp34295962p34328010.html
Sent from the WEKA mailing list archive at Nabble.com.

_______________________________________________
Wekalist mailing list
Send posts to: Wekalist <at> list.scms.waikato.ac.nz
List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html

Gmane