Hi all scikit-learn users,

Suppose that we have the code like:


for i in np.arange(size1):
        for j in np.arange(size1):
            if j!=i:
                t = 0.
                for k in np.arange(size2):
                    for l in np.arange(size2):
                       t = t + np.sum(A[i,k]*A[j,l]*X2[C[i,k],C[j,l]])

                tmp = tmp + (X1[i,j] - t)*(X1[i,j] - t)
return tmp


where X1 is the array of (size1, size1) and  similar to X2 (size2, size2)
C is array of (size1, size2)

I try to rewrite this code to reduce the computational time, but somehow it
does not success.

If anyone can help me, it would be very appreciated

Thank in advance.

T.B
------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
_______________________________________________
Scikit-learn-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to