tsne = TSNE(n_components=tsne_dimensions, learning_rate=200, perplexity=tsne_perplexity, verbose=2, angle=0.1).fit_transform(np.array([f["features"] for f in feature_vectors]))
Before I was getting an Error hinting at the fact that fit_transform isn't given the numpy-array that it expects:
File ~/.local/lib/python3.10/site-packages/sklearn/manifold/_t_sne.py:821
if self.perplexity >= X.shape[0]:
^
AttributeError: 'list' object has no attribute 'shape'
I'm on Python 3.10.12, with
librosa==0.10.1
scikit-learn==1.3.2
I was trying to recreate the projects that I realized last year with the help of this script, found several issues and managed to solve them:
In line 42 and line 63 I added the sample rate argument, otherwise
librosa.load()
defaults to 22050Hz.:I also had to change line 69 to:
Before I was getting an Error hinting at the fact that
fit_transform
isn't given the numpy-array that it expects:I'm on Python 3.10.12, with librosa==0.10.1 scikit-learn==1.3.2