Next Previous Contents

2. The Functions sub-menu

In this part, you will compute the spectra for arbitrary 1D functions. You may choose to compute the Legendre spectrum, which is easier to estimate, or the Large deviation Spectrum, which contains more information.

2.1 The Legendre spectrum

There are three algorithms: one based on the discrete wavelet transform (DWT), one on the continuous wavelet transform (CWT), and one on box counting.

The DWT based Legendre spectrum

If you don't want to set any parameters, just verify that the signal you want to process is selected at the time you launch the DWT based sub-menu, and hit Compute. You should get an output called dwt_sig_LegSpec#, which is the estimated the Legendre spectrum.

If you want more control, hit Advanced compute. Note that the signal which will be analyzed is the one highlighted when you press Advanced compute. Thus, if, for instance, you hit first Compute and then Advanced compute, you'll get an error. This is because after you press Compute, the current signal becomes dwt_sig_LegSpec#, which is not a 1D signal. When you hit Advanced compute, you get a new window, titled DWT Based Legendre Spectrum. Choose as usual your Input Signal using the Refresh button. You may then choose the analyzing Wavelet from a choice of various Daubechies and Coiflet wavelets. Specify next the number of Octaves, i.e. on how many scale levels you wish to perform the analysis.

In the lower part of the window, you may specify three numerical values: Qmin, Qmax, and # of Q's: As its name indicates, fl is computed as the Legendre transform of some auxiliary function T(q). This function T(q) is estimated for q ranging in [Qmin, Qmax], and # of Q's values are computed in this interval. You may check the Specify Regression Range: In this case, as usual, a graphic window will appear after you hit Compute: You'll see a bunch of curves, one curve per value of q. For each q, T(q) is estimated as the slope of the the best linear fit of the corresponding curve. Thus, you will want to select, with the cross-shaped cursor, a range of scales (in abscissa), where an approximately linear behaviour holds for all or most of the curves. Once you have selected such a range, two new graphs will appear to the right: On the lower one, you'll see the estimate of T(q), while the upper one will be the Legendre spectrum fl. You may experiment with other ranges until you are satisfied with the result. Press then return on your keyboard to finish. If you uncheck Specify Regression Range, Full Regression Range will appear instead, and the estimate will be performed on the whole range of scales as defined by the number of Octaves. As in other windows of the same kind, you may also choose the type of regression from the usual choice.

In the advanced mode, you get two outputs: dwt_sig# is the discrete wavelet transform, while dwt_sig#_LegSpec0 is the Legendre spectrum.

The CWT based Legendre spectrum

This is almost the same procedure as above, with only slightly different options due to the difference between the discrete and continuous wavelet transforms.

First, if you don't want to set any parameters, just verify that the signal you want to process is selected, then launch the CWT based sub-menu, and hit Compute. You should get an output called sig_LegSpec#, which is the estimated the Legendre spectrum.

If you want more control, hit Advanced compute. Note that the signal which will be analyzed is the one highlighted when you press Advanced compute. Thus, if, for instance, you hit first Compute and then Advanced compute, you'll get an error. This is because after you press Compute, the current signal becomes sig_LegSpec#, which is not a 1D signal. When you hit Advanced compute, you get a new window, titled CWT Based Legendre Spectrum. Choose as usual your Input Signal using the Refresh button.

In the middle part of the window, you'll set the parameters pertaining to the computation of the CWT: fmin and fmax let you choose the minimum and maximum frequencies of analysis. The default values are the ones yielding maximal span compatible with the size of the signal. You may change the extreme frequencies either by typing values under fmin and fmax, or by using the predefined values on the menus to the right. The Voices parameters governs the number of intermediate frequencies at which the continuous wavelet coefficients will be computed. Be warned that giving an excessive number of voices may result in large computing times for long signals. Checking the Mirror item will deal the border effects by mirroring the signal at its extremities. Otherwise, zero-padding is used. Finally, you may choose the Size and Type of your analyzing wavelet: available wavelets are the Mexican Hat, and the real and analytic Morlet wavelet. The size may be any positive number (this parameter is not available for the Mexican hat). Once all the parameters that define the wavelet transform are chosen, hit Compute WT. The output signal is a matrix of size "number of voices" x "size of the original signal". It is called cwt_signal#, if "signal" is the name of your data, and where # is as usual an incremental parameter. It should appear in the Input CWT box just below the Compute WT button. You may want to view the continuous wavelet transform using the View menu. Note that Fraclab recognizes wavelet transforms, and display them differently form regular images. In particular, it uses a fixed aspect ratio (this is useful for instance if the number of voices is much smaller than the size of the signal), and the "jet" color-map, which often allows to highlight the important structures. If you want to view the transform as a normal image, or make other changes in the appearance, use the functionalities of the View menu described in the Overview help file.

