30631c5a179a705125f40b1ec97b8ca67993788b,pyinterpret/core/global_interpretation/partial_dependence.py,,_compute_pd,#Any#Any#Any#Any#Any#,23

Before Change


        mean_prediction = np.array([mean_prediction])
        std_prediction = np.array([std_prediction])

    for feature_idx, feature_id in enumerate(feature_ids):
        val_col = feature_columns[feature_idx]
        pd_dict[val_col] = new_row[feature_idx]

    number_of_classes = len(class_columns)
    assert number_of_classes == mean_prediction.shape[0], "Mismatch between prediction dimension" \
                                                          "and number of class names" \
                                                          "Prediction dimension: {} " \

After Change


                                                          "n class_names: {}".format(*[mean_prediction.shape,
                                                                                       number_of_classes])

    pd_dict = {column: new_row[idx] for idx, column in enumerate(feature_columns)}
    if number_of_classes == 2:
        class_column = class_columns[1]
        pd_dict[class_column] = mean_prediction[1]
        pd_dict["sd"] = std_prediction[0]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 8

Instances


Project Name: datascienceinc/Skater
Commit Name: 30631c5a179a705125f40b1ec97b8ca67993788b
Time: 2017-04-06
Author: aikramer2@gmail.com
File Name: pyinterpret/core/global_interpretation/partial_dependence.py
Class Name:
Method Name: _compute_pd


Project Name: snipsco/snips-nlu
Commit Name: 3f6eeb9f152b324975c6b77eade8fddfa699dfa5
Time: 2017-06-01
Author: clement.doumouro@snips.ai
File Name: snips_nlu/builtin_entities.py
Class Name:
Method Name:


Project Name: deepchem/deepchem
Commit Name: c09ca92e84f45c61f9213a32c7f01627fd467174
Time: 2017-04-12
Author: Karl
File Name: deepchem/models/tensorgraph/tensor_graph.py
Class Name:
Method Name: _enqueue_batch


Project Name: databricks/spark-deep-learning
Commit Name: aeff9c9e2c24ed09c093414a7b51ec9bd42f1e86
Time: 2017-12-19
Author: 33237569+tomasatdatabricks@users.noreply.github.com
File Name: python/tests/transformers/named_image_test.py
Class Name: NamedImageTransformerBaseTestCase
Method Name: setUpClass