Skip to content
This repository has been archived by the owner on Oct 31, 2020. It is now read-only.

Specifying a function from a lookup table #386

Open
tcstewar opened this issue Mar 29, 2013 · 1 comment
Open

Specifying a function from a lookup table #386

tcstewar opened this issue Mar 29, 2013 · 1 comment
Assignees

Comments

@tcstewar
Copy link
Contributor

It'd be great to be able to do this:

input = [[1, 1], [-1, 1], [-1, -1], [1, -1]]
output = [[1], [-1], [1], [-1]]

net.make('A', 200, 2, eval_points=input)
net.make('B', 100, 1)
net.connect('A', 'B', func=output)

This would specify a function from a dataset, rather than defining the function itself. Indeed, we could even load the data in from .csv files

net.make('A', 200, 2, eval_points='input.csv')
net.make('B', 100, 1)
net.connect('A', 'B', func='output.csv')
@ghost ghost assigned tcstewar Mar 29, 2013
@tcstewar
Copy link
Contributor Author

tcstewar commented Apr 1, 2013

I've implemented the first of the two examples above.

One thing to watch out for is its behaviour if you switch to direct mode: it prints a warning message and then just outputs 0 for the function. I'm not sure what the correct behaviour should be, but one option would be to have it implement a nearest-neighbour algorithm on the lookup table.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

1 participant