The Refresh button to the left of the Input CWT box lets you load a wavelet transform which would already be present in the Variables list of the main window. This avoids computing several times the same transform. Once you are happy with your transform, move to the lower part of the window, which performs the actual computation of the spectrum.

In the lower part of the window, you may specify three numerical values: Qmin, Qmax, and # of Q's: As its name indicates, fl is computed as the Legendre transform of some auxiliary function T(q). This function T(q) is estimated for q ranging in [Qmin, Qmax], and # of Q's values are computed in this interval. You may check the Specify Regression Range: In this case, as usual, a graphic window will appear after you hit Compute: You'll see a bunch of curves, one curve per value of q. For each q, T(q) is estimated as the slope of the the best linear fit of the corresponding curve. Thus, you will want to select, with the cross-shaped cursor, a range of scales (in abscissa), where an approximately linear behaviour holds for all or most of the curves. Once you have selected such a range, two new graphs will appear to the right: On the lower one, you'll see the estimate of T(q), while the upper one will be the Legendre spectrum fl. You may experiment with other ranges until you are satisfied with the result. Press then return on your keyboard to finish. If you uncheck Specify Regression Range, Full Regression Range will appear instead, and the estimate will be performed on the whole range of scales as defined by the number of Voices. As in other windows of the same kind, you may also choose the type of regression from the usual choice. Finally, in many cases, more relevant estimates are obtained if one chooses, at each scale, the largest coefficients in given neighbourhoods, instead of a mean value. This is the default in Fraclab, as is indicated by the fact that the Local Maxima box is checked. If you unmark this box by pressing the button to the left of Yes (which subsequently becomes No), then the program will use mean values.

As above, in the advanced mode, you get two outputs: cwt_sig# is the continuous wavelet transform, while cwt_sig_LegSpec# is the Legendre spectrum.

Note the following weird naming convention: When you perform an advanced compute, the spectrum here is called cwt_sig_#LegSpec#, consistent with the case of the DWT method. The first # refers to the number of times you have computed the wavelet transform, while the second refers to the spectrum number. That is, if you compute several spectra with the same wavelet transform, only the second # is incremented. However, in the basic CWT method, the name of the spectrum is sig_LegSpec#, while in the basic DWT one it is dwt_sig_LegSpec#. We hope this does not introduce to much confusion.

The Box method for the Legendre spectrum estimation

As in the wavelet-based methods, you may decide to use the default parameters by choosing the menu Basic parameters. However, in this case, you don't get a new window as above: Rather, the output, called fcfl1d_sig# is computed right away and sent directly to your Variables list. The Advanced parameters choice is not included in the current release of Fraclab.

2.2 The Large deviation Spectrum

The large deviation spectrum fg is computed in Fraclab using pure time-domain algorithms. If you choose Basic parameters, the estimated spectrum, called fcfg1d_sig#, is computed right away and directly sent to your Variables list. You may have an idea of the default parameters used by the algorithm by viewing the output: You'll notice in the caption the numerical values for the various parameters.

Choosing Advanced parameters instead, you get a new window, titled Large deviation spectrum estimation. On the first line, the type of the Input data, i.e. measure, function or cwt is recalled. You may change (at your own risks - changing manually the type will usually result in an error) this type, by checking the appropriate box. As usual, you may Refresh the signal and view its name and size.

