genome.models.functions

Model functions

genome.models.functions.errors(self, y)

Returns a floatX value of the error

Parameters:y (theano.tensor.TensorVariable) – A symbolic Tensor variable of the ground-truth data
Returns:The error rate
Return type:floatX
genome.models.functions.hessians(self, y)

Return a list of hessians w.r.t. to the model parameters

Parameters:y (theano.tensor.TensorVariable) – A symbolic Tensor variable of the ground-truth data
Returns:A list of hessian matrices corresponding to each parameter
Return type:list of theano.shared.TensorSharedVariable
genome.models.functions.mean_squared_error(self, y)

Returns a floatX value of the mean squared error (MSE)

Parameters:y (theano.tensor.TensorVariable) – A symbolic Tensor variable of the ground-truth data
Returns:The MSE of the linear model
Return type:floatX
genome.models.functions.negative_log_likelihood(self, y, mean=True)

Returns the mean or sum of the negative log likelihood

Parameters:y (theano.tensor.TensorVariable) – A symbolic Tensor variable of the ground-truth data
Returns:The negative log-likelihood of the mini-batch
Return type:floatX

Note

We use mean so the gradient is not dependent on the size of the batch. set mean=False if the optimization requires dependency on the size of the batch.