6f879e9070caef58cd37e9ceb07bfc6fa4044668,mir_eval/segment.py,,frame_clustering_rand,#,168
Before Change
y_true = boundaries_to_frames(annotated_boundaries, frame_size=frame_size)
y_pred = boundaries_to_frames(predicted_boundaries, frame_size=frame_size)
// Make sure we have the same number of frames
assert(len(y_true) == len(y_pred))
// Compute all the clustering metrics
//// Adjusted rand index
After Change
y_true = boundaries_to_frames(annotated_boundaries, frame_size=frame_size)
y_pred = boundaries_to_frames(predicted_boundaries, frame_size=frame_size)
// Make sure we have the same number of frames
if len(y_true) != len(y_pred):
raise ValueError("Timing mismatch: %.3f vs %.3f" % (annotated_boundaries[-1], predicted_boundaries[-1]))
// Compute all the clustering metrics
//// Adjusted rand index
return metrics.adjusted_rand_score(y_true, y_pred)
def frame_clustering_mutual_information(annotated_boundaries, predicted_boundaries, frame_size=0.1):
"""Frame-clustering segmentation: mutual information metrics.
In pattern: SUPERPATTERN
Frequency: 5
Non-data size: 13
Instances Project Name: craffel/mir_eval
Commit Name: 6f879e9070caef58cd37e9ceb07bfc6fa4044668
Time: 2013-09-03
Author: brm2132@columbia.edu
File Name: mir_eval/segment.py
Class Name:
Method Name: frame_clustering_rand
Project Name: craffel/mir_eval
Commit Name: 6f879e9070caef58cd37e9ceb07bfc6fa4044668
Time: 2013-09-03
Author: brm2132@columbia.edu
File Name: mir_eval/segment.py
Class Name:
Method Name: frame_clustering_nce
Project Name: craffel/mir_eval
Commit Name: 6f879e9070caef58cd37e9ceb07bfc6fa4044668
Time: 2013-09-03
Author: brm2132@columbia.edu
File Name: mir_eval/segment.py
Class Name:
Method Name: frame_clustering_v_measure
Project Name: craffel/mir_eval
Commit Name: 6f879e9070caef58cd37e9ceb07bfc6fa4044668
Time: 2013-09-03
Author: brm2132@columbia.edu
File Name: mir_eval/segment.py
Class Name:
Method Name: frame_clustering_mutual_information
Project Name: craffel/mir_eval
Commit Name: 6f879e9070caef58cd37e9ceb07bfc6fa4044668
Time: 2013-09-03
Author: brm2132@columbia.edu
File Name: mir_eval/segment.py
Class Name:
Method Name: frame_clustering_pairwise