我有繪製的散點圖多維的EPlotting散點圖特點
我想繪製音頻的值在散點圖上清晰的視覺效果功能(不是我有我的訓練5個的音頻文件設置的問題 - 我將用它來訓練KNN/SVM等增加我的數據集之後)
標記的training_labels是 [0, 0, 1, 2, 1]
雖然training_feature值
[
[103.359375, [11, 36, 60, 85, 110, 134, 159, 183, 208, 232, 257, 286, 310, 335]],
[89.10290948275862, [11, 41, 69, 98, 127, 155, 184, 213, 241, 270, 299, 327, 356]],
[151.99908088235293, [7, 24, 41, 57, 73, 90, 107, 123, 140, 157, 173, 189, 206, 223, 239, 256, 272, 290, 307, 325, 343, 360, 377]],
[143.5546875, [39, 57, 77, 95, 114, 132, 150, 168, 186, 204, 222, 239, 256, 272, 288, 305, 322, 340]],
[83.35433467741936, [8, 38, 70, 101, 137, 168, 199, 230, 266, 298, 334, 365]]
]
進行分類的每個對象有2個特點叫tempo
和beat per minute
我怎麼能在散點圖中繪製的?
我嘗試以下,但它失敗,因爲x和y
featureA = [x[0] for x in training_features]
featureB = [x[1] for x in training_features]
plt.scatter(featureA[:2], featureB[:2])
plt.scatter(featureA[2:], featureB[2:], color='r')
plt.xlabel('Beat Frame')
plt.ylabel('Tempo')
的大小之間的差異這給我一個錯誤ValueError: setting an array element with a sequence.
。請幫助:)
編輯:還有一兩件事,我怎麼能繪製多個功能即(> 2),我想使用頻譜質心,過零率,MFCC等,然後畫出結果
你必須每x值超過10的y值。你需要告訴我們你想對什麼進行陰謀。 – ImportanceOfBeingErnest
我不知道tbh,我只是爲了檢查它們如何在scatterplot中可視化@ImportanceOfBeingErnest –