The MissingValues Dispersion visualizer creates a chart that maps the position of missing values by the order of the index.
import numpy as np
from sklearn.datasets import make_classification from yellowbrick.contrib.missing import MissingValuesDispersion
- X, y = make_classification(
n_samples=400, n_features=10, n_informative=2, n_redundant=3, n_classes=2, n_clusters_per_class=2, random_state=854
)
# assign some NaN values X[X > 1.5] = np.nan features = ["Feature {}".format(str(n)) for n in range(10)]
visualizer = MissingValuesDispersion(features=features)
visualizer.fit(X) visualizer.show()
import numpy as np
from sklearn.datasets import make_classification from yellowbrick.contrib.missing import MissingValuesDispersion
- X, y = make_classification(
n_samples=400, n_features=10, n_informative=2, n_redundant=3, n_classes=2, n_clusters_per_class=2, random_state=854
)
# assign some NaN values X[X > 1.5] = np.nan features = ["Feature {}".format(str(n)) for n in range(10)]
# Instantiate the visualizer visualizer = MissingValuesDispersion(features=features)
visualizer.fit(X, y=y) # supply the targets via y visualizer.show()
yellowbrick.contrib.missing.dispersion