---
# System prepended metadata

title: 資料預測及分布

---

 # 資料預測

## USE_DAY（單位：度）
### regression![regression](https://hackmd.io/_uploads/HJhCJ1S_ye.png)

### lstm ![lstm2](https://hackmd.io/_uploads/ByV1ekS_Jx.png)

### arima![arima](https://hackmd.io/_uploads/HkGWlJSdJl.png)

### sarima![sarima](https://hackmd.io/_uploads/BkhZgJrOyg.png)




|Model            |MSE                   |R^2                 |MAPE              |
|-----------------|----------------------|--------------------|------------------|
|Decision Tree    |5.542048279676421e+16 |-0.07206503486027405|7.553979334936653 |
|Gradient Boosting|5.600341389612658e+16 |-0.08334137201617375|7.6048142181936536|
|Random Forest    |6.908583959551004e+16 |-0.3364104622819366 |8.628191805591257 |
|Polynomial4      |1.0153484222501845e+17|-0.9641105359668984 |9.374861308537826 |
|Elastic Net      |1.563847538135811e+17 |-2.0251383259072027 |12.802492521179648|
|Ridge            |1.5640725672396022e+17|-2.02557362675957   |12.80361701721216 |
|Lasso            |1.5641440160951187e+17|-2.025711838871617  |12.803974030828172|
|Linear           |1.5641440161551437e+17|-2.02571183898773   |12.803974031128096|
|lstm|3.493220695688893|2.97|0.8362520084559243|
|arima|40.92445183458492|-0.9106744405018519|10.796797508882182|
|sarima|48.930308435379146|-1.2844506279823533|11.749989154920724|





---
  # USE_M（單位：萬瓦）
### regression![model_predictions](https://hackmd.io/_uploads/HkETxyBOye.png)


### lstm ![LSTM Prediction](https://hackmd.io/_uploads/Sk80xkr_Jg.png)


### arima![arima](https://hackmd.io/_uploads/Hk3AxkH_kl.png)


### sarima![sarima](https://hackmd.io/_uploads/SJ1kW1Hdyg.png)


|Model            |MSE                   |R^2                 |MAPE              |
|-----------------|----------------------|--------------------|------------------|
|Decision Tree    |5.542048279676421e+16 |-0.07206503486027405|7.553979334936653 |
|Gradient Boosting|5.600341389612658e+16 |-0.08334137201617375|7.6048142181936536|
|Random Forest    |8.401015979697717e+16 |-0.6251095325467291 |9.475482843979261 |
|Polynomial       |1.0153484222501845e+17|-0.9641105359668984 |9.374861308537826 |
|Elastic Net      |1.563847538135811e+17 |-2.0251383259072027 |12.802492521179648|
|Ridge            |1.5640725672396022e+17|-2.02557362675957   |12.80361701721216 |
|Lasso            |1.5641440160951187e+17|-2.025711838871617  |12.803974030828172|
|Linear           |1.5641440161551437e+17|-2.02571183898773   |12.803974031128096|


---
# station_d 臺中港
### regression
![regression](https://hackmd.io/_uploads/HytYZ1rdkg.png)

### lstm 
![lstm](https://hackmd.io/_uploads/Hy_d-krdyl.png)

### arima
![arima](https://hackmd.io/_uploads/ryk_Z1SdJl.png)

### sarima
![sarima](https://hackmd.io/_uploads/B1BOW1HdJl.png)

|Model            |MSE                   |R^2                 |MAPE              |
|-----------------|----------------------|--------------------|------------------|
|Polynomial4      |1121104.169729199     |-0.008431459087214321|inf               |
|Elastic Net      |1658779.7095642688    |-0.4920697719144289 |inf               |
|Lasso            |1658781.002016436     |-0.49207093447314554|inf               |
|Ridge            |1658783.9982357258    |-0.49207362956774214|inf               |
|Linear           |1658784.1643422826    |-0.4920737789803318 |inf               |
|Random Forest    |1883868.3459553078    |-0.6945366506832367 |inf               |
|Gradient Boosting|2007791.499994983     |-0.8060053352329561 |inf               |
|Decision Tree    |2241252.509310345     |-1.0160031504410934 |inf               |


---
# station_d 彰工
### regression
![regression](https://hackmd.io/_uploads/rklgfJru1l.png)

### lstm 
![lstm](https://hackmd.io/_uploads/SJTkGyrd1e.png)

### arima
![arima](https://hackmd.io/_uploads/ryt1fyS_Je.png)

### sarima
![sarima](https://hackmd.io/_uploads/SyariJBdkl.png)

|Model            |MSE                   |R^2                 |MAPE              |
|-----------------|----------------------|--------------------|------------------|
|Random Forest    |8568681.622246092     |-0.28130115946817913|inf               |
|Polynomial4      |9087055.800634433     |-0.35881523515550096|inf               |
|Gradient Boosting|10315799.367729874    |-0.5425530173040412 |inf               |
|Elastic Net      |10702463.017058626    |-0.6003720149107303 |inf               |
|Lasso            |10702485.573565967    |-0.6003753878542337 |inf               |
|Ridge            |10702492.687473118    |-0.6003764516185188 |inf               |
|Linear           |10702494.241858026    |-0.6003766840504463 |inf               |
|Decision Tree    |11294068.437126435    |-0.6888365820516722 |inf               |


---
# station_d 王功
### regression
![regression](https://hackmd.io/_uploads/By1WMkrOyx.png)

### lstm 
![lstm](https://hackmd.io/_uploads/H1nlz1Huyl.png)

### arima
![arima](https://hackmd.io/_uploads/H1OgGJBdJl.png)

### sarima
![sarima](https://hackmd.io/_uploads/rkNIjJrd1x.png)

|Model            |MSE                   |R^2                 |MAPE              |
|-----------------|----------------------|--------------------|------------------|
|Polynomial4      |858361.8342751195     |0.08144895985771305 |inf               |
|Random Forest    |1493434.1454453238    |-0.5981552684495595 |inf               |
|Elastic Net      |1577583.7550650437    |-0.688205534383199  |inf               |
|Lasso            |1577587.5690889447    |-0.6882096158503397 |inf               |
|Ridge            |1577590.720530795     |-0.6882129882745014 |inf               |
|Linear           |1577591.0413520858    |-0.6882133315921077 |inf               |
|Gradient Boosting|1767109.4871841974    |-0.8910210038277298 |inf               |
|Decision Tree    |1970633.9395402297    |-1.1088167980266865 |inf               |


---
# station_d 鹿港彰濱
### regression
![regression](https://hackmd.io/_uploads/SyfMzyHdyl.png)
### lstm 
![lstm](https://hackmd.io/_uploads/B11MfyB_1g.png)
### arima
![arima](https://hackmd.io/_uploads/H1ibGkHOyl.png)
### sarima
![sarima](https://hackmd.io/_uploads/HyqLskHOke.png)
    
|Model            |MSE                   |R^2                 |MAPE              |
|-----------------|----------------------|--------------------|------------------|
|Gradient Boosting|3309838.621715163     |-0.09916435925144707|inf               |
|Random Forest    |3335601.5300609567    |-0.10771996388382155|inf               |
|Decision Tree    |3441564.7381609194    |-0.14290928730620278|inf               |
|Elastic Net      |5785719.250394208     |-0.9213795956531665 |inf               |
|Lasso            |5785740.081974038     |-0.9213865136128352 |inf               |
|Ridge            |5785745.908716672     |-0.9213884486158872 |inf               |
|Linear           |5785747.32211852      |-0.9213889179925285 |inf               |
|Polynomial4      |5921555.679903753     |-0.9664895176370645 |inf               |


---
# station_m 臺中港
### regression
![regression](https://hackmd.io/_uploads/H1F4fyBdyl.png)


### lstm 
![lstm](https://hackmd.io/_uploads/BJSNzySOkg.png)


### arima
![arima](https://hackmd.io/_uploads/rJMEzJHuJe.png)


### sarima
![sarima](https://hackmd.io/_uploads/HJTVzkBuye.png)

|Model            |MSE                   |R^2                 |MAPE              |
|-----------------|----------------------|--------------------|------------------|
|Linear           |370610560.17256176    |0.0012115626457530615|319.3712331948039 |
|Lasso            |370610579.35036945    |0.0012115109619247333|319.3713755588028 |
|Ridge            |370610662.0118186     |0.0012112881908856732|319.3719891585686 |
|Elastic Net      |370610875.2729639     |0.001210713456139878|319.3735720042169 |
|Random Forest    |767317252.9666951     |-1.0679054576553817 |555.8389300433148 |
|Gradient Boosting|1324237157.742523     |-2.5687940485350618 |703.3865285595257 |
|Decision Tree    |1409283466.5273333    |-2.7979922392568173 |721.9993683519194 |
|Polynomial4      |3771733858.0099883    |-9.16475128070785   |943.8274394081127 |


---
# station_m 彰工
### regression
![regression](https://hackmd.io/_uploads/HysBzkrOke.png)

### lstm 
![lstm](https://hackmd.io/_uploads/BkAHGkSd1e.png)

### arima
![arima](https://hackmd.io/_uploads/SkWIz1rOJe.png)

### sarima
![sarima](https://hackmd.io/_uploads/SyE8zyH_Jg.png)

|Model            |MSE                   |R^2                 |MAPE              |
|-----------------|----------------------|--------------------|------------------|
|Elastic Net      |3018371156.266925     |-0.42538228561948466|230.67102660800884|
|Ridge            |3018412250.826946     |-0.42540169193330635|230.67292038675987|
|Lasso            |3018431829.0121083    |-0.42541093744913927|230.67382260259328|
|Linear           |3018432607.2934093    |-0.4254113049812691 |230.67385846771398|
|Random Forest    |10923714448.73159     |-4.158566744205486  |417.57019340029575|
|Gradient Boosting|16127585427.526655    |-6.616019829265334  |493.9624197748349 |
|Decision Tree    |17049227945.736002    |-7.051252228170872  |505.8973223823184 |
|Polynomial4      |68757121066.7141      |-31.469559674662356 |979.8185243810277 |


---
# station_m 王功
### regression
![regression](https://hackmd.io/_uploads/BkxDzJSuyx.png)

### lstm 
![lstm](https://hackmd.io/_uploads/Bk6LGkH_1x.png)

### arima
![arima](https://hackmd.io/_uploads/ByjIzyHOJl.png)

### sarima
![sarima](https://hackmd.io/_uploads/S1QvfJBOJx.png)

|Model            |MSE                   |R^2                 |MAPE              |
|-----------------|----------------------|--------------------|------------------|
|Elastic Net      |388701143.7154249     |-0.03154829096328626|208.427775004599  |
|Ridge            |388702848.8176736     |-0.03155281602151927|208.42939895850333|
|Lasso            |388703583.4647616     |-0.031554765652901384|208.4300986123436 |
|Linear           |388703677.9326316     |-0.031555016354941845|208.43018857912674|
|Random Forest    |1243864676.1803586    |-2.301010304829038  |413.9201704519211 |
|Gradient Boosting|2562322123.73387      |-5.79997743863135   |563.4297581312449 |
|Decision Tree    |2695837420.25         |-6.154304865152902  |575.7189978253714 |
|Polynomial4      |5374724845.111221     |-13.263627257118303 |837.9658976232618 |


---
# station_m 鹿港彰濱
### regression
![regression](https://hackmd.io/_uploads/B1zuzkrOyl.png)

### lstm 
![lstm](https://hackmd.io/_uploads/SJyuGJr_Jx.png)

### arima
![arima](https://hackmd.io/_uploads/BJnwzJrOJl.png)

### sarima
![sarima](https://hackmd.io/_uploads/S1tdf1Hd1l.png)

|Model            |MSE                   |R^2                 |MAPE              |
|-----------------|----------------------|--------------------|------------------|
|Elastic Net      |1367770132.7385068    |-0.14123357949238757|254.91845534667448|
|Ridge            |1367783663.3395524    |-0.1412448690913446 |254.92087801790885|
|Lasso            |1367789987.9239414    |-0.1412501461681781 |254.92201041425915|
|Linear           |1367790341.5382996    |-0.1412504412152551 |254.922073727229  |
|Random Forest    |6669549532.204245     |-4.564907219460696  |573.0357767924767 |
|Gradient Boosting|11724234660.46349     |-8.782411509147568  |730.02114877608   |
|Decision Tree    |12266449022.791338    |-9.234821766368688  |744.3294501283883 |
|Polynomial4      |46007272159.739845    |-37.387330321664805 |1479.4138821295994|


---

lstm 可以一次預測多天只是說月的資料本來就只有104筆已經不多了




| 名稱      |  資料量   | 資料起始時間 |資料結束時間|單位     |
| -------- | -------- | --------   |--------  |--------|
|用電月     |104       |2016_01     |2024_08   |Wh     |
|用電日     |592       |20230102    |20240815  |MD     |
|風力發電日  |2232      |2018-01-01  |2024-03-27|MW      |
|風力發電日  |76        |2018-01     |2024-03   |MW      |




每月要往後預測12個月
每日往後預測1天


# 資料分布
中威![Plot of 中威大安(註10)](https://hackmd.io/_uploads/rJWr1CIhke.png)

王功![Plot of 王功](https://hackmd.io/_uploads/Hy9X108hyl.png)
台中![Plot of 台中](https://hackmd.io/_uploads/rJQVJRLnkx.png)
台中港![Plot of 台中港](https://hackmd.io/_uploads/By8VyC8h1x.png)
安威![Plot of 安威](https://hackmd.io/_uploads/HyYNyR8hkg.png)
鹿威彰濱![Plot of 鹿威彰濱](https://hackmd.io/_uploads/B10VJRIhyl.png)
彰工![Plot of 彰工](https://hackmd.io/_uploads/HyGS1AU3Jx.png)



維修前資料![截圖 2025-07-16 晚上8.37.59](https://hackmd.io/_uploads/Syc3TpB8gl.png)
維修後資料![截圖 2025-07-16 晚上8.44.33](https://hackmd.io/_uploads/rkg106SIgx.png)
