list indices must be integers or slices, not tuple


 File "E:\Python36\regtree.py", line 45, in chooseBestSplit
    if len(set(dataSet[:,-1].T.tolist()[0])) == 1: #exit cond 1

TypeError: list indices must be integers or slices, not tuple

在測試樹回歸的時候,一直報這個錯,找了很久的原因,后來發現是因為輸入的數據集沒有轉為矩陣


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM