I am trying to visualize data with t-SNE from the yellowbrick package. And I am getting an error.
import pandas as pd
from yellowbrick.text import TSNEVisualizer
from sklearn.datasets import make_classification
## produce random data
X, y = make_classification(n_samples=200, n_features=100,
n_informative=20, n_redundant=10,
n_classes=3, random_state=42)
## visualize data with t-SNE
tsne = TSNEVisualizer()
tsne.fit(X, y)
tsne.poof()
The error (raised by the fit method):
ValueError: The truth value of an array with more than one element
is ambiguous. Use a.any() or a.all()