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

Encoding binary categories & empty input #463

Open
breznak opened this issue May 9, 2019 · 4 comments
Open

Encoding binary categories & empty input #463

breznak opened this issue May 9, 2019 · 4 comments
Assignees
Labels
encoder research new functionality of HTM theory, research idea

Comments

@breznak
Copy link
Member

breznak commented May 9, 2019

In DateTime encoder #462 I noticed a field weekend is encoded as a Category (with scalar encoder).

Weekend is a binary field : T/F.
We use scalar encoder for categories, with radius=1(no overlap).
Say w=5.
T = [1111100000]
F = [0000011111]

This encoding makes sense for number of categories >2, but for binary cats, I'd prefer
T = [11111]
F = [00000]

Do we want to add such hack to Scalar?

@breznak breznak added the encoder label May 9, 2019
@breznak
Copy link
Member Author

breznak commented May 9, 2019

CC @ctrl-z-9000-times

@breznak
Copy link
Member Author

breznak commented May 9, 2019

..ok, probably not worth it, as scalar is more an example encoder. For real problems, one should use RDSE (which can encode categories the same way), and there this should not be applicable.

@ctrl-z-9000-times
Copy link
Collaborator

T = [11111]
F = [00000]

This does not have a constant sparsity, and I think that the spatial pool might have trouble recognizing "F"

If you want to do this anyways then there is a simple hack for this:
SDR({ w }).randomize( float( data == "T" ) )

@breznak
Copy link
Member Author

breznak commented May 9, 2019

This does not have a constant sparsity,

this is a good point. And with above "solved by RDSE", probably not worth hacking.

and I think that the spatial pool might have trouble recognizing "F"

this is a good point, an old issue. I think SP should be able to recognize and act on "no input" as some input. I'll make a separate issue for this. A solution on my mind, have a const random SDR that is encoded each time {} is on SP.compute()

@ctrl-z-9000-times ctrl-z-9000-times added the research new functionality of HTM theory, research idea label May 13, 2019
@breznak breznak changed the title Encoding binary categories Encoding binary categories & empty input Jun 2, 2020
@breznak breznak self-assigned this Jun 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
encoder research new functionality of HTM theory, research idea
Projects
None yet
Development

No branches or pull requests

2 participants