aae4f34978f5672448990d1f029b72d31e09a215,gpflow/likelihoods.py,MultiClass,variational_expectations,#MultiClass#Any#Any#Any#,427
Before Change
if isinstance(self.invlink, RobustMax):
gh_x, gh_w = hermgauss(self.num_gauss_hermite_points)
p = self.invlink.prob_is_largest(Y, Fmu, Fvar, gh_x, gh_w)
return p * np.log(1 - self.invlink.epsilon) + (1. - p) * np.log(self.invlink._eps_K1)
else:
raise NotImplementedError
def predict_mean_and_var(self, Fmu, Fvar):
After Change
def variational_expectations(self, Fmu, Fvar, Y):
if isinstance(self.invlink, RobustMax):
with params_as_tensors_for(self.invlink):
gh_x, gh_w = hermgauss(self.num_gauss_hermite_points)
p = self.invlink.prob_is_largest(Y, Fmu, Fvar, gh_x, gh_w)
ve = p * tf.log(1. - self.invlink.epsilon) + (1. - p) * tf.log(self.invlink._eps_K1)
return ve
else:
raise NotImplementedError
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: GPflow/GPflow
Commit Name: aae4f34978f5672448990d1f029b72d31e09a215
Time: 2018-04-30
Author: j.8r4d5h4w@gmail.com
File Name: gpflow/likelihoods.py
Class Name: MultiClass
Method Name: variational_expectations
Project Name: GPflow/GPflow
Commit Name: d1ac7b831ad36cd0e4bdd7980819f83208345148
Time: 2018-02-07
Author: alex.ialongo@gmail.com
File Name: gpflow/expectations.py
Class Name:
Method Name: _expectation
Project Name: GPflow/GPflow
Commit Name: aae4f34978f5672448990d1f029b72d31e09a215
Time: 2018-04-30
Author: j.8r4d5h4w@gmail.com
File Name: gpflow/likelihoods.py
Class Name: MultiClass
Method Name: _predict_non_logged_density