From: Maurice on 19 May 2010 04:34 In the documentation of stats toolbox, readable on http://www.mathworks.com/access/helpdesk/help/toolbox/stat/classregtree.html it is said that we can use a "weights" option. I dont understand how we can do it. Somebody can help me? thanks Maurice
From: Wayne King on 19 May 2010 06:52 "Maurice " <maurice.charbit(a)telecom-paristech.fr> wrote in message <ht07q0$84r$1(a)fred.mathworks.com>... > In the documentation of stats toolbox, readable on > http://www.mathworks.com/access/helpdesk/help/toolbox/stat/classregtree.html > it is said that we can use a "weights" option. I dont understand how we can do it. > Somebody can help me? > > thanks > > Maurice Hi Maurice, weights is a numeric vector of nonnegative numbers. There must be one weight for each observation in your dataset, which means that the number of weights has to equal the number of elements in the row dimension of your X matrix. Remember, each column of X is a predictor variable and the number of elements in every column of X is your number of observations. By default, every observation is given an equal weight of one, which in essence says that all the observations are deemed to be equally precise, of equal quality, or equally reliable, depending on how you want to look at it. I'm assuming the fact that you are considering the weights option means that you want to downweight, i.e. reduce the influence, some of your observations? The syntax is just as shown in the documentation: w = ones(100,1); % weights vector obviously these are just ones % some junk data X = randn(100,2); y = randn(100,1); T = classregtree(X,y,'weights',w); Wayne
|
Pages: 1 Prev: Sample Time & integration Next: how to automatically create "smart" files names |