Dealing with large kernel matrix in SVM, Matlab

167 Views Asked by At

I have a matrix X, size 40x60000

while writing the SVM, I need to form a linear kernel: $K = X^TX$

And of course I would get an error "Requested 60000x60000 (26.8GB) array exceeds maximum array size preference".

How is it usually done? the data set is Mnist, so someone must have done this before. In this case $\text{rank}(K) \leq 40$, I need a way to store K and later pass it to $\texttt{quadprog}$.