4de3a41cd1286ee4ea31c9f804a8403a141b11fe,nonconformist/evaluation.py,,reg_mean_size,#,209

Before Change


	if significance:
		prediction = model.predict(x, significance)
	else:
		prediction = model.predict(x)

	interval_size = 0
	for j in range(y.size):
		interval_size += np.abs(prediction[j, 1] - prediction[j, 0])
	return interval_size / y.size

def class_avg_c(model, x, y, significance=None):
	Calculates the average number of classes per prediction of a conformal
	classification model.

After Change


	Calculates the average prediction interval size of a conformal
	regression model.
	
	return np.mean(_reg_interval_size(prediction, y, significance))

def class_avg_c(prediction, y, significance):
	Calculates the average number of classes per prediction of a conformal
	classification model.
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: donlnz/nonconformist
Commit Name: 4de3a41cd1286ee4ea31c9f804a8403a141b11fe
Time: 2015-04-24
Author: henrik.linusson@gmail.com
File Name: nonconformist/evaluation.py
Class Name:
Method Name: reg_mean_size


Project Name: tristandeleu/pytorch-maml-rl
Commit Name: db9d883aecb6cdfba6c6bbc76b83d85397fef28d
Time: 2018-10-23
Author: tristan.deleu@gmail.com
File Name: maml_rl/utils/torch_utils.py
Class Name:
Method Name: weighted_mean


Project Name: modAL-python/modAL
Commit Name: d01c5b805e49346914b3b5ace081cae8cbb2a99a
Time: 2018-10-01
Author: theodore.danka@gmail.com
File Name: modAL/density.py
Class Name:
Method Name: information_density