def get_title(rf_local): # when you are asked to "shadow name", you should change the name. x = rf_local.get_test_set_original_results() y = rf_local.testResults type_str = BPTypes.get_type_name(rf_local.type) stats_toolkit_obj = StatsToolKits(x, y) pearson_r, p_val = stats_toolkit_obj.get_pearson_corr() mic = stats_toolkit_obj.get_mic() return type_str + ' ' + 'Regression Results\n' + \ 'pearson regression: ' + '%.2f' % pearson_r + ' p value: ' + '%.2e' % p_val + '\n'\ 'maximal information coefficient: ' + '%.2f' % mic
def save_predict_result(self, sig_name, title, plt_root_path): tmp_plt = self.dt.generate_scatter_plt(list(self.y_test[:, self.colsResTypes.index(self.type)]), list(self.testResults), "Measured " + BPTypes.get_type_name(self.type) + "(mmHg)", "Estimated " + BPTypes.get_type_name(self.type) + "(mmHg)", sig_name + ": " + title) tmp_plt.savefig(plt_root_path + '_' + BPTypes.get_type_name(self.type) + '_' + sig_name + '.png')
def show_mbp_full_set_result(self, title, mbp_local): tmp_plt = self.dt.generate_scatter_plt(mbp_local, list(self.testResults), "Measured " + BPTypes.get_type_name(self.type) + "(mmHg)", "Estimated " + BPTypes.get_type_name(self.type) + "(mmHg)", title) tmp_plt.show()
def show_full_set_result(self, title): tmp_plt = self.dt.generate_scatter_plt(self.get_test_set_original_results(), list(self.testResults), "Measured " + BPTypes.get_type_name(self.type) + "(mmHg)", "Estimated " + BPTypes.get_type_name(self.type) + "(mmHg)", title) tmp_plt.show()