Comments (6)
So, they are skipped.
from complexitymeasures.jl.
I'll post my comments on #74.
from complexitymeasures.jl.
I would like the possibility to calculate a permutation of 2D and 3D objects (possibly images, or 1D spatiotemporal systems in the 2D case, and 2D spatiotemporal systems or volumes in the 3D case).
That would indeed be useful!
An example for the 2D version is given in Ribero et al. (2012), and a 3D version is described in Schlemmer et al. (2018). Essentially, you take a subarray out of the original array, flatten it and calculate the permutation index of the resulting pattern.
But I would like to have this method in a much more generic way than it is presented in the papers above, where any "stencil shape" can be used, not just rectangles (2D) or the "tripod" in the 3D case. This can be realized by allowing the user to give a boolean array to the function. Example. ...
that can then be translated into permutation indices, from which a distribution can be estimated, from which a permutation entropy can be calculated.
Thanks for the references, and for the clear and concise explanation.
From first glance, a basic version of 2D/3D algorithms should be relatively straight-forward to implement. I see applications for my own research here too, so I'll put this on my todo-list.
One could also (but imo does not necessarily need) to implement the option to pass a 2D (3D) lag and length instead of a stencil to easily get rectangular shaped stencils, similar to what's already described in the Ribero paper and implemented in the ordpy library.
Custom-shaped stencils sound useful. Do you have a concrete example with (like you provided above for the square case) that illustrate precisely what you envision?
from complexitymeasures.jl.
Custom-shaped stencils sound useful. Do you have a concrete example with (like you provided above for the square case) that illustrate precisely what you envision?
I'm not exactly sure if this is what you were asking for, but for example the stencil corresponding to the tripod in Schlemmer et al. would look like
julia> stencil
2×2×2 Array{Float64, 3}:
[:, :, 1] =
1.0 1.0
1.0 0.0
[:, :, 2] =
1.0 0.0
0.0 0.0
I don't think there are any other publications using other custom shapes (yet), but I think it is much easier this way than always providing a specific lag and word length to try to build the 2D or 3D patterns. Also, this gives more room for extension, if one ever wants to try other shapes for some reason.
I'm not sure how you would go about this in Julia
the most efficient way, I know that in python
, there are functions in ML libraries (like the unfold
operation) that can very efficiently extract patches from arrays, maybe that's a thing in Julia
too. So once you have collected the patches into an array of a shape [n_patches_x, n_patches_y, stencil_x, stencil_y]
, you can just go and do
patterns = patches[...,stencil]
from complexitymeasures.jl.
@ikottlarz or @kahaaga can either of your tell me what is the typical thing people do when indices exceed the array bounds? Like if I reach the lower right pixel and the stencil is a 2x2 square, three indices are out of bounds. what do people tupically do in these scenarios?
from complexitymeasures.jl.
@Datseris same as for the 1D case: You don't consider it a pattern. The last pattern is the last one fully contained in the data.
from complexitymeasures.jl.
Related Issues (20)
- Dep compatibility issue between ComplexityMeasures (3.0.0) and DynamicalSystems (3.2.3). HOT 10
- ```genentropy``` is broken HOT 1
- Docstring and implementation for Statistical Complexity is wrong HOT 1
- `eachindex` for `Probabilities` is ambiguous HOT 3
- Signature for `Counts` and `Probabilities` docstrings has the wrong type parameter order HOT 3
- Missing deprecation for `OrdinalPatterns{m}(; τ)` HOT 10
- Some documentation issues for CI HOT 2
- The function `lt` in `OrdinalPatternEncoding` isn't actually used
- Reproducibility for `OrdinalPatternEncoding` HOT 3
- It shouldn't be possible to construct an empty `CombinationEncoding` HOT 3
- Feature: "distribution entropy" HOT 3
- Feature: bubble entropy (description is WIP) HOT 4
- Feature: "increment entropy" HOT 1
- Feature: "attention entropy"
- `missing_probabilities` HOT 1
- `counts_and_outcomes` for `BubbleSortSwaps` should also accept state space sets
- Syntax with type parameter `{m}` in `OrdinalPatterns` is not harmonious with the rest of the library HOT 1
- Encoding using `Dispersion` is slower than necessary due to manual integration for normal cdf
- Encoding complex-valued data HOT 2
- [Q] How to calculate MI between two vectors? HOT 3
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 complexitymeasures.jl.