Re: How to increase VI run time for Data Analysis?



Things just don't add up!


Schola wrote:
  The VI is trying to calculate Approximate Entropy which calculates the maximum likelihood the ratio of adjacent vector (x,y) is similar to adjacent vectors (x,y,z). 


You read ONE file, where you take adjacent pairs in the upper part (I guess these are (x,y)), but in the lower part, you take triplets (presumably (x,y,z)). In "tolerance vectors", you then clone these subsets to arrays of either 1000 points (upper) or 1500 point (lower), but compare them with only a 1000 point subset. Now you only run the FOR loop 1 times, while in the first post, the FOR loop had a count of 100. Which one is correct?
You still haven't told us the size of the original array. Are "x,y" and "x,y,z" 2D and 3D coordinates, resp?
Your "Tolerance vectors" subVI is not needed at all, because it just inflates existing data with hot air, while not adding any new information. Most likely it would be much faster to get the two (three) numbers x,y,(z) individually and decimate the size=1000 subset to 2(3) 1D arrays. Now you could just compare the scalar (x,y, or z) each with one of the decimated arrays. Let me know if this is not clear!
Also, you take the absolute value which is definitely not needed because the sum of ones is always zero or greater, right?
Do you have a website explaining the math behind your algoritm?
As mentioned, you definitely can get rid of the "tolerance vectors" subVI entirely, but here is another alternative for your enjoyment. It is probably slightly less efficient to TonP's version, but simpler in code. ;)
<img src="http://forums.ni.com/attachments/ni/170/259142/1/Tolerancer.png";>
&nbsp;
&nbsp;Message Edited by altenbach on 07-15-2007 12:49 PM


Tolerancer.png:
http://forums.ni.com/attachments/ni/170/259142/1/Tolerancer.png
.



Relevant Pages

  • Re: Power series for Cos x converge for all x?
    ... israel@math.ubc.ca (Robert Israel) wrote: ... >>close to zero, it may require an awful lot of terms to get a good ... > sum to the x^term, so the error will always be less than the ... > absolute value of the last term. ...
    (sci.math)
  • Re: Minus Zero
    ... Instead of comparing your sum to zero as you do here: ... Consider comparing the absolute value to a suitably small decimal: ...
    (microsoft.public.excel)
  • Re: Polysigned A^A
    ... pair of zero divisors in P4. ... Using Golden's notation: ... and let RCbe the real group algebra ... of RCwhich is sum of the elements in C. ...
    (sci.math)
  • Re: Subset Sum problem (w/ limited scope)
    ... The "Subset Sum" problem (stated various ways depending on what you ... a subset of those integers that sums up to zero. ... Are there going to be duplicate values in your original array? ...
    (comp.lang.fortran)
  • Re: Does gravity do work on the freely falling body?
    ... the sum of momentum of the system is zero on a continuous ... And the sum of energy of the system is zero on a continuous ... energy of the particles is also zero on a continuous basis. ...
    (sci.physics.relativity)