Skip to Content.
Sympa Menu

illinois-ml-nlp-users - Re: [Illinois-ml-nlp-users] LBJ2 SparseAveragedPerceptron learning

illinois-ml-nlp-users AT lists.cs.illinois.edu

Subject: Support for users of CCG software closed 7-27-20

List archive

Re: [Illinois-ml-nlp-users] LBJ2 SparseAveragedPerceptron learning


Chronological Thread 
  • From: Nicholas Rizzolo <rizzolo AT gmail.com>
  • To: Jiaping Zheng <jzheng AT cs.umass.edu>
  • Cc: illinois-ml-nlp-users AT cs.uiuc.edu
  • Subject: Re: [Illinois-ml-nlp-users] LBJ2 SparseAveragedPerceptron learning
  • Date: Wed, 11 Apr 2012 07:15:30 -0700
  • 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>

Hi Jiaping,

You are correct about the semantics of the exampleFeatures and
exampleValues parameters. The labels on an example work very
similarly, since, after all, labels are just features which we are
treating specially. In the most common case, Perceptron will expect a
single, binary label, so you'll pass single element arrays to both
exampleLabels and labelValues. The element of exampleLabels should be
a feature index that is different from any index you'll ever pass to
exampleFeatures, and the element of labelValues should be either 1 or
0 to indicate the positive or negative label value, respectively.

It's true that this interface is much more general than it needs to be
for this algorithm, but we wanted to support any conceivable variant
of the algorithm and to keep their interfaces as consistent as
possible.

Hope that helps; let me know if you have more questions.
- Nick


On Tue, Apr 10, 2012 at 8:46 AM, Jiaping Zheng
<jzheng AT cs.umass.edu>
wrote:
> Hello,
>
> I'm trying to train a SparseAveragedPerceptron classifier using the
> LBJ2 API.  I think I need to call the learn function [1].  My
> understanding is `exampleFeatures' is the feature indices that have
> non-zero value, and `exampleValues' is these non-zero feature values.
> However, I'm confused what `exampleLabels' and 'labelValues' are.
>
> [1]
> http://cogcomp.cs.illinois.edu/software/doc/LBJ2/library/LBJ2/learn/SparseAveragedPerceptron.html#learn(int[],
> double[], int[], double[])
>
> Regards,
> Jiaping
> _______________________________________________
> illinois-ml-nlp-users mailing list
> illinois-ml-nlp-users AT cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/illinois-ml-nlp-users





Archive powered by MHonArc 2.6.16.

Top of Page