Skip to content

docs: tutorials + docstrings#63

Open
cvigilv wants to merge 4 commits into
mainfrom
38-integration
Open

docs: tutorials + docstrings#63
cvigilv wants to merge 4 commits into
mainfrom
38-integration

Conversation

@cvigilv

@cvigilv cvigilv commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

This PR improves on the existing tutorials and covers the package's functionality as much as possible.

Closes #32
Closes #36
Closes #38

@cvigilv cvigilv mentioned this pull request Jul 15, 2026
@cvigilv cvigilv self-assigned this Jul 15, 2026
@cvigilv
cvigilv requested a review from MichielStock July 15, 2026 13:58
@cvigilv

cvigilv commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator Author

@MichielStock, I'd be happy if you could take a look; otherwise, we can merge it, and you can work from there. As you prefer.

# and manipulates information using high-dimensional vectors called **hypervectors**. These
# vectors typically have thousands of dimensions (often 1,000-10,000), making them
# "hyperdimensional."
# vectors typically have thousands of dimensions (often 1.000-10.000), making them

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

should be 1000-10,000


# Alternatively, one can create a hypervector directly from a `Vector{T}` where `{T}` is an
# appropiate data type, e.g. integers for BipolarHV:
H = BinaryHV

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is correct, but is this not quite opaque for a tutorial?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This is more to exemplify, not to be too verbose. I tested it without that line and it feels like you are reading "BinaryHV" along all the tutorial (when in reality its not SO important for an introductory tutorial)

h₁ = BipolarHV(; D = 8)
h₂ = BipolarHV(; D = 8)
h₃ = BipolarHV(; D = 8);
# ...and there are a lot of them -- this is where the "hyper" comes from:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

chances are astronomically low that two randomly drawn vectors are the same

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Very nice tutorial!

Comment thread docs/src/examples/iris.jl
# We can now encode a single flower: bind each feature value to its key and bundle the pairs with
# [`hashtable`](@ref).

encode(features::AbstractVector{Float64}) = hashtable(cm2hv.(features), H_features)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

maybe merge the stateful encoders #64 and then use that function. I can also update this automatically with the agent

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Makes sense, I'll do the merging tomorrow

Comment thread src/representations.jl

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Unsure whether to continue this, maybe too gimicky ?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Having more representations for the hypervectors? I think what we have now is good enough

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.

Documentation issues On improving the documentation

2 participants