In [1]:
%matplotlib inline
In [2]:
from yellowbrick.datasets import load_occupancy
from yellowbrick.features import RadViz
# Load the classification dataset
X, y = load_occupancy()
features = X.columns
# Specify the target classes
classes = ["unoccupied", "occupied"]
# Instantiate the visualizer
visualizer = RadViz(
classes=classes, features=features,
color=["orangered","orange"],
size = (600,600)
)
visualizer.fit(X, y) # Fit the data to the visualizer
visualizer.transform(X) # Transform the data
visualizer.poof() # Draw/show/poof the data
In [4]:
from yellowbrick.datasets import load_credit
from yellowbrick.features import RadViz
# Load the classification dataset
X, y = load_credit()
features = X.columns
# Specify the target classes
classes = ['account in default', 'current with bills']
# Instantiate the visualizer
visualizer = RadViz(
classes=classes, features=features,
color=["orangered","orange"],
size = (600,600)
)
visualizer.fit(X, y) # Fit the data to the visualizer
visualizer.transform(X) # Transform the data
visualizer.poof() # Draw/show/poof the data
In [ ]: