Skip to content

Improving string representation of hypervectors #43

@cvigilv

Description

@cvigilv

I started using the package for my PhD experiments and, to be honest, the string representation of the hypervectors is confusing from time to time. For example, in the tutorial example, the last function returns the following:

julia> nearest_neighbor(query, H_phrases)
(0.4058464594863062, 3, 1 / 0 : 4991 / 5009)

Without knowing a priori what this function returns, if very difficult to parse that the last entry in the tuple is a hypervectors.

I propose doing a small modification to the string representation so we include the hypervector type in the string, something like:

AbstractHV(<dimension>, <stats/characteristics/etc>...)

That way, the example shown previously would become:

julia> nearest_neighbor(query, H_phrases)
(0.4058464594863062, 3, BinaryHV(10.000, 1 / 0 : 4991 / 5009))

LMKWYT

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions