weka.classifiers.functions.LinearRegression 為標準線性迴歸學習器,
學習各數值屬性的權重,建立線性方程式模型,預測數值類別。
參數說明:
-S select_attribute_code 屬性挑選法代碼,0 表M5',1 表無,2 表Greedy。預設值 0。
> java weka.classifiers.functions.LinearRegression -t data\cpu.arff
Linear Regression Model
class =
0.0491 * MYCT +
0.0152 * MMIN +
0.0056 * MMAX +
0.6298 * CACH +
1.4599 * CHMAX +
-56.075
Time taken to build model: 0.02 seconds
Time taken to test model on training data: 0.02 seconds
=== Error on training data ===
Correlation coefficient 0.93
Mean absolute error 37.9748
Root mean squared error 58.9899
Relative absolute error 39.592 %
Root relative squared error 36.7663 %
Total Number of Instances 209
=== Cross-validation ===
Correlation coefficient 0.9012
Mean absolute error 41.0886
Root mean squared error 69.556
Relative absolute error 42.6943 %
Root relative squared error 43.2421 %
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.LinearRegression
code |
doc
沒有留言:
張貼留言