Giter Club home page Giter Club logo

classifiers's Introduction

Classifiers

Outline of My README

  • 資料前處理
  • 使用的 Classifiers 模型
  • 討論

資料前處理

x 項目整理

  • 將母 data 的 closeprice 以 list 型態取出,並刪除不必要的欄位,如: 'Close Price', 'Date'。
  • 將最後一天的資料刪除,因為若有 n 天,則漲跌數目必只有 n-1 天

y 項目處理

  • 宣告一個 boolean type 的 List,紀錄漲跌
  • 將母 data 取出的 closeprice List 逐一 run 過一遍,若後一天大於當天,則 boolean = 1,反之則,boolean = 0

使用的 Classifiers 模型

Logistic Regression

from sklearn import preprocessing, linear_model

SVM

from sklearn import svm

NN

from keras.models import Sequential
from keras.layers import Dense

討論

How did you preprocess this dataset ?

如上述

Which classifier reaches the highest classification accuracy in this dataset ? Why ?

三個模型的套入結果,幾乎是一樣的準確率(50多%),印出預測結果發現也都是一樣的預測。我想可能會是跟資料量的大小不夠多,或是 feature 不夠多有關。

Can this result remain if the dataset is different ?

不一定,不同的 dataset 必定會有不一樣適用的模型,自己初次練習時使用過的 iris data 或是網路上常見的鐵答尼號 data,就會有較佳的準確率,推測應該跟資料較完美有關。

How did you improve your classifiers ?

  • 資料前處理方式改進
    • 因為漲跌是跟時間有關的現象,所以如果要進行資料前處理的優化,我會優化 x 項目的部份。
    • 某一天的漲跌,我認為一定不會只跟前一天的狀態有關,而是會是一段連續的關係,所以我會使用前10,20天或5天(恰好是一週的股市開盤時間(上班日))的 data 為x,去預測下一次的漲跌(y),並分析哪樣的 x 可以得到最佳的準確度。如此一來 x 的 feature 必定也會有較多項目可以去建立模型,也能實現隨著時間變化的股市問題。畢竟我認為股市不會是一個點的問題,而會是一段趨勢的問題,所以加入"時間"的性質會是我的資料前處理改進。

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.