illinois-ml-nlp-users AT lists.siebelschool.illinois.edu
Subject: Support for users of CCG software closed 7-27-20
List archive
- From: Jiaping Zheng <jzheng AT cs.umass.edu>
- To: illinois-ml-nlp-users AT cs.uiuc.edu
- Subject: Re: [Illinois-ml-nlp-users] LBJ2 SparseAveragedPerceptron learning
- Date: Thu, 12 Apr 2012 13:10:35 -0400
- List-archive: <http://lists.cs.uiuc.edu/pipermail/illinois-ml-nlp-users>
- List-id: Support for users of CCG software <illinois-ml-nlp-users.cs.uiuc.edu>
Thanks Nick,
I had a problem reading back an object. Here is my code snippet
SparseAveragedPerceptron p = new SparseAveragedPerceptron(learningRate,
threshold, thickness);
p.initialize(dataSize, featureSize)
for (int i = 1; i <= rounds; i++) {
for (each data instance)
p.learn(featureIndex, featureValue, labelIndex, lablelValue);
p.doneWithRound();
}
p.doneLearning();
p.write(new ExceptionlessOutputStream(new ObjectOutputStream(new
FileOutputStream("file")));
p.read(new ExceptionlessInputStream(new ObjectInputStream(new
FileInputStream("file")));
Here is the error I got:
Error in UTF formatting: malformed input around byte 14
java.lang.Exception
at
LBJ2.util.ExceptionlessInputStream.readUTF(ExceptionlessInputStream.java:500)
at
LBJ2.util.ExceptionlessInputStream.readString(ExceptionlessInputStream.java:403)
at LBJ2.classify.Feature.readFeature(Feature.java:552)
at LBJ2.util.FVector.read(FVector.java:282)
at LBJ2.learn.Learner.readLabelLexicon(Learner.java:1302)
at LBJ2.learn.Learner.read(Learner.java:1280)
at LBJ2.learn.LinearThresholdUnit.read(LinearThresholdUnit.java:693)
at
LBJ2.learn.SparseAveragedPerceptron.read(SparseAveragedPerceptron.java:378)
What is the recommended way of saving and reading?
--
Jiaping
- [Illinois-ml-nlp-users] LBJ2 SparseAveragedPerceptron learning, Jiaping Zheng, 04/10/2012
- Re: [Illinois-ml-nlp-users] LBJ2 SparseAveragedPerceptron learning, Nicholas Rizzolo, 04/11/2012
- Re: [Illinois-ml-nlp-users] LBJ2 SparseAveragedPerceptron learning, Jiaping Zheng, 04/12/2012
- Re: [Illinois-ml-nlp-users] LBJ2 SparseAveragedPerceptron learning, Nicholas Rizzolo, 04/13/2012
- Re: [Illinois-ml-nlp-users] LBJ2 SparseAveragedPerceptron learning, Jiaping Zheng, 04/12/2012
- Re: [Illinois-ml-nlp-users] LBJ2 SparseAveragedPerceptron learning, Nicholas Rizzolo, 04/11/2012
Archive powered by MHonArc 2.6.16.