The second part of the window deals with the Coarse grain Hölder exponents estimation. Coarse grain Hölder exponents are the basic bricks for estimating fg. They just measure the scaling behaviour of the data at finite resolution (rather than at infinite resolution in the case of usual Hölder exponents). More precisely, for each resolution n, we consider the 2^n dyadic intervals that partition (0,1) (recall that, by convention, all the signals are assumed to be supported on (0,1)). For each interval, we compute a coarse grain Hölder exponent: This is just the logarithm of some quantity measuring the variation of the signal in the interval (this measure of variation is discussed below), divided by the logarithm of the size of the interval. Thus, we have one coarse grain exponent for each interval at each resolution. The minimum and maximum resolutions you wish to consider for computing these coarse grain exponents are set by the parameters min size and max size. Warning: The sliders that control these values have a somewhat strange behaviour, and you may want to enter the desired values directly from your keyboard. The number of resolutions you want to consider between min size and max size is set by the parameter # of scales. Finally, you may decide how your # of scales resolutions are distributed between min size and max size: This is the progress. parameter. linear means equispacing, logarithmic means log-uniform spacing, while decimated implies that your min size and max size are powers of 2: If you choose decimated, then the three parameters min size, max size and # of scales are no longer independent: Fraclab will force them so that log(max size) - log(min size) +1 = # of scales. Once you have decided your discretization of resolutions, you may choose which quantity to investigate: In other words, you need to decide how precisely you measure the variation of your signal in each interval, in order to determine its scaling behaviour. The default choice is the oscillation, i.e. the maximum minus the minimum of the signal in the dyadic interval. A second choice is the lpnorm, in which case you may specify the power p using the box on the right (the default is p = 2). Finally, you may go for the linfty norm, i.e. set p = infinity.

Once you're done with your settings, hit Compute exponents. The output, called fch1d_sig#, will appear in the Variables list. It is a matrix of size (# of scales) x (length of the original signal). Each line in the matrix corresponds to the vector of coarse grain exponents at one of the considered resolution. Since at resolution n there are only 2^n points, and in order to deal with lines of constant sizes without resorting to zero-padding, each coarse grain exponent at resolution n is repeated the needed number of times.

The lower part of the window lets you perform the actual computation of the large deviation spectrum. The computation is based on techniques used in density estimation, and uses a kernel. You first need to tell Fraclab how the density of the coarse grain exponents will be estimated. In the current version of Fraclab, only the continuous choice is available. This simply means that a fully non parametric method is used. We hope to include the other choices, namely discrete, wavelet and parametric in future releases. The next parameter is the size of the kernel. You control this by selecting, in front of the item adaptation, one of maxdev, diagonal, double kernel and manual. Only maxdev and manual are implemented in the current version of Fraclab. Choosing maxdev will make Fraclab use an optimal size computed from some empirical statistical criterion. If you rather want to go for manual, then you may enter a numerical value in the box to the right, or use the slider (these box and slider are grayed out when you choose maxdev, since the choice is automated in this case). The default 0.1 is often a good starting point. Larger values decrease variance at the expense of bias, resulting in smoother estimates, and vice-versa. You finally choose the shape of the kernel, by selecting in front of kernel one of Gaussian, boxcar, epanechnikov, mollifier and triangle (consult any book on density estimation to know more about these kernels).

Note that this routine will not estimate one but several spectra: One for each of the # of scales resolutions. Thus, the output signal, called fcfg1d_sig#, is a structure that contains # of scales graphs, each being a spectrum estimated at a given resolution. High resolution (i.e.close to min size) spectra have higher accuracy, while low resolution ones are more robust. In general, you should use a small number of different resolutions, i.e. around 4 or 5, ranging from high to moderate resolutions (i.e. min size = 1 or 2 and max size of the order of 10 to 100). You know that you have obtained a meaningful estimate if all the spectra coincide approximately. More precisely, you may trust that, for a given exponent a, the large deviation spectrum of your signal at point a has been well estimated if the values of most or all of your graphs almost coincide above abscissa a. You'll find that, in many cases, better agreements are obtained for large values of the spectra (large ordinates), and also for values of the exponent smaller than the mode of the spectra. On the contrary, values to the extreme right (large exponents) often show more discrepancy. Also, in many cases, the spectrum computed with the highest resolution significantly departs from the others. If all others agree reasonably, it is safe to discard the highest resolution one and use as an estimate the common value of the others.


Next Previous Contents