4677f1eb215c93a651b4bb5c491b2c20b9efb8b2,evaluation/GoodnessOfFit.py,GoodnessOfFit,kolmogorov_smirnov_2sample,#GoodnessOfFit#,83
Before Change
return np.mean(ks), np.mean(p)
def kolmogorov_smirnov_2sample(self):
ks = []
p = []
for _ in range(self.repeat_kolmogorov):
self.resample_new_conditional_samples()
ks_new, p_new = ks_2samp(self.estimator_conditional_samples, self.proba_model_conditional_samples)
After Change
return np.mean(statistics[:,0]), np.mean(statistics[:,1])
def kolmogorov_smirnov_2sample(self):
samples = np.asarray([self.sample_conditional_values() for _ in range(self.repeat_kolmogorov)])
estimator_cond_samples = samples[:, 0]
probabilistic_cond_samples = samples[:, 1]
statistics = np.asarray(Parallel(n_jobs=-1)(delayed(ktest_2sample)(estimator_cond_samples[i], probabilistic_cond_samples[i]) for i in range(
self.repeat_kolmogorov)))
return np.mean(statistics[:,0]), np.mean(statistics[:,1])
def kl_divergence(self):
P = self.probabilistic_model.pdf
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances
Project Name: freelunchtheorem/Conditional_Density_Estimation
Commit Name: 4677f1eb215c93a651b4bb5c491b2c20b9efb8b2
Time: 2018-01-18
Author: f4bio.ferreira@gmail.com
File Name: evaluation/GoodnessOfFit.py
Class Name: GoodnessOfFit
Method Name: kolmogorov_smirnov_2sample
Project Name: freelunchtheorem/Conditional_Density_Estimation
Commit Name: 4677f1eb215c93a651b4bb5c491b2c20b9efb8b2
Time: 2018-01-18
Author: f4bio.ferreira@gmail.com
File Name: evaluation/GoodnessOfFit.py
Class Name: GoodnessOfFit
Method Name: kolmogorov_smirnov_cdf
Project Name: keras-team/keras
Commit Name: b95fcf7f52aca8ad0b1afb3cfc64c8eed534fafe
Time: 2017-07-29
Author: me@taehoonlee.com
File Name: tests/keras/backend/backend_test.py
Class Name: TestBackend
Method Name: test_nn_operations