Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Estimations of ε #89

Closed
wants to merge 2 commits into from
Closed

Estimations of ε #89

wants to merge 2 commits into from

Conversation

yuxi-liu-wired
Copy link
Member

#67

src/matrices.jl Outdated Show resolved Hide resolved
@yuxi-liu-wired
Copy link
Member Author

Try this example usage:

using DynamicalSystems, PyPlot, RecurrenceAnalysis

R = RecurrenceMatrix(tr, 0.1; scale="powerlaw")
Rg = grayscale(R)
imshow(Rg, cmap = "binary_r", extent = (1, size(R)[1], 1, size(R)[2]))

Change scale="powerlaw" to scale=median, scale=var, scale="peak" for the other methods I implemented.

"peak" gives very poor results for some reason.

@@ -1,3 +1,5 @@
using Statistics
using ChaosTools:linear_region
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can't add ChaosTools as a dependency of RecurrenceAnalysis. You can just copy the linear_region code, but I think it is probably better to move linear_region to DelayEmbeddings.jl, as it is a more basic package and the method is generally useful.

I'll do this ASAP.

@Datseris
Copy link
Member

Norbert added some comments in #67 that should be incorporated here.

s = resolve_scale(x, m, ε; kwargs...)
if !haskey(kwargs, :scale)
s = resolve_scale(x, x, m, ε; kwargs...)
elseif kwargs[:scale] == "powerlaw"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be replaced with a type-based dispatch system? I find that it's immensely helpful to specify options, and clarify dispatches...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure how helpful this will be in the end of the road, because it would make the code much larger. How do you think it would be done to keep the code the same size?

In addition, from the user perspective method = "linear" or method = "cubic" is simpler to understand than method = Linear(), method = Cubic(). Everyone knows strings, but not everyone knows singleton types and their role in multiple dispatch.

But in general I also prefer using multiple dispatch instead of unending if statements.

@yuxi-liu-wired
Copy link
Member Author

btw, I have lost interest in this issue. It feels too experimental and theoretically shallow.
Anyone is free to take my code and continue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants