Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to factor a matrix to a product of kernel matrices?

Problem statement:

Say we have a set of kernel square matrices = {K1, K2, .., Kn}. Given a matrix A find the product involving the least amount of matrix multiplications which gives: A = Ki * Kj * ... * Kz

Example:

Say we have these two matrices in the set of Kernel matrices:
K1 = (1 2)    K2 = (5 6)
     (3 4)         (7 8)

Then we have a solution for A=K1*K2=(19 22) and also for B=K1*K1*K2=(105 122)
                                    (43 50)                         (229 266)

Is there any existing C or C++ library which I can use to find the solution? If not, is there any known algorithm/heuristics?

P.S. this is not a homework question or a theoretical question or some other trolly thing. This is a real problem I need to solve for a side project I am working on at my day job.

like image 306
zr. Avatar asked May 29 '12 07:05

zr.


People also ask

How do you solve the kernel of a matrix?

To find the kernel of a matrix A is the same as to solve the system AX = 0, and one usually does this by putting A in rref. The matrix A and its rref B have exactly the same kernel. In both cases, the kernel is the set of solutions of the corresponding homogeneous linear equations, AX = 0 or BX = 0.

Is the sum of two kernels a kernel?

2. Summation: Summation of two kernels is a kernel k(x, x0) = k1(x, x0) + k2(x, x0). This can be seen by considering the summation two PSD kernels K1 and K2 associated with the kernels k1 and k2, respectively, and showing that it is in fact PSD.

Is the dot product a kernel?

Dot product kernels, such as polynomial and exponential (softmax) kernels, are among the most widely used kernels in machine learning, as they enable modeling the interactions between input features, which is crucial in applications like computer vision, natural language processing, and recommender systems.

What is the working rule for kernel method?

A function k :X ×X → R which for all n ∈ N,xi ∈ X, i ∈ [n] gives rise to a positive definite Gram matrix is called a positive definite kernel. A function k :X ×X → R which for all n ∈ N and distinct xi ∈ X gives rise to a strictly positive definite Gram matrix is called a strictly positive definite kernel.


1 Answers

You might look at the trace and determinant of the matrix. Since trace and determinant of a product can be computed more efficiently than a full multiplication, they may help you rule out combinations efficiently.

http://en.wikipedia.org/wiki/Trace_(linear_algebra)#Trace_of_a_product http://en.wikipedia.org/wiki/Determinant#Multiplicativity_and_matrix_groups

like image 115
Ben Voigt Avatar answered Nov 05 '22 17:11

Ben Voigt