I have a graph that contains two types of nodes: Companies and Persons.
A Company node has a list of edges that represent Shareholders. A Shareholder has a percentage of shares and is either a Company or a Person. A Person node is always a leaf.
I am playing with a simple numpy example and having hard time to understand why associative property of matrix multiplication
ABC = (AB)C = A(BC)
does not exactly hold. I assume the problem is with numeric stability. But how to address it? What i... more
I transformed the following function
def quaternion_multiply(quaternion0, quaternion1):
"""Return multiplication of two quaternions.
>>> q = quaternion_multiply([1, -2, 3, 4], [-5, 6, 7, 8])
>>> numpy.allclose(q, [-44,... more
Using R package optR for solving linear equation gives incorrect results for gauss-seidel method.
I tried solving with different methods and it looks ok. For instance solve or using optR but with method gauss.
Example is here. Or am I doing something... more
I have to find the best solution for >10^7 equation systems with 5 equations in 2 variables each (5 measurements to find 2 parameters with the least amount of error in a long series).
The following code (normally used to do curve fitting) does what I... more
I have been dealing with linear algebra problems of the form A = Bx in Python and comparing this to a colleague's code in MATLAB and Mathematica. We have noticed differences between Python and the others when B is a singular matrix. When using numpy.... more
I was wondering what the correct approach to fitting datapoints to a non-linear function should be in python.
I am trying to fit a series of data-points
t = [0., 0.5, 1., 1.5, ...., 4.]
y = [6.3, 4.5,.................]
using the following model f... more
I have 350 document scores that, when I plot them, have this shape:
docScores = [(0, 68.62998962), (1, 60.21374512), (2, 54.72480392),
(3, 50.71389389), (4, 49.39723969), ...,
(345, 28.3756237), (346, 28.37126923),
I understand how to solve Ax=b, but what if b is dependent on x? See in the pictures E3 = function(E4). I guess this is done iteratively.. what is such a problem called? what methods do I use to solve it?
I am trying to solve the following system:
To demonstrate the effect of linear transformations in 3D, x -> A x, I want to draw a cube and show its transformation under A. For this, I need to color each face separately, and also show the vertex points and the lines that outline each face.