weka.classifiers.functions.SimpleLinearRegression 為簡單線性迴歸學習器,
簡單指的是只挑一個平方誤差最小的屬性作線性預測。
只適用數值對數值的預測,不接受缺值案例。
> java weka.classifiers.functions.SimpleLinearRegression -t data\cpu.arff
Linear regression on MMAX
0.01 * MMAX - 34
Time taken to build model: 0 seconds
Time taken to test model on training data: 0.02 seconds
=== Error on training data ===
Correlation coefficient 0.863
Mean absolute error 50.8658
Root mean squared error 81.0566
Relative absolute error 53.0319 %
Root relative squared error 50.5197 %
Total Number of Instances 209
=== Cross-validation ===
Correlation coefficient 0.7844
Mean absolute error 53.8054
Root mean squared error 99.5674
Relative absolute error 55.908 %
Root relative squared error 61.8997 %
Total Number of Instances 209
cpu.arff 資料集有209案例,每個案例由6個數值屬性預測1個數值屬性。
MYCT |
MMIN |
MMAX |
CACH |
CHMIN |
CHMAX |
class |
125 |
256 |
6000 |
256 |
16 |
128 |
198 |
29 |
8000 |
32000 |
32 |
8 |
32 |
269 |
29 |
8000 |
32000 |
32 |
8 |
32 |
220 |
29 |
8000 |
32000 |
32 |
8 |
32 |
172 |
29 |
8000 |
16000 |
32 |
8 |
16 |
132 |
26 |
8000 |
32000 |
64 |
8 |
32 |
318 |
23 |
16000 |
32000 |
64 |
16 |
32 |
367 |
23 |
16000 |
32000 |
64 |
16 |
32 |
489 |
23 |
16000 |
64000 |
64 |
16 |
32 |
636 |
..... |
|
|
|
|
|
|
參考:
1.weka.classifiers.functions.SimpleLinearRegression
code |
doc
沒有留言:
張貼留言