Note that there are some explanatory texts on larger screens.

plurals
  1. POLocally weighted logistic regression
    primarykey
    data
    text
    <p>I have been trying to implement a locally-weighted logistic regression algorithm in Ruby. As far as I know, no library currently exists for this algorithm, and there is very little information available, so it's been difficult.</p> <p>My main resource has been the <a href="http://www.cs.cmu.edu/~kdeng/thesis/logistic.pdf" rel="noreferrer">dissertation of Dr. Kan Deng</a>, in which he described the algorithm in what I feel is pretty light detail. My work so far on the library is <a href="https://github.com/orthogonal/USCF-Stats/blob/master/lib/LocalLogisticRegression.rb" rel="noreferrer">here</a>.</p> <p>I've run into trouble when trying to calculate <code>B</code> (beta). From what I understand, <code>B</code> is a <code>(1+d x 1)</code> vector that represents the local weighting for a particular point. After that, <code>pi</code> (the probability of a positive output) for that point is the sigmoid function based on the <code>B</code> for that point. To get <code>B</code>, use the Newton-Raphson algorithm recursively a certain number of times, probably no more than ten.</p> <p>Equation 4-4 on page 66, the Newton-Raphson algorithm itself, doesn't make sense to me. Based on my understanding of what <code>X</code> and W are, <code>(x.transpose * w * x).inverse * x.transpose * w</code> should be a <code>(1+d x N)</code> matrix, which doesn't match up with <code>B</code>, which is <code>(1+d x 1)</code>. The only way that would work, then, is if e were a <code>(N x 1)</code> vector.</p> <p>At the top of page 67, under the picture, though, Dr. Deng just says that e is a ratio, which doesn't make sense to me. Is e Euler's Constant, and it just so happens that that ratio is always 2.718:1, or is it something else? Either way, the explanation doesn't seem to suggest, to me, that it's a vector, which leaves me confused.</p> <p>The use of <code>pi'</code> is also confusing to me. Equation 4-5, the derivative of the sigmoid function w.r.t. B, gives a constant multiplied by a vector, or a vector. From my understanding, though, <code>pi'</code> is just supposed to be a number, to be multiplied by w and form the diagonal of the weight algorithm W.</p> <p>So, my two main questions here are, what is <code>e</code> on page 67 and is that the <code>1xN</code> matrix I need, and how does <code>pi'</code> in equation 4-5 end up a number?</p> <p>I realize that this is a difficult question to answer, so if there is a good answer then I will come back in a few days and give it a fifty point bounty. I would send an e-mail to Dr. Deng, but I haven't been able to find out what happened to him after 1997.</p> <p>If anyone has any experience with this algorithm or knows of any other resources, any help would be much appreciated!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload