Git Product home page Git Product logo

dsai_hw3's Introduction

DSAI_HW3

從training_data中讀取40戶產電資料,將其全部串接在一起,再將串接好的資料拆分成trainX與trainY。 trainX存放7天的產電資料,也就是168小時的產電資料當作模型的 input, trainY則存放那7天的下一天的產電資料當作訓練的預測答案以此來丟入模型訓練出預測產電的模型 同理,預測耗電的模型也是使用了同樣的方法。 接著我們使用LSTM模型用來預測我們得到的用戶當日的電力generation以及consumption值。

至於我們的Trading stategy,我們觀察了前幾名是如何進行交易的,我們希望我們如果用戶的產電比耗電還少時,剩餘的電不要與台電購買而要從平台中交易而來。 因此此時的交易策略就是會購買(買電量 - 賣電量 + 產電量 - 用電量)*1.2單位的總電量,並分散於24小時中分批購買盡可能讓買的能剛好cover掉用電量, 購買價格則設在2.51,設此數字的原因是我們觀察到因在此平台購買的電會比與台電購買的電還便宜,所以當買家時一定要盡量出在高價讓我們在交易配對系統的順位在比較前面。

同理如今天產電比耗電還多,表示我們有多餘的電可以拿去賣,所以只要把多的電拿去賣,就能達到既不用付電費又能把賣電的錢用來cover現有的電費。 因此交易策略也相同會試著賣出(買電量 - 賣電量 + 產電量 - 用電量)*1.2單位的總電量,同樣分散於24小時,希望能賣出接近我們多產出的電以希望盡可能降低我們的電費。

執行:

  1. Set pipenv environment and download package
  2. Run pipenv run python main.py
  3. Get the result in output.csv

dsai_hw3's People

Contributors

welly0902 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.