analysis_plan#

scikitplot.feature_selection.analysis_plan(schema, target=None, *, rules=None, role='feature')[source]#

Route every feature to the plots, summaries and tests that fit its kind.

Parameters:
schemaFeatureSchema

Fitted schema.

targetstr or None, default=None

A target column of the schema, or a target kind ("binary", "numeric_continuous" …). None omits the bivariate columns’ content.

rulesmapping or None, default=None

Replacement for DEFAULT_ANALYSIS_RULES (same keys).

rolestr or sequence of str or None, default=”feature”

Roles to include.

Returns:
pandas.DataFrame

Indexed by feature with kind, plots, summaries, target_tests, target_plots and notes (tuples of names).

Parameters:
Return type:

DataFrame

Examples

>>> import pandas as pd
>>> from scikitplot.feature_selection import analysis_plan, profile_features
>>> X = pd.DataFrame({"x": [1.5, 2.5, 3.5, 50.5] * 5, "y": [0, 1] * 10})
>>> plan = analysis_plan(profile_features(X, {"roles": {"target": ["y"]}}), "y")
>>> plan.loc["x", "target_tests"], plan.loc["x", "notes"]
(('mannwhitneyu', 'ttest_ind'), ('has_outliers: robust_summaries', 'skewed: log_scale_axis'))