21971e673fabe25d3e7da6712f80222760516113,server/website/website/tasks/async_tasks.py,,clean_metric_data,#Any#Any#Any#,149

Before Change


    if unused_columns:
        indexes = [i for i, n in enumerate(metric_labels) if n in unused_columns]
        // Delete unused columns
        matrix = np.delete(matrix, indexes, 1)
        for i in sorted(indexes, reverse=True):
            del metric_labels[i]
    return matrix, metric_labels

After Change


    LOG.debug("clean_metric_data added %d metrics and removed %d metric.", len(missing_columns),
              len(unused_columns))
    default_val = 0
    metric_cat_size = len(metric_cat)
    matrix = np.ones((len(metric_matrix), metric_cat_size)) * default_val
    metric_labels_dict = {n: i for i, n in enumerate(metric_labels)}
    // column labels in matrix has the same order as ones in metric catalog
    // missing values are filled with default_val
    for i, metric_name in enumerate(metric_cat):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: cmu-db/ottertune
Commit Name: 21971e673fabe25d3e7da6712f80222760516113
Time: 2020-02-26
Author: bohanzhang95@gmail.com
File Name: server/website/website/tasks/async_tasks.py
Class Name:
Method Name: clean_metric_data


Project Name: shubhomoydas/ad_examples
Commit Name: 05a835a5ace351ecc5eabde72e6cff4ddd2830f7
Time: 2018-08-04
Author: smd.shubhomoydas@gmail.com
File Name: python/aad/query_model_euclidean.py
Class Name: QueryTopDiverseByEuclideanDistance
Method Name: filter_by_euclidean_distance


Project Name: EpistasisLab/tpot
Commit Name: 929ece0faa71cf615f05617884b962e08a164377
Time: 2016-08-02
Author: supacoofoo@gmail.com
File Name: tpot/operators/selectors/base.py
Class Name: Selector
Method Name: _fit_mask