15.12.2012 Views

scipy tutorial - Baustatik-Info-Server

scipy tutorial - Baustatik-Info-Server

scipy tutorial - Baustatik-Info-Server

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

SciPy Reference Guide, Release 0.8.dev<br />

setfeaturesandsamplespace(f, samplespace)<br />

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<br />

mapping the sample space to real values. The parameter vector self.params is initialized to zero.<br />

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<br />

much faster.<br />

This is only appropriate when the sample space is finite.<br />

class bigmodel()<br />

A maximum-entropy (exponential-form) model on a large sample space.<br />

The model expectations are not computed exactly (by summing or integrating over a sample space) but approximately<br />

(by Monte Carlo estimation). Approximation is necessary when the sample space is too large to sum or<br />

integrate over in practice, like a continuous sample space in more than about 4 dimensions or a large discrete<br />

space like all possible sentences in a natural language.<br />

Approximating the expectations by sampling requires an instrumental distribution that should be close to the<br />

model for fast convergence. The tails should be fatter than the model.<br />

252 Chapter 3. Reference

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!