我正在尝试使用weka Package 器对python中的Dataframe进行功能选择:
def featureSelection(self):
search = ASSearch(classname="weka.attributeSelection.BestFirst", options=["-D", "1", "-N", "5"])
evaluator = ASEvaluation(classname="weka.attributeSelection.CfsSubsetEval", options=["-P", "1", "-E", "1"])
attsel = AttributeSelection()
attsel.search(search)
attsel.evaluator(evaluator)
attsel.select_attributes(self.dataset) # This is where the error happens
print("# attributes: " + str(attsel.number_attributes_selected))
print("attributes: " + str(attsel.selected_attributes))
print("result string:\n" + attsel.results_string)
我得到这个错误:
attributeerror:“dataframe”对象没有属性“jobject”
我只得到 object
, int64
,和 float64
当我检查Dataframe时。
我该怎么办?提前谢谢!
暂无答案!
目前还没有任何答案,快来回答吧!