Coder Social home page Coder Social logo

tsgrf's Introduction

tsgrf

This is a machine learning R package for time series based on grf.

Our experiment has proved that tsgrf performed better than grf on long time series with high volatility。

The current development version can be installed from source using devtools. If you don't install devtools, you can follow this:

install.packages("devtools")
devtools::install_github("soso010816/tsgrf", subdir = "tsgrf0.6.1")

There is a example for using it.

library(tsgrf)
n <- 500
p <- 10
X <- matrix(rnorm(n * p), n, p)
Y <- X[, 1] * rnorm(n)

# honesty.method : Specifies the method of honesty tree splitting, default is 4.
# nonlapping.block.size: Number of Blocks, The total number of blocks is calculated as n^{1/nonlapping_block_size}. 
r.forest <- regression_forest(X, Y, nonlapping.block.size=2, honesty.method=4)

# Predict using the forest.
X.test <- matrix(0, 101, p)
X.test[, 1] <- seq(-2, 2, length.out = 101)
r.pred <- predict(r.forest, X.test)

# Predict on out-of-bag training samples.
r.pred <- predict(r.forest)

# Predict with confidence intervals; growing more trees is now recommended.
r.forest <- regression_forest(X, Y, num.trees = 100)
r.pred <- predict(r.forest, X.test)

tsgrf's People

Contributors

chengleom avatar soso010816 avatar chenhongqi0716 avatar

Stargazers

 avatar  avatar rikkaka avatar

Watchers

 avatar  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.