Reference: :cite:`folch2016centralization`. """ def __init__(self, data, group_pop_var, total_pop_var, k_neigh=5): aux = _local_relative_centralization(data, group_pop_var, total_pop_var, k_neigh) self.statistics = aux[0] self.core_data = aux[1] self._function = _local_relative_centralization # Deprecation Calls msg = _dep_message("Multi_Location_Quotient", "MultiLocationQuotient") Multi_Location_Quotient = DeprecationHelper(MultiLocationQuotient, message=msg) msg = _dep_message("Multi_Local_Diversity", "MultiLocalDiversity") Multi_Local_Diversity = DeprecationHelper(MultiLocalDiversity, message=msg) msg = _dep_message("Multi_Local_Entropy", "MultiLocalEntropy") Multi_Local_Entropy = DeprecationHelper(MultiLocalEntropy, message=msg) msg = _dep_message("Multi_Local_Simpson_Interaction", "MultiLocalSimpsonInteraction") Multi_Local_Simpson_Interaction = DeprecationHelper( MultiLocalSimpsonInteraction, message=msg) msg = _dep_message("Multi_Local_Simpson_Concentration", "MultiLocalSimpsonConcentration")
""" Plot the Compare_Segregation class """ try: import matplotlib.pyplot as plt import seaborn as sns except ImportError: warnings.warn( 'This method relies on importing `matplotlib` and `seaborn`') f = sns.distplot(self.est_sim, hist=True, color='darkblue', hist_kws={'edgecolor': 'black'}, kde_kws={'linewidth': 2}, ax=ax) plt.axvline(self.est_point_diff, color='red') plt.title('{} (Diff. value = {})'.format(self._class_name, round(self.est_point_diff, 3))) return f # Deprecation Calls msg = _dep_message("Infer_Segregation", "SingleValueTest") Infer_Segregation = DeprecationHelper(SingleValueTest, message=msg) msg = _dep_message("Compare_Segregation", "TwoValueTest") Compare_Segregation = DeprecationHelper(TwoValueTest, message=msg)
'Counterfactual First Context Composition') axs[1, 0].axis('off') # Counterfactual Second Context (Upper Right) self._counterfac_df2.plot(column='counterfactual_composition', cmap='OrRd', legend=True, ax=axs[0, 1]) axs[0, 1].title.set_text( 'Counterfactual Second Context Composition') axs[0, 1].axis('off') # Original Second Context (Bottom Right) self._counterfac_df2.plot(column='group_composition', cmap='OrRd', legend=True, ax=axs[1, 1]) axs[1, 1].title.set_text('Original Second Context Composition') axs[1, 1].axis('off') # Deprecation Calls msg = _dep_message("Decompose_Segregation", "DecomposeSegregation") Decompose_Segregation = DeprecationHelper(DecomposeSegregation, message=msg)
Reference: :cite:`roberto2015divergence`. """ def __init__(self, data, groups): aux = _multi_divergence(data, groups) self.statistic = aux[0] self.core_data = aux[1] self._groups = aux[2] self._function = _multi_divergence # Deprecation Calls msg = _dep_message("Multi_Dissim", "MultiDissim") Multi_Dissim = DeprecationHelper(MultiDissim, message=msg) msg = _dep_message("Multi_Gini_Seg", "MultiGiniSeg") Multi_Gini_Seg = DeprecationHelper(MultiGiniSeg, message=msg) msg = _dep_message("Multi_Normalized_Exposure", "MultiNormalizedExposure") Multi_Normalized_Exposure = DeprecationHelper(MultiNormalizedExposure, message=msg) msg = _dep_message("Multi_Information_Theory", "MultiInformationTheory") Multi_Information_Theory = DeprecationHelper(MultiInformationTheory, message=msg) msg = _dep_message("Multi_Relative_Diversity", "MultiRelativeDiversity") Multi_Relative_Diversity = DeprecationHelper(MultiRelativeDiversity,