# Tag Info

0

The usual approach with unbalanced classes is just to make the train and test sets as homogenous as possible. So make sure that proportions of the classes in both sets are the same. There are many factors that can be taken into account when splitting data, but I'm gonna guess that you just need the basic approach. In sklearn that would be any stratified ...

0

What percentages are you using for buy, hold and sell classes? From the data you share in the question, I am guessing it is a stock that has been going up rather than down for the most of the days. So, if you increase percentage cutoffs you have for the stock, you will have a balanced data. As you don't share the details in your question, let's assume you ...

0

You are correct. Sanity check: The final (incorrect) formulation of the optimization problem would not make sense because when you maximize over a certain variable, you essentially take that variable out of the expression. It's fixed. In that vein, I think Ng's notation would be more informative in equation (1) if they wrote the lagrangian as $L(\alpha)$ ...

0

Often it is not clear at beginning of a project how difficult a task is and which elements will have biggest impact. One approach is to setup a machine learning system to systematically evaluate options and empirically explore the problem. First setup the simplest possible text classification pipeline where the raw text enters the pipeline and "change&...

0

The sign is just a matter of convention. If you use plus instead of minus, it simply flips the sign of the multiplier itself. The method of finding them is the same. I am not sure if I understand the second part of your question but the first equation is for the general case where the number of Lagrange multipliers can be more than one - if you have more ...

2

First, you can notice that the points which are satisfying the constraint are the surface of a norm-ball. Hence they don't form a convex set. Also, consider ∥x∥=1 and ∥-x∥=1. You can easily observe that (1/2)(x+(−x)) has 0 norm. So, it is not closed under convex combination.

1

Assuming $x^{(i)} \in \mathbb{R}^{dx1}$ with $d>0$ we have: $$\frac{1}{2} \left\lVert \sum_{i=1}^n\alpha_iy^{(i)}x^{(i)} \right\rVert ^2 = \frac{1}{2}\left( \sum_{i=1}^n\alpha_iy^{(i)}x^{(i)} \right)^T \left( \sum_{i=1}^n\alpha_iy^{(i)}x^{(i)} \right) = \frac{1}{2} \sum_{i,j=1}^n y^{(i)} y^{(j)} \alpha_i \alpha_j (x^{(i)})^T x^{(j)}$$ You need to be ...

0

Hint: $w^Tw = \Vert w \Vert^2$ this stems directly from the definitions of norm and matrix product (assuming $w$ is column vector as usually taken) and one can expand the two sides to prove it easily. Note that technically $w^Tw$ is a $1 \times 1$ matrix but any such matrix is identified with its single scalar entry. So it is simply a scalar number. Or ...

0

Correlation analysis is very useful for a number of reasons, and not just for SVM classification. In the case of feature selection, if two features in your dataset are highly correlated it means there is redundancy in your feature set (i.e. both features are explaining similar sources of variation in your data). By eliminating redundant features you can ...

Top 50 recent answers are included