My Math Forum  

Go Back   My Math Forum > Math Forums > Math

Math General Math Forum - For general math related discussion and news

LinkBack Thread Tools Display Modes
February 7th, 2019, 01:50 PM   #1
Joined: Feb 2019
From: italy

Posts: 1
Thanks: 0

Matrix operations for RBF solver

Hi All! This is my first post, I hope it is the right session.
I will be describing the goal first, then the mathematical step of the current implementation I was given and then ask my question.

I got from someone the python code for an RBF solver. The solver stores 9 transformation matrix (each of which, once decomposed, have tx, ty and tz set at 0 and sx, sy and sz set to 1, so only rotation actually has values). For each transformation matrix is also associate a vector of 3 values called sample.

the solver is applied to a transformation matrix in order to interpolate between the 9 samples stored previously and output the current value for that configuration. In the case the trasformation matrix is equal to one of the 9 stored, then the output will be exactly the sample associated to that particular matrix.


I will use a numerical examples. First step is to Store the 9 4x4 matrices as 1 9x9 matrix T (last row and column of transformation matrix is ignored since it has all zeros and a 1 in the last position.).

The samples associated to each transformation is stored in a 3x9 matrix S:

Then it gets the distance matrix from T by calculating the sum of the squared distances between all the elements of row1-row2, then between row1-row3, ... row2-row1, ... etc and for each distance it applied an RbfKernel Interpolation(in the current example just a simple square root).

Just to make it more clear, to calculate the second element of the first row of D, it would do:

It then inverts the distance matrix just calculated:

and calculates the weights in this way:

Last step consists in taking the input transform matrix L(a 4x4 matrix trasnformed into a 1x9 row vector for the same reason as the previously stored matrices) and calculate the distance(K) between that row-vector and each row of T with the same technique as above.

and as very last step, it multiply each element of K for the corresponding row(C) of W and sum together the 3 columns to find the outpute (O) 3 values. Practically speaking:

In this case, L is equal to the first row of T( small differences due to floating approximation to 2 decimal digits) and the final output is equal to the first row of S. If L would have been equal to the i.e. 3rd row of T, then O would have been equal to the 3rd row of S etc.

If L does not match any of the previous values, then O would interpolate between the samples and have different values.


This steps are definitely working and giving the expected results, although I don't completely understand the logic behind. Until the point it calculates the distance matrix it makes sense, after that I don't understand why the matrix needs to be inverted and why the weights are the product between the inverted distance matrix and the samples.

So my question is, Can someone try to explain what is the logical meaning behind each step? Thanks!
dd95 is offline  

  My Math Forum > Math Forums > Math

matrix, operations, rbf, solver

Thread Tools
Display Modes

Similar Threads
Thread Thread Starter Forum Replies Last Post
Fundamental operations and recursive operations DanRayson Number Theory 5 September 18th, 2014 10:12 PM
Matrix operations to row-echelon form - why? questioner1 Linear Algebra 3 August 16th, 2012 08:03 AM
Matrix Operations and Calculations Nexusfactor Linear Algebra 1 February 12th, 2012 02:16 AM
Algebraic Properties of Matrix Operations tmlfan_179027 Linear Algebra 3 October 3rd, 2009 12:43 AM
Matrix operations proof problem.. Help please.. geyikrali Linear Algebra 2 January 26th, 2009 11:12 AM

Copyright © 2019 My Math Forum. All rights reserved.