691ab45b091efada84b851e100f93452ab99f11f,pyglmnet/pyglmnet.py,,_logL,#Any#Any#Any#Any#,57
Before Change
else:
logL = np.sum(y * np.log(y_hat) + (1 - y) * np.log(1 - y_hat))
elif distr == "probit":
logL = np.sum(y * np.log(y_hat) + (1 - y) * np.log(1 - y_hat))
elif distr == "gamma":
// see
// https://www.statistics.ma.tum.de/fileadmin/w00bdb/www/czado/lec8.pdf
nu = 1. // shape parameter, exponential for now
After Change
logL = np.sum(y * np.log(y_hat + eps) - y_hat)
elif distr == "gaussian":
logL = -0.5 * np.sum((y - y_hat)**2)
elif distr in ["binomial", "probit"]:
// prevents underflow
if z is not None:
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: glm-tools/pyglmnet
Commit Name: 691ab45b091efada84b851e100f93452ab99f11f
Time: 2018-09-04
Author: pavan.ramkumar@gmail.com
File Name: pyglmnet/pyglmnet.py
Class Name:
Method Name: _logL
Project Name: Microsoft/nni
Commit Name: 79a3ce9a6c529774d266922fd0b447bf57a8d039
Time: 2019-07-27
Author: suiguoxin@gmail.com
File Name: src/sdk/pynni/nni/gridsearch_tuner/gridsearch_tuner.py
Class Name: GridSearchTuner
Method Name: parse_qtype
Project Name: pysb/pysb
Commit Name: 242b37fab5f5286cc3a874ac2a2eb89f617d2e37
Time: 2013-03-11
Author: bachmanjohn@gmail.com
File Name: pysb/exporters/mathematica.py
Class Name: ExportMathematica
Method Name: export