I think this is a bug since this class is read as a Writable, which
means it needs a no-arg constructor, but it has none. I will just add
one now.

Sean

On Thu, Jun 30, 2011 at 2:17 PM, XiaoboGu <guxiaobo1...@gmail.com> wrote:
> The latest mahout-696.path can work with mahout-trunk rev1104229, which is my 
> development revision, but when patched with 0.5 release, the following error 
> occur when run validateAdaptiveLogistic
>
>
> Exception in thread "main" java.io.IOException: Can't create object
>        at 
> org.apache.mahout.classifier.sgd.PolymorphicWritable.read(PolymorphicWritable.java:45)
>        at 
> org.apache.mahout.classifier.sgd.OnlineLogisticRegression.readFields(OnlineLogisticRegression.java:162)
>        at 
> org.apache.mahout.classifier.sgd.CrossFoldLearner.readFields(CrossFoldLearner.java:317)
>        at 
> org.apache.mahout.classifier.sgd.AdaptiveLogisticRegression$Wrapper.readFields(AdaptiveLogisticRegression.java:435)
>        at 
> org.apache.mahout.classifier.sgd.PolymorphicWritable.read(PolymorphicWritable.java:51)
>        at org.apache.mahout.ep.State.readFields(State.java:297)
>        at 
> org.apache.mahout.classifier.sgd.PolymorphicWritable.read(PolymorphicWritable.java:51)
>        at 
> org.apache.mahout.ep.EvolutionaryProcess.readFields(EvolutionaryProcess.java:222)
>        at 
> org.apache.mahout.classifier.sgd.AdaptiveLogisticRegression.readFields(AdaptiveLogisticRegression.java:539)
>        at 
> org.apache.mahout.classifier.sgd.AdaptiveLogisticModelParameters.readFields(AdaptiveLogisticModelParameters.java:173)
>        at 
> org.apache.mahout.classifier.sgd.AdaptiveLogisticModelParameters.loadFromStream(AdaptiveLogisticModelParameters.java:179)
>        at 
> org.apache.mahout.classifier.sgd.AdaptiveLogisticModelParameters.loadFromFile(AdaptiveLogisticModelParameters.java:186)
>        at 
> org.apache.mahout.classifier.sgd.ValidateAdaptiveLogistic.main(ValidateAdaptiveLogistic.java:70)
> Caused by: java.lang.InstantiationException: 
> org.apache.mahout.classifier.sgd.ElasticBandPrior
>        at java.lang.Class.newInstance0(Class.java:340)
>        at java.lang.Class.newInstance(Class.java:308)
>        at 
> org.apache.mahout.classifier.sgd.PolymorphicWritable.read(PolymorphicWritable.java:43)
>        ... 12 more
>
>
>
>
>> -----Original Message-----
>> From: Lance Norskog [mailto:goks...@gmail.com]
>> Sent: Thursday, June 30, 2011 11:26 AM
>> To: dev@mahout.apache.org
>> Subject: Re: [jira] [Updated] (MAHOUT-696) Command line program for
>> AdaptiveLogiscticRegression
>>
>> Thanks for this project, Xiaobo! I look forward to playing with it.
>>
>> Lance
>>
>> On Wed, Jun 29, 2011 at 8:21 PM, XiaoboGu (JIRA) <j...@apache.org> wrote:
>> >
>> >     [ 
>> > https://issues.apache.org/jira/browse/MAHOUT-696?page=com.atlassian.jira.plugin
>> .system.issuetabpanels:all-tabpanel ]
>> >
>> > XiaoboGu updated MAHOUT-696:
>> > ----------------------------
>> >
>> >    Attachment: MAHOUT-696.patch
>> >
>> > This version has passed the following testes:
>> > mahout trainAdaptiveLogistic --input donut.csv --output d:\\model1 
>> > --target color
>> --categories 2 --predictors x y --types numeric --threads 8
>> > mahout trainAdaptiveLogistic --input donut.csv --output d:\\model1 
>> > --target color
>> --categories 2 --predictors x y --types numeric --threads 8 --showperf
>> > mahout trainAdaptiveLogistic --input donut.csv --output d:\\model1 
>> > --target color
>> --categories 2 --predictors x y --types numeric --threads 8 --passes 1000
>> > mahout trainAdaptiveLogistic --input donut.csv --output d:\\model1 
>> > --target color
>> --categories 2 --predictors x y --types numeric --threads 8 --passes 1000 
>> --showperf
>> > mahout trainAdaptiveLogistic --input donut.csv --output d:\\model1 
>> > --target color
>> --categories 2 --predictors x y --types numeric --threads 8 --passes 1000 
>> --showperf
>> --features 100
>> > mahout trainAdaptiveLogistic --input donut.csv --output d:\\model1 
>> > --target color
>> --categories 2 --predictors x y --types numeric --threads 8 --passes 1000 
>> --showperf
>> --features 100 --skipperfnum 399
>> >
>> > mahout trainAdaptiveLogistic --input donut.csv --output d:\\model1 
>> > --target color
>> --categories 2 --predictors x y --types numeric --threads 8 --passes 1000 
>> --showperf
>> --features 100 --skipperfnum 399 --prior L1
>> > mahout trainAdaptiveLogistic --input donut.csv --output d:\\model1 
>> > --target color
>> --categories 2 --predictors x y --types numeric --threads 8 --passes 1000 
>> --showperf
>> --features 100 --skipperfnum 399 --prior L2
>> > mahout trainAdaptiveLogistic --input donut.csv --output d:\\model1 
>> > --target color
>> --categories 2 --predictors x y --types numeric --threads 8 --passes 1000 
>> --showperf
>> --features 100 --skipperfnum 399 --prior up
>> > mahout trainAdaptiveLogistic --input donut.csv --output d:\\model1 
>> > --target color
>> --categories 2 --predictors x y --types numeric --threads 8 --passes 1000 
>> --showperf
>> --features 100 --skipperfnum 399 --prior tp
>> > mahout trainAdaptiveLogistic --input donut.csv --output d:\\model1 
>> > --target color
>> --categories 2 --predictors x y --types numeric --threads 8 --passes 1000 
>> --showperf
>> --features 100 --skipperfnum 399 --prior ebp
>> > mahout trainAdaptiveLogistic --input donut.csv --output d:\\model1 
>> > --target color
>> --categories 2 --predictors x y --types numeric --threads 8 --passes 1000 
>> --showperf
>> --features 100 --skipperfnum 399 --prior tp --prioroption 2
>> > mahout trainAdaptiveLogistic --input donut.csv --output d:\\model1 
>> > --target color
>> --categories 2 --predictors x y --types numeric --threads 8 --passes 1000 
>> --showperf
>> --features 100 --skipperfnum 399 --prior ebp --prioroption 2
>> >
>> > mahout trainAdaptiveLogistic --input donut.csv --output d:\\model1 
>> > --target color
>> --categories 2 --predictors x y --types numeric --threads 8 --passes 1000 
>> --showperf
>> --features 100 --skipperfnum 399 --prior L1 --auc global
>> > mahout trainAdaptiveLogistic --input donut.csv --output d:\\model1 
>> > --target color
>> --categories 2 --predictors x y --types numeric --threads 8 --passes 1000 
>> --showperf
>> --features 100 --skipperfnum 399 --prior L1 --auc grouped
>> >
>> > mahout validateAdaptiveLogistic --input donut-test.csv --model d:\\model1 
>> > --auc
>> --confusion --scores
>> >
>> > mahout runAdaptiveLogistic --input donut-test.csv --model d:\\model1 
>> > --output
>> d:\\scores.txt --idcolumn c
>> > mahout runAdaptiveLogistic --input donut-test.csv --model d:\\model1 
>> > --output
>> d:\\scores1.txt --idcolumn c --maxscoreonly
>> >
>> >
>> >
>> >> Command line program for AdaptiveLogiscticRegression
>> >> ----------------------------------------------------
>> >>
>> >>                 Key: MAHOUT-696
>> >>                 URL: https://issues.apache.org/jira/browse/MAHOUT-696
>> >>             Project: Mahout
>> >>          Issue Type: Improvement
>> >>          Components: Classification
>> >>    Affects Versions: 0.5
>> >>            Reporter: XiaoboGu
>> >>            Assignee: Ted Dunning
>> >>             Fix For: 0.6
>> >>
>> >>         Attachments: MAHOUT-696.patch, MAHOUT-696.patch, MAHOUT-696.patch,
>> MAHOUT-696.patch, MAHOUT-696.patch, mahout-696-r1.patch, mahout-696-r2.patch,
>> mahout-696-r3.patch, mahout-696-r4.patch, mahout-696-r5.patch
>> >>
>> >>
>> >> Suggested by Ted, I'll try to write a command line program for
>> AdaptiveLogicticRegression, but as I am not familir with the algorithm, I'll 
>> try to write a
>> prototype for the program from a Java developer's perspactive, hope anyone 
>> else will help
>> with the details of the algorithm.
>> >
>> > --
>> > This message is automatically generated by JIRA.
>> > For more information on JIRA, see: http://www.atlassian.com/software/jira
>> >
>> >
>> >
>>
>>
>>
>> --
>> Lance Norskog
>> goks...@gmail.com
>
>

Reply via email to