Specifying a function from a lookup table
tcstewar opened this issue · 1 comments
tcstewar commented
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')
tcstewar commented
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.