e8b2e17f4eec658f6a6d53486dbbe3eac48bb0fa,pyinterpret/core/global_interpretation/partial_dependence.py,PartialDependence,_plot_2d_2_binary_feature,#PartialDependence#Any#Any#Any#Any#Any#Any#,619
Before Change
color = next(colors)
ax.set_xlabel(feature1)
ax.set_ylabel("Predicted {}".format(class_name))
handles, labels = ax.get_legend_handles_labels()
ax.legend(handles, labels)
return flatten([figure_list, axis_list])
After Change
class_col_pairs, with_variance=False):
figure_list, axis_list = [], []
sd_col = pdp_metadata["sd_col"]
std_error = pdp.set_index([feature1, feature2])[sd_col].unstack()
for class_name, mean_col in class_col_pairs:
f = plt.figure()
ax = f.add_subplot(111)
//feature2 is columns
//feature1 is index
plot_data = pdp.set_index([feature1, feature2])[mean_col].unstack()
plot_data.plot(ax=ax, color=COLORS)
if with_variance:
colors = cycle(COLORS)
binary1_values = plot_data.index.values
binary2_values = plot_data.columns.values
for binary2_value in binary2_values:
color = next(colors)
yerr = std_error[binary2_value].values
upper_plane = yerr + plot_data[binary2_value].values
lower_plane = plot_data[binary2_value].values - yerr
ax.fill_between(binary1_values, lower_plane, upper_plane,
color=color,alpha=.2)
figure_list.append(f)
axis_list.append(ax)
ax.set_xlabel(feature1)
ax.set_ylabel("Predicted {}".format(class_name))
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 7
Instances
Project Name: datascienceinc/Skater
Commit Name: e8b2e17f4eec658f6a6d53486dbbe3eac48bb0fa
Time: 2017-03-30
Author: aikramer2@gmail.com
File Name: pyinterpret/core/global_interpretation/partial_dependence.py
Class Name: PartialDependence
Method Name: _plot_2d_2_binary_feature
Project Name: datascienceinc/Skater
Commit Name: e8b2e17f4eec658f6a6d53486dbbe3eac48bb0fa
Time: 2017-03-30
Author: aikramer2@gmail.com
File Name: pyinterpret/core/global_interpretation/partial_dependence.py
Class Name: PartialDependence
Method Name: _plot_2d_2_binary_feature
Project Name: datascienceinc/Skater
Commit Name: e8b2e17f4eec658f6a6d53486dbbe3eac48bb0fa
Time: 2017-03-30
Author: aikramer2@gmail.com
File Name: pyinterpret/core/global_interpretation/partial_dependence.py
Class Name: PartialDependence
Method Name: _plot_2d_1_binary_feature_and_1_continuous
Project Name: freelunchtheorem/Conditional_Density_Estimation
Commit Name: b71a65e0a314ecd6e17d18a70db4b4177a43d5ed
Time: 2018-03-30
Author: jonas.rothfuss@gmx.de
File Name: cde/evaluation/GoodnessOfFitResults.py
Class Name: GoodnessOfFitResults
Method Name: plot_metric