Peter
--
Peter Billam www.pjb.com.au www.pjb.com.au/comp/contact.html
> Are there any modules, packages, whatever, that will
> measure the fractal dimensions of a dataset, e.g. a time-series ?
I don't think any countable set, even a countably-infinite set, can have a
fractal dimension. It's got to be uncountably infinite, and therefore
uncomputable.
I think there are attempts to estimate the fractal dimension of a set
using a finite sample from this set. But I can't remember where I got
this thought from!
--
Arnaud
There are image data compression schemes that work like that, trying
to detect self-similarity in the data. It can go the reverse way too.
There was a program called Genuine Fractals that tried to increase the
apparent resolution of photographs by adding artificial detail
constructed from detected self-similarity. Its results were mixed, as
I remember.
Incorrect. Koch's snowflake, for example, has a fractal dimension of log
4/log 3 ≈ 1.26, a finite area of 8/5 times that of the initial triangle,
and a perimeter given by lim n->inf (4/3)**n. Although the perimeter is
infinite, it is countably infinite and computable.
Strictly speaking, there's not one definition of "fractal dimension", there
are a number of them. One of the more useful is the "Hausdorf dimension",
which relates to the idea of how your measurement of the size of a thing
increases as you decrease the size of your yard-stick. The Hausdorf
dimension can be statistically estimated for finite objects, e.g. the
fractal dimension of the coast of Great Britain is approximately 1.25 while
that of Norway is 1.52; cauliflower has a fractal dimension of 2.33 and
crumpled balls of paper of 2.5; the surface of the human brain and lungs
have fractal dimensions of 2.79 and 2.97.
--
Steven
> Incorrect. Koch's snowflake, for example, has a fractal dimension of log
> 4/log 3 ≈ 1.26, a finite area of 8/5 times that of the initial triangle,
> and a perimeter given by lim n->inf (4/3)**n. Although the perimeter is
> infinite, it is countably infinite and computable.
No, the Koch curve is continuous in R^2 and uncountable. Lawrence is
right and one can trivially cover a countable infinite set with disks
of the diameter 0, namely by itself. The sum of those diameters to an
arbitrary power is also 0 and this yields that the Hausdorff dimension
of any countable set is 0.
You need a lot of data-points to get a trustworthy answer.
Of course edge-effects step in as you come up against the
spacing betwen the points; you'd have to weed those out.
On 2009-06-14, Steven D'Aprano <st...@REMOVETHIS.cybersource.com.au> wrote:
> Strictly speaking, there's not one definition of "fractal dimension", there
> are a number of them. One of the more useful is the "Hausdorf dimension",
They can be seen as special cases of Renyi's generalised entropy;
the Hausdorf dimension (D0) is easy to compute because of the
box-counting-algorithm:
http://en.wikipedia.org/wiki/Box-counting_dimension
Also easy to compute is the Correlation Dimension (D2):
http://en.wikipedia.org/wiki/Correlation_dimension
Between the two, but much slower, is the Information Dimension (D1)
http://en.wikipedia.org/wiki/Information_dimension
which most closely corresponds to physical entropy.
Multifractals are very common in nature
(like stock exchanges, if that counts as nature :-))
http://en.wikipedia.org/wiki/Multifractal_analysis
but there you really need _huge_ datasets to get useful answers ...
There have been lots of papers published (these are some refs I have:
G. Meyer-Kress, "Application of dimension algorithms to experimental
chaos," in "Directions in Chaos", Hao Bai-Lin ed., (World Scientific,
Singapore, 1987) p. 122
S. Ellner, "Estmating attractor dimensions for limited data: a new
method, with error estimates" Physi. Lettr. A 113,128 (1988)
P. Grassberger, "Estimating the fractal dimensions and entropies
of strange attractors", in "Chaos", A.V. Holden, ed. (Princeton
University Press, 1986, Chap 14)
G. Meyer-Kress, ed. "Dimensions and Entropies in Chaotic Systems -
Quantification of Complex Behaviour", vol 32 of Springer series
in Synergetics (Springer Verlag, Berlin, 1986)
N.B. Abraham, J.P. Gollub and H.L. Swinney, "Testing nonlinear
dynamics," Physica 11D, 252 (1984)
) but I haven't chased these up and I don't think they contain
any working code. But the work has been done, so the code must
be there still, on some computer somwhere...
Regards, Peter
> On 14 Jun., 16:00, Steven D'Aprano
> <st...@REMOVETHIS.cybersource.com.au> wrote:
>
>> Incorrect. Koch's snowflake, for example, has a fractal dimension of
>> log 4/log 3 ≈ 1.26, a finite area of 8/5 times that of the initial
>> triangle, and a perimeter given by lim n->inf (4/3)**n. Although the
>> perimeter is infinite, it is countably infinite and computable.
>
> No, the Koch curve is continuous in R^2 and uncountable.
I think we're talking about different things. The *number of points* in
the Koch curve is uncountably infinite, but that's nothing surprising,
the number of points in the unit interval [0, 1] is uncountably infinite.
But the *length* of the Koch curve is not, it's given by the above limit,
which is countably infinite (it's a rational number for all n).
> Lawrence is
> right and one can trivially cover a countable infinite set with disks of
> the diameter 0, namely by itself. The sum of those diameters to an
> arbitrary power is also 0 and this yields that the Hausdorff dimension
> of any countable set is 0.
Nevertheless, the Hausdorff dimension (or a close approximation thereof)
can be calculated from the scaling properties of even *finite* objects.
To say that self-similar objects like broccoli or the inner surface of
the human lungs fails to nest at all scales is pedantically correct but
utterly pointless. If it's good enough for Benoît Mandelbrot, it's good
enough for me.
--
Steven
You're mixing up the notion of countability. It only applies to set
sizes. Unless you're saying that there an infinite series has a
countable number of terms (a completely trivial statement), to say
that the length is "countably finite" simply does not parse correctly
(let alone being semantically correct or not). This said, I agree with
you: I reckon that the Koch curve, while composed of uncountable
cardinality, is completely described by the vertices, so a countable
set of points. It follows that you must be able to correctly calculate
the Hausdorff dimension of the curve from those control points alone,
so you should also be able to estimate it from a finite sample (you
can arguably infer self-similarity from a limited number of self-
similar generations).
I think the idea is you assume uniform continuity of the set (as
expressed by a parametrized curve). That should let you approximate
the fractal dimension.
As for countability, remember that the reals are a separable metric
space, so the value of a continuous function any dense subset of the
reals (e.g. on the rationals, which are countable) completely
determines the function, iirc.
>On Sun, 14 Jun 2009 14:29:04 -0700, Kay Schluehr wrote:
>
>> On 14 Jun., 16:00, Steven D'Aprano
>> <st...@REMOVETHIS.cybersource.com.au> wrote:
>>
>>> Incorrect. Koch's snowflake, for example, has a fractal dimension of
>>> log 4/log 3 ? 1.26, a finite area of 8/5 times that of the initial
>>> triangle, and a perimeter given by lim n->inf (4/3)**n. Although the
>>> perimeter is infinite, it is countably infinite and computable.
>>
>> No, the Koch curve is continuous in R^2 and uncountable.
>
>I think we're talking about different things. The *number of points* in
>the Koch curve is uncountably infinite, but that's nothing surprising,
>the number of points in the unit interval [0, 1] is uncountably infinite.
>But the *length* of the Koch curve is not, it's given by the above limit,
>which is countably infinite (it's a rational number for all n).
No, the length of the perimeter is infinity, period. Calling it
"countably infinite" makes no sense.
You're confusing two different sorts of "infinity". A set has a
cardinality - "countably infinite" is the smallest infinite
cardinality.
Limits, as in calculus, as in that limit above, are not
cardinailities.
>
>> Lawrence is
>> right and one can trivially cover a countable infinite set with disks of
>> the diameter 0, namely by itself. The sum of those diameters to an
>> arbitrary power is also 0 and this yields that the Hausdorff dimension
>> of any countable set is 0.
>
>Nevertheless, the Hausdorff dimension (or a close approximation thereof)
>can be calculated from the scaling properties of even *finite* objects.
>To say that self-similar objects like broccoli or the inner surface of
>the human lungs fails to nest at all scales is pedantically correct but
>utterly pointless. If it's good enough for Beno�t Mandelbrot, it's good
>enough for me.
> Lawrence D'Oliveiro <l...@geek-central.gen.new_zealand> writes:
>
>> I don't think any countable set, even a countably-infinite set, can have
>> a fractal dimension. It's got to be uncountably infinite, and therefore
>> uncomputable.
>
> I think the idea is you assume uniform continuity of the set (as
> expressed by a parametrized curve). That should let you approximate
> the fractal dimension.
Fractals are, by definition, not uniform in that sense.
I had my doubts on this statement being true, so I've gone to my copy
of Gerald Edgar's "Measure, Topology and Fractal Geometry" and
Proposition 2.4.10 on page 69 states: "The sequence (gk), in the
dragon construction of the Koch curve converges uniformly." And
uniform continuity is a very well defined concept, so there really
shouldn't be an interpretation issue here either. Would not stick my
head out for it, but I am pretty sure that a continuous sequence of
curves that converges to a continuous curve, will do so uniformly.
Jaime
--
(\__/)
( O.o)
( > <) Este es Conejo. Copia a Conejo en tu firma y ayúdale en sus
planes de dominación mundial.
I think a typical example of a curve that's continuous but not
uniformly continuous is
f(t) = sin(1/t), defined when t > 0
It is continuous at every t>0 but wiggles violently as you get closer
to t=0. You wouldn't be able to approximate it by sampling a finite
number of points. A sequence like
g_n(t) = sin((1+1/n)/ t) for n=1,2,...
obviously converges to f, but not uniformly. On a closed interval,
any continuous function is uniformly continuous.
Isn't (-∞, ∞) closed?
Charles Yeomans
Right, but pointwise convergence doesn't imply uniform
convergence even with continuous functions on a closed
bounded interval. For an example, take the sequence
g_n (n >= 0), of continuous real-valued functions on
[0, 1] defined by:
g_n(t) = nt if 0 <= t <= 1/n else 1
Then for any 0 <= t <= 1, g_n(t) -> 0 as n -> infinity.
But the convergence isn't uniform: max_t(g_n(t)-0) = 1
for all n.
Maybe James is thinking of the standard theorem
that says that if a sequence of continuous functions
on an interval converges uniformly then its limit
is continuous?
Mark
Whoops. Wrong definition. That should be:
g_n(t) = nt if 0 <= t <= 1/n else
n(2/n-t) if 1/n <= t <= 2/n else 0
Then my claim that g_n(t) -> 0 for all t might
actually make sense...
Jaime was simply plain wrong... The example that always comes to mind
when figuring out uniform convergence (or lack of it), is the step
function , i.e. f(x)= 0 if x in [0,1), x(x)=1 if x >= 1, being
approximated by the sequence f_n(x) = x**n if x in [0,1), f_n(x) = 1
if x>=1, where uniform convergence is broken mostly due to the
limiting function not being continuous.
I simply was too quick with my extrapolations, and have realized I
have a looooot of work to do for my "real and functional analysis"
exam coming in three weeks...
Jaime
P.S. The snowflake curve, on the other hand, is uniformly continuous, right?
s/James/Jaime. Apologies.
> P.S. The snowflake curve, on the other hand, is uniformly continuous, right?
Yes, at least in the sense that it can be parametrized
by a uniformly continuous function from [0, 1] to the
Euclidean plane. I'm not sure that it makes a priori
sense to describe the curve itself (thought of simply
as a subset of the plane) as uniformly continuous.
Mark
The definition of uniform continuity is that, for any epsilon > 0,
there is a delta > 0 such that, for any x and y, if x-y < delta, f(x)-f
(y) < epsilon. Given that Koch's curve is shaped as recursion over the
transformation from ___ to _/\_, it's immediately obvious that, for a
delta of at most the length of ____, epsilon will be at most the
height of /. It follows that, inversely, for any arbitrary epsilon,
you find the smallest / that's still taller than epsilon, and delta is
bound by the respective ____. (hooray for ascii demonstrations)
Curiously enough, it's the recursive/self-similar nature of the Koch
curve so easy to prove as uniformly continuous.
I think I'm too stupid to follow this. It looks as though
you're treating (a portion of?) the Koch curve as the graph
of a function f from R -> R and claiming that f is uniformly
continuous. But the Koch curve isn't such a graph (it fails
the 'vertical line test', in the language of precalculus 101),
so I'm confused.
Here's an alternative proof:
Let K_0, K_1, K_2, ... be the successive generations of the Koch
curve, so that K_0 is the closed line segment from (0, 0) to
(1, 0), K_1 looks like _/\_, etc.
Parameterize each Kn by arc length, scaled so that the domain
of the parametrization is always [0, 1] and oriented so that
the parametrizing function fn has fn(0) = (0,0) and fn(1) = (1, 0).
Let d = ||f1 - f0||, a positive real constant whose exact value
I can't be bothered to calculate[*] (where ||f1 - f0|| means
the maximum over all x in [0, 1] of the distance from
f0(x) to f1(x)).
Then from the self-similarity we get ||f2 - f1|| = d/3,
||f3 - f2|| = d/9, ||f4 - f3|| = d/27, etc.
Hence, since sum_{i >= 0} d/(3^i) converges absolutely,
the sequence f0, f1, f2, ... converges *uniformly* to
a limiting function f : [0, 1] -> R^2 that parametrizes the
Koch curve. And since a uniform limit of uniformly continuous
function is uniformly continuous, it follows that f is
uniformly continuous.
Mark
[*] I'm guessing 1/sqrt(12).
I think you treat it as a function f: R -> R**2 with the usual
distance metric on R**2.
Right. Or rather, you treat it as the image of such a function,
if you're being careful to distinguish the curve (a subset
of R^2) from its parametrization (a continuous function
R -> R**2). It's the parametrization that's uniformly
continuous, not the curve, and since any curve can be
parametrized in many different ways any proof of uniform
continuity should specify exactly which parametrization is
in use.
Mark
I was being incredibly lazy and using loads of handwaving, seeing as I
posted that (and this!) while procrastinating at work.
an even lazier argument: given the _/\_ construct, you prove that its
vertical growth is bound: the height of / is less than 1/3 (given a
length of 1 for ___), so, even if you were to build _-_ with the
middle segment at height = 1/3, the maximum vertical growth would be
sum 1/3^n from 1 to infinity, so 0.5. Sideways growth has a similar
upper bound. 0.5 < 1, so the chebyshev distance between any two points
on the curve is <= 1. Ergo, for any x,y, f(x) is at most at chebyshev
distance 1 of (y). Induce the argument for "smaller values of one".
I won't ask where I can find this definition. That Koch thing is a
closed curve in R^2. That means _by definition_ that it is a
continuous function from [0,1] to R^2 (with the same value
at the endpoints). And any continuous fu
Sorry if I've already posted half of this - having troubles hitting
the toushpad on this little machine by accident.
The fractal in question is a curve in R^2. By definition that
means it is a continuous function from [a,b] to R^2 (with
the same value at the two endpoints). Hence it's
uniformly continuous.
Nope. Not that I see the relvance here - the g_k _do_
converge uniformly.
>Jaime
>Isn't (-?, ?) closed?
What is your version of the definition of "closed"?
>Charles Yeomans
As long as people are throwing around all this math stuff:
Officially, by definition a curve _is_ a parametrization.
Ie, a curve in the plane _is_ a continuous function from
an interval to the plane, and a subset of the plane is
not a curve.
Officially, anyway.
>Mark
>On Jun 17, 3:46�pm, Paul Rubin <http://phr...@NOSPAM.invalid> wrote:
>> Mark Dickinson <dicki...@gmail.com> writes:
>> > It looks as though you're treating (a portion of?) the Koch curve as
>> > the graph of a function f from R -> R and claiming that f is
>> > uniformly continuous. �But the Koch curve isn't such a graph (it
>> > fails the 'vertical line test',
>>
>> I think you treat it as a function f: R -> R**2 with the usual
>> distance metric on R**2.
>
>Right. Or rather, you treat it as the image of such a function,
>if you're being careful to distinguish the curve (a subset
>of R^2) from its parametrization (a continuous function
>R -> R**2). It's the parametrization that's uniformly
>continuous, not the curve,
Again, it doesn't really matter, but since you use the phrase
"if you're being careful": In fact what you say is exactly
backwards - if you're being careful that subset of the plane
is _not_ a curve (it's sometimes called the "trace" of the curve".
>and since any curve can be
>parametrized in many different ways any proof of uniform
>continuity should specify exactly which parametrization is
>in use.
Any _closed_ curve must have [a,b] as its parameter
interval, and hence is uniformly continuous since any
continuous function on [a,b] is uniformly continuous.
>Mark
My version of a closed interval is one that contains its limit points.
Charles Yeomans
> On Wed, 17 Jun 2009 08:18:52 -0700 (PDT), Mark Dickinson
> <dick...@gmail.com> wrote:
>
>>On Jun 17, 3:46 pm, Paul Rubin <http://phr...@NOSPAM.invalid> wrote:
>>> Mark Dickinson <dicki...@gmail.com> writes:
>>> > It looks as though you're treating (a portion of?) the Koch curve as
>>> > the graph of a function f from R -> R and claiming that f is
>>> > uniformly continuous. But the Koch curve isn't such a graph (it
>>> > fails the 'vertical line test',
>>>
>>> I think you treat it as a function f: R -> R**2 with the usual
>>> distance metric on R**2.
>>
>>Right. Or rather, you treat it as the image of such a function,
>>if you're being careful to distinguish the curve (a subset
>>of R^2) from its parametrization (a continuous function
>>R -> R**2). It's the parametrization that's uniformly
>>continuous, not the curve,
>
> Again, it doesn't really matter, but since you use the phrase
> "if you're being careful": In fact what you say is exactly
> backwards - if you're being careful that subset of the plane
> is _not_ a curve (it's sometimes called the "trace" of the curve".
I think it is quite common to refer to call 'curve' the image of its
parametrization. Anyway there is a representation theorem somewhere
that I believe says for subsets of R^2 something like:
A subset of R^2 is the image of a continuous function [0,1] -> R^2
iff it is compact, connected and locally connected.
(I might be a bit -or a lot- wrong here, I'm not a practising
mathematician) Which means that there is no need to find a
parametrization of a plane curve to know that it is a curve.
To add to this, the usual definition of the Koch curve is not as a
function [0,1] -> R^2, and I wonder how hard it is to find such a
function for it. It doesn't seem that easy at all to me - but I've
never looked into fractals.
--
Arnaud
Darn. So I've been getting it wrong all this time. Oh well,
at least I'm not alone:
"Definition 1. A simple closed curve J, also called a
Jordan curve, is the image of a continuous one-to-one
function from R/Z to R2. [...]"
- Tom Hales, in 'Jordan's Proof of the Jordan Curve Theorem'.
"We say that Gamma is a curve if it is the image in
the plane or in space of an interval [a, b] of real
numbers of a continuous function gamma."
- Claude Tricot, 'Curves and Fractal Dimension' (Springer, 1995).
Perhaps your definition of curve isn't as universal or
'official' as you seem to think it is?
Mark
I think the whole line is closed, but I hadn't realized anyone
considered the whole line to be an "interval". Apparently they do.
So that the proper statement specifies compactness (= closed and
bounded) rather than just "closed".