Skip to content
DeepForgeby svx
All problems
MediumTime Seriests-205

Lyapunov Exponent Lite

Problem

Estimate the largest Lyapunov exponent with a Rosenstein-style lite method. Embed the series with dim and delay, find each point's nearest neighbor among the first m - steps points (excluding itself), measure the divergence steps ahead, and average log(d1 / d0) divided by steps.

Return 0.0 when parameters are invalid or no usable pairs exist.

Hint

Positive exponents indicate sensitive dependence on initial conditions.

Test cases

case 1
in: [[1,4,9,16,25,36,49,64],1,2,2]
expected: 0.2578490070148772
case 2
in: [[1,3,2,5,4,8,7,10],1,2,2]
expected: 0.15763680111818276
case 3
in: [[0,1,2,4,8,16,32,64],1,2,3]
expected: 0.653980211456134
case 4
in: [[1,2,1,2,1,2,1,2],1,2,1]
expected: 0
Starter codePython
import math
def lyapunov_exponent_lite(series, delay, dim, steps):
    # Your code here
    pass

4 test cases · run your code against them in the editor