MCPcopy Create free account
hub / github.com/Riley702/enhanced_benchmark_tool / plot_pairwise_relationships

Function plot_pairwise_relationships

src/visualizations.py:271–285  ·  view source on GitHub ↗

Plots pairwise relationships between numerical features. Args: df (pd.DataFrame): DataFrame containing numerical features. numerical_features (list): List of column names to visualize. hue (str, optional): Categorical column for coloring points. Returns:

(df, numerical_features, hue=None)

Source from the content-addressed store, hash-verified

269 plt.show()
270
271def plot_pairwise_relationships(df, numerical_features, hue=None):
272 """
273 Plots pairwise relationships between numerical features.
274
275 Args:
276 df (pd.DataFrame): DataFrame containing numerical features.
277 numerical_features (list): List of column names to visualize.
278 hue (str, optional): Categorical column for coloring points.
279
280 Returns:
281 None
282 """
283 sns.pairplot(df[numerical_features + ([hue] if hue else [])], hue=hue, diag_kind="kde", markers="o")
284 plt.suptitle("Pairwise Relationships Between Numerical Features", fontsize=14)
285 plt.show()
286
287
288def plot_category_vs_numerical(df, categorical_feature, numerical_feature):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected