Giter Club home page Giter Club logo

maltese's Introduction

maltese: machine learning for time series

Installing

# install.packages("devtools")
devtools::install_github("bearloga/maltese")

Example

Data

The included dataset is a tidy time series of pageviews for R's article on English Wikipedia from 2015-10-01 to 2017-01-30.

library(maltese)
head(r_enwiki)
date pageviews
2015-10-01 3072
2015-10-02 2575
2015-10-03 1431
2015-10-04 1540
2015-10-05 3041
2015-10-06 3695

We can use mlts_transform to convert the data into a machine learning-friendly format with a 7-day lag:

mlts <- mlts_transform(
  r_enwiki, date, pageviews,
  p = 7, # how many previous points of data to use as features
  granularity = "day", # optional, can be automatically detected,
  extras = TRUE, extrasAsFactors = TRUE # FALSE by default :D
)
head(mlts)
dt y mlts_extras_monthday mlts_extras_weekday mlts_extras_week mlts_extras_month mlts_extras_year mlts_lag_1 mlts_lag_2 mlts_lag_3 mlts_lag_4 mlts_lag_5 mlts_lag_6 mlts_lag_7
2015-10-08 3278 8 Thursday 41 October 2015 3385 3695 3041 1540 1431 2575 3072
2015-10-09 2886 9 Friday 41 October 2015 3278 3385 3695 3041 1540 1431 2575
2015-10-10 1692 10 Saturday 41 October 2015 2886 3278 3385 3695 3041 1540 1431
2015-10-11 1902 11 Sunday 41 October 2015 1692 2886 3278 3385 3695 3041 1540
2015-10-12 3030 12 Monday 41 October 2015 1902 1692 2886 3278 3385 3695 3041
2015-10-13 3245 13 Tuesday 41 October 2015 3030 1902 1692 2886 3278 3385 3695

Results

Example forecast using a neural network

See the vignette for a detailed walkthrough.

Additional Information

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

maltese's People

Contributors

bearloga avatar

Watchers

James Cloos avatar Arditto Trianggada 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.