d01c5b805e49346914b3b5ace081cae8cbb2a99a,modAL/density.py,,information_density,#,32
Before Change
Returns:
The information density for each sample.
inf_density = np.zeros(shape=(X.shape[0],))
for X_idx, X_inst in enumerate(X):
inf_density[X_idx] = sum(similarity_measure(X_inst, X_j) for X_j in X)
return inf_density/X.shape[0]
After Change
similarity_mtx = 1/(1+pairwise_distances(X, X, metric=metric))
return similarity_mtx.mean(axis=1)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances 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
Project Name: alexandrebarachant/muse-lsl
Commit Name: 858862178de7e298be10dda06b5bdc3f8bb5dc12
Time: 2017-06-27
Author: morrisondano@gmail.com
File Name: lsl-viewer.py
Class Name: LSLViewer
Method Name: update_plot
Project Name: scikit-learn-contrib/DESlib
Commit Name: 85d5c30d2186d07857d1f0fb7c269eb08d2b7d79
Time: 2018-04-07
Author: rafaelmenelau@gmail.com
File Name: deslib/des/des_clustering.py
Class Name: DESClustering
Method Name: fit