Comments (5)
What did you do about the fact that this implements forward embedding?
Hmmmmmmmmmmmmmmm
from timeseriesprediction.jl.
function indices_within(radius, dimension)
#Return indices β within hypersphere with radius
#Floor radius to nearest integer. Does not lose points
r = floor(Int,radius)
#Hypercube of indices
hypercube = CartesianIndices((repeat([-r:r], dimension)...,))
#Select subset of hc which is in Hypersphere
βs = [ β for β ∈ hypercube if norm(β.I) <= radius ]
end
function TimeseriesPrediction.SpatioTemporalEmbedding(
s::AbstractArray{<:AbstractArray{T,Φ}}, ΔT, τ, speed, boundary::BC
) where {T,Φ, BC<:AbstractBoundaryCondition}
if !(BC <: PeriodicBoundary) && typeof(boundary.c) != T
throw(ArgumentError(
"Boundary value must be same element type as the timeseries data."))
end
τs = Int[]
βs = CartesianIndex{Φ}[]
for delay = ΔT:-τ:1 # Backwards for forward embedding 1:τ:ΔT
radius = max(speed*delay, 1.) # No radius lower than 1
β = indices_within(radius, Φ)
push!(βs, β...)
push!(τs, repeat([ΔT - delay], length(β))...)
end
X = length(τs)
return SpatioTemporalEmbedding{X}(τs, βs, boundary, size(s[1]))
end
function visualize_STE(em::STE{2})
figure()
grid()
axis("equal")
r = maximum([max(β.I...) for β in em.β])
xticks(-r:r)
yticks(-r:r)
for τ in em.τ
points = [ β.I for (delay,β) in zip(em.τ,em.β) if delay == τ]
x = map(xy -> xy[1], points)
y = map(xy -> xy[2], points)
scatter(x,y, c="C$τ", s=100)
#Plot Circle
radius = maximum(norm.(points))
x = radius*cos.(0:0.1:2π)
y = radius*sin.(0:0.1:2π)
plot(x,y, c="C$τ")
end
scatter([0],[0], color="black", s=200)
end
s = [rand(10,10) for i =1:5];
em = SpatioTemporalEmbedding(s, 5,1,1,PeriodicBoundary())
visualize_STE(em)
from timeseriesprediction.jl.
@Datseris : This Constructor is quite simple.
I think we could also just add it into the library on top of highlighting it as as example in the docs.
from timeseriesprediction.jl.
Example with ΔT = 1, τ = 1 and speed =1
from timeseriesprediction.jl.
Not sure what your comment means.
To clarify:
AFAICT DynamicalSystemsBase.jl
implements a forward embedding such as
x[t] = (s[t], s[t+τ], ... , s[t+D*τ])
or in the new implementation with
x[t] = (s[t], s[t+τ[1]], ..., s[t+τ[D]])
with all τ > 0 and the largest τ referring the most recent measurement.
The same is true for TimeseriesPrediction.jl
: Only positive τ
that are used as s[t+τ]
(instead of s[t-τ]
which could also be done)
This is important for this type of embedding. If I do it the wrong way around, we end up with a cone that expands in the wrong direction of time.
from timeseriesprediction.jl.
Related Issues (20)
- Move documentation of TSPred to this repo.
- Issue with light cone embedding
- Implement a CompositeBoundary HOT 1
- Prediction of flow dynamics using point processes (new prediction scheme)
- Documentation of SymmetricSpatialEmbedding
- ArgumentError: principal variance cannot exceed total variance. HOT 9
- Documentation: light_cone_embedding and r0 HOT 2
- Nearest Trajectory Strategy for Time Series Prediction HOT 2
- Barkley in tests/system_defs.jl is very slow
- Consistency of source code for crossprediction
- versions, documentation, paper
- Use multiple input timeseries as training HOT 1
- Remove duplication of inner to reduce source
- Better Boundary Conditions
- LoadError: UndefVarError: AbstractEmbedding not defined HOT 4
- Is this repo supported? HOT 2
- error to run timeseriesprediction.ipynb HOT 1
- Compile fail : AbstractDataset not defined HOT 2
- TagBot trigger issue HOT 10
- Compatibility with DynamicalSystems v3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from timeseriesprediction.jl.