calculating attributes of sequences

Hi,

I would like to calculate some different things about sequences of numbers, ie entropy (various types ie tsallis entropy or ) and randomness/periodicity attributes, fractal/multifractal dimension etc.. Anyone know of a good site with source code already there to do some or all (or other) calculations like these?

I'm interested in any algorithms for describing sequences basically.

cheers, Jamie

Reply to
Jamie M
Loading thread data ...

I highly recommend octave [free MatLab clone] Yes, the functions exist, BUT you have to figure out how to use them. It has built-in functions like histogram, fft, etc etc.

As a possible example of doing what you asked, I used octave to analyze the 'built-in' rand() function inside of LTspice. LTspice's description of that function is a unifrom distribution white noise source.

I found that the

  1. Probability Density Function was fairly close to uniform distribution= producing a flat top histogram.
  2. The funcion was almost spectrally flat, as in true white noise.
  3. The function could be counted on to NOT repeating uuntil at least 2^30 values [a fairly LONG sequence], and possibley even as long as 2^31 +
  4. There was a 'slight' repetition at 2^10 bits that caused an approximate
10dB 'drop' in the frequency spectrum. However, with a small change to using the rand() this could be removed.

The end result of this investigation showed that it was possible to approximate a gaussian white noise source by only adding together five independent rand() functions, with appropriate amplitude adjustments. To remove hat slight 2^10 reptetition, I only had to use an integer 'multiplier' in the rand() argument so when the five independent sequences were added; you got a VERY flat white noise source to use in your circuit.

Example of using multiple rand(), remember it is a slightly flawed uniform white noise source, to make a fairly good gaussian white noise source is: sqrt(12/5)*(rand(time/dt) +rand(tstop/dt+1+2*int(time/dt)) +rand(3*(tstop/dt+1)+3*int(time/dt)) +rand(6*(tstop/dt+1)+4*int(time/dt)) +rand(10*(tstop/dt+1)+5*int(time/dt))-2.5) [had to 'fold' that up equation to get Aioe to send this posting]

where the 12 normalizees the amplitude to rms 1, 1/5 normalizes the summation of five indepedent functions to 1 rms, dt normalizes to the sampling rate, and you can see how each argument of rand() has a simple integer multiplier. You only have to verify that you NEVER exceed the run length of the sequence.

Is this what you're asking?

Reply to
RobertMacy

Hi,

Thanks, ya that is good but also I'm interested in entropy measurements or multifractal dimension etc of sequence data, I'll check out octave though!

cheers, Jamie

Reply to
Jamie M

If you do start using octave, join the user's group. Also if you have a question, feel free to contact me directly.

You threw out two terms. The first, entropy, which sounds like the amount of 'chaos', or energy, that is in the sequence. Single value for the WHOLE sequence? If so, that would be the 'power' calculation you can easily get to either in time domainn, or freq domain.

What is a 'multifractal dimension'? What is its significance in a sequence?

Reply to
RobertMacy

Hi,

Thanks I installed Octave on windows will try it out!

I am not sure what exactly multifractal dimension is, here are a couple wiki articles though:

formatting link
formatting link

I think it is related to when there are multiple fractal systems superimposed on each other maybe, but I think this would just look like noise, but I heard one multifractal system is the surface of a cell in the body, and normally the surface has a multifractal pattern, supposedly from all the cellular machinery operating in parallel (and individually fractally) influencing the cells surface to look multifractal, ie maybe microtubules or something pulling on different parts of the cell membrane.. and when the cell becomes cancerous there is a short window that the cell membrane surface becomes fractal.

Here is the article about that:

Fractal patterns seen on emerging cancerous cells

formatting link

link to paper:

formatting link

cheers, Jamie

Reply to
Jamie M

Arrrggg! I have no idea what a fractal is. I only remember someting about people bandying the term about to make it easier to describe 'chaotic' theory. like wave motion, water squirts, and jet engine turbulence, etc.

I jumped right to the paper link. Interesting subject. I hope you can make a contribution in this area. Seems odd that chlamydia sets up the cervical tissues to later develop cancer. Yet, research is now showing that some common virii we all went through as children [was that measles?] can be used to target specific cancers. Wait chlamydia is a bacterial infection, maybe that's the difference.

Reply to
RobertMacy

Hi,

Here is a fractal sequence:

1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 6, ...

formatting link
formatting link

cheers, Jamie

Reply to
Jamie M

...snip.... Hi,

Here is a fractal sequence:

1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 6, ...

formatting link
formatting link

cheers, Jamie

Interesting. What's it good for? Or, rather what in Nature does it model? Or, I don't see how that sequence is different than some 'made up' sequence created before the term, fractal, came into use.

Not dissing you, just trying to understand the importance, significance. And, possilby see if there's a place to use the concept in my work.

Reply to
RobertMacy

Nothing obvious. It is cute from a number theory point of view in that it is self similar if you delete the first occurrence of every element.

I can't see any obvious use of it in the real world, unlike for example the peano-koch curve which allows you to fill 2D or 3D space with a very fractal line. Them you can apply eg 1D histogram equalisation techniques to the resulting dataset sometimes with great advantage.

The first couple in 2D are

______ | | | | | |

__ __ | |__| | |__ __| __| |__

(within the limits of ASCII art)

--
Regards, 
Martin Brown
Reply to
Martin Brown

Hi,

A fractal sequence has attributes of being periodic and not periodic at the same time. A lot of things in nature are built with fractal patterns, they are periodic at different scales.

google images has a lot of examples of fractal patterns in nature: "nature fractal patterns" etc :)

cheers, Jamie

Reply to
Jamie M

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.