房子的价格可能由【面积】【卧室数量】【是否装修】【朝向】等因素决定。
假设有这样的一些arff数据
@relation house
@attribute houseSize numeric
@attribute houseNumber numeric
@attribute houseDirection numeric
@attribute decoration numeric
@attribute sellingPrice numeric
@data
145,3,1,1,260
132,3,1,0,236
130,3,0,0,225
135,2,1,1,210
120,3,1,1,240
120,2,1,1,220
118,3,1,1,225
118,2,1,0,208
98,2,0,1,199
63,2,1,1,129
60,2,1,0,115
54,2,0,1,110
50,1,1,1,111
56,1,0,1,108
48,1,0,0,80
第一个房子的解释是145方,3个房间,南北向已装修,价格260万。
在weka中读入数据,可以看一看数据集的统计信息:
如卧室间数的最小值为1,最大值为3,平均值为2.133,标准差为0.743
模型选择:Classify→functions→LinearRegression(线性回归)
将之作为训练集:Test options→Usin