Code Monkey home page Code Monkey logo

Comments (4)

Datseris avatar Datseris commented on June 25, 2024 1

Oooooooooooioh now I understand what you mean by "vector to be sorted". I thought you meant: sort the vectors wtihin the embedded set. You mean: sort the elements of each statespace point, i.e., the same as getting the sortperm for the patterns.

OKay, all good, I'll look at the PR now.

from complexitymeasures.jl.

Datseris avatar Datseris commented on June 25, 2024

encode(::BubbleSortCountEncoder, x::AbstractVector) converts x into an integer in the range 0:n(n−1)/2 (the number of swaps required to sort x).

I don't see how this is possible. encode should give the same encoding irrespectively of the order of the vectors in the state space set (embedded set). That's also why the encoding doesn't depend on the input data, but only one 1 element of the input data. For sorting this not the case. If the original dataset is already sorted, encode(e, x) would always return 0 irrespectively of x.

I think for this feature it makes sense to have the outcome space, but not the encoding. I find this more similar to the spectral entropy and the PowerSpectrum outcome space.

from complexitymeasures.jl.

kahaaga avatar kahaaga commented on June 25, 2024

encode(::BubbleSortCountEncoder, x::AbstractVector) converts x into an integer in the range 0:n(n−1)/2 (the number of swaps required to sort x).
don't see how this is possible. encode should give the same encoding irrespectively of the order of the vectors in the state space set (embedded set).

encode works strictly on single state vectors, not the entire embedding. Each vector has a certain amplitude distribution, which maps directly onto an integer in the range 0:n(n−1)/2, because 0 is the minimum number of swaps for the bubble sort algorithm to render the state vector sorted, and 0:n(n−1)/2 is the maximum number of swaps.

Many state vectors in the same embedding can map to the same integer, because the number of sorting operations required to sort them is the same, even though the vectors are different. The order of the embedding does matter here, because the input to encode is a state vector, not an embedding.

I've implemented my suggestion in #390. This should be clear from the source code there

from complexitymeasures.jl.

kahaaga avatar kahaaga commented on June 25, 2024

Closed by #390

from complexitymeasures.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.