試圖實現XGBoost來確定最重要的變量,我有一些數組的錯誤。 我的完整代碼如下 from numpy import loadtxt
from numpy import sort
import pandas as pd
from xgboost import XGBClassifier
from sklearn.model_selection import train_test_split
for x in values:
x = header.index["NoExamples*NoFeatures"]
print (x)
當我寫這段代碼時,第二行有錯誤。 "TypeError: 'builtin_function_or_method' object is not subscriptable"。 你能幫我解答嗎?
我有幾個HTML頁面都鏈接到相同的JavaScript文件(其中包含一些IIFE函數)。 其中一個功能控制只在一個頁面上的某個按鈕。但由於其他HTML文件連接到同一個JS文件,在他們的網頁,我得到的控制檯錯誤: Uncaught TypeError: Cannot read property 'style' of undefined
at showDivs (scripts.js:99)
at