model.setfeaturesandsamplespace(f, samplespace)

Creates a new matrix self.F of features f of all points in the sample space. f is a list of feature functions f_i mapping the sample space to real values. The parameter vector self.params is initialized to zero.

We also compute f(x) for each x in the sample space and store them as self.F. This uses lots of memory but is much faster.

This is only appropriate when the sample space is finite.

Previous topic


Next topic


This Page