Ben
  • Member for 8 years, 3 months
  • Last seen more than a month ago
How does gradient descent help SVM learn a linearly separable hyperplane?
Accepted answer
3 votes

What you've described is not gradient descent. It's the Perceptron learning algorithm. Additionally, the perceptron algorithm doesn't learn the separating line of maximum margin as is the case with ...

View answer
How to get started with neural networks
0 votes

I'll throw my hat into the ring. Read / listen to multiple explanations from different people. Master the Perceptron before you attempt to learn Multilayer Perceptrons (i.e neural networks) As you ...

View answer
How to estimate discrete probability distribution from a dataset of pairwise frequencies?
1 votes

With some help from @whuber and @Lucas Prates, I've put together this solution (which is pretty close to @whuber's solution). My general approach is to use maximum likelihood estimation in the ...

View answer
How many neighbor-swaps does it take to undo a random shuffle of N items?
0 votes

After realizing this is bubble sort, I found the answer here. $$\frac{n(n-1)}{4}$$

View answer
How to calculate cumulative distribution in R?
1 votes

I always found ecdf() to be a little confusing. Plus I think it only works in the univariate case. Ended up rolling my own function for this instead. First install data.table. Then install my package,...

View answer
Proof of why Randomization is Important In Experiments
1 votes

I'm not familiar with a proof, but the general concept is known as Sampling bias.

View answer
Support Vector Machine Soft Margin
Accepted answer
1 votes

$ξ_i$ is like the distance you're going to allow the ith point to fall inside the margin. If it is 0, you're not allowing it in the margin. If it is positive you're allowing it to fall inside the ...

View answer
Optimizing a Support Vector Machine with Quadratic Programming
8 votes

Following rightskewed's hints... library(quadprog) # min(−dvec^T b + 1/2 b^T Dmat b) with the constraints Amat^T b >= bvec) Dmat <- matrix(rep(0, 3*3), nrow=3, ncol=3) diag(Dmat) <- 1 ...

View answer
Can I fit logistic regression over a dataset with only categorical data?
4 votes

Yes of course you can. Just be aware of the nature of your categorical data - is it ordered or unordered? If ordered (e.g. small, medium, large) you might want a single feature X1 with values like (1,...

View answer
Scikit predict_proba output interpretation
Accepted answer
5 votes

Take a look at y_train. It is array([0, 0, 1]). This means your split didn't pick up the sample where y=2. So, your model has no idea that the class y=2 exists. You need more samples for this to ...

View answer