我已将excel文件转换为csv并在WEKA上打开csv文件以使用线性回归对数据进行分类,但它不允许我选择线性回归' '功能下的选项'科。这是我的格式
@RELATION book
@ATTRIBUTE bookID STRING
@ATTRIBUTE author STRING
@ATTRIBUTE genre STRING
@ATTRIBUTE publisher STRING
@ATTRIBUTE yearPublished NUMERIC
@ATTRIBUTE rating NUMERIC
@DATA
book1, suzzane-collins, horror, scholastic, 2008, 4011425
book2, jay-rowling, fantasy, scholastic, 2004, 1560433
book3, harper-lee, comedy, harper-classics, 2006, 2708232
book4, jane-austen, romance, modern-library, 2008, 1560433
book5, stephenie-meyer, romance, little-brown, 2006, 40114255
book6, john-lewis, thriller, harper-collins, 2002, 352728
book7, margarte, mystery, grand-central, 1964, 780522
book8, George-orwell, humour, nal, 2003, 1679178
book9, markus-zusak, legend, grand-central, 2006, 780522
book10, shel-silverstein, folklore, harper-collins, 1964, 592994
答案 0 :(得分:1)
对于线性回归,您的属性必须是@NUMERIC。如果您只想根据最后两个属性进行回归,那么您必须在Weka的“预处理”选项卡中指定(通过检查这些属性),以便它只使用正确的属性。您可以查看this example以查看您的错误。他们解释了如何从头开始在WEKA中运行基本线性回归。