Nope. The target values from 1.... to n-1 will be mapper to a list of target
value from 0....to n-2.
And in the beta matrix, we will use all 0 weights for the first line vector,
so the weight generated would be beta[0]..... to beta[n-3].

Best wishes,
Stanley Xu



On Mon, May 30, 2011 at 10:16 AM, Xiaobo Gu <[email protected]> wrote:

> On Mon, May 30, 2011 at 2:30 AM, Ted Dunning <[email protected]>
> wrote:
> > Target values 1 ... n-1 correspond to columns 0 ... n-2 of the beta
> matrix.
> >  classifyFull puts a synthetic result at location 0.
>
> I think Target values 1 ... n-1 correspond to row 0, ... n-1 of the beta
> matrix,
>
> is it ?
>
>
>
> >
> > If you can afford the (very small) cost of allocating a larger vector, I
> > recommend using classifyFull to make your life simpler.  I almost regret
> > using the simpler name for the method that imposes complexity on the
> user.
> >
> > On Sun, May 29, 2011 at 12:57 AM, XiaoboGu <[email protected]>
> wrote:
> >
> >> Then which value is missed in the beta matrix of
> OnlineLogisticRegression,
> >> the last value of the target present to LR.train(), that is n - 1 is
> missed?
> >>
> >>
> >> > -----Original Message-----
> >> > From: Ted Dunning [mailto:[email protected]]
> >> > Sent: Sunday, May 29, 2011 1:44 PM
> >> > To: [email protected]
> >> > Subject: Re: Are the OnlineLogisticRegression s of a
> CrossFolderLearner
> >> object equal after
> >> > training?
> >> >
> >> > I think not.
> >> >
> >> > When you present the first symbol to the Dictionary, dict.size() will
> be
> >> > zero.  That value will be inserted into the table under that symbol.
> >>  Each
> >> > new symbol will be inserted with the size of the table as it was
> *before*
> >> > that symbol was inserted.
> >> >
> >> > I have added a line to CsvRecordFactoryTest.testDictionaryOrder to
> >> > demonstrate and enforce this.  It won't be committed until the current
> >> > release goes out.
> >> >
> >> > On Sat, May 28, 2011 at 9:57 PM, XiaoboGu <[email protected]>
> >> wrote:
> >> > >
> >> > >
> >> > > Ok, then target values are always more than 0, I refer to this
> >> > >
> >> > > public class Dictionary {
> >> > >  private final Map<String, Integer> dict = Maps.newLinkedHashMap();
> >> > >
> >> > >  public int intern(String s) {
> >> > >    if (!dict.containsKey(s)) {
> >> > >      dict.put(s, dict.size());
> >> > >    }
> >> > >    return dict.get(s);
> >> > >   }
> >> > >
> >> > >
> >> > >
> >>
> >>
> >
>

Reply via email to