Giter Club home page Giter Club logo

Comments (3)

WenjieZ avatar WenjieZ commented on July 23, 2024

The data set is assumed to be in time order, though an explicit datatime column is not required. It should work on lists, arrays, dataframes. If not, please report a bug.

The following example comes from my blog post:

import numpy as np
from tscv import gap_train_test_split
X, y = np.arange(20).reshape((10, 2)), np.arange(10)
X_train, X_test, y_train, y_test = gap_train_test_split(X, y, test_size=2, gap_size=2)

In the example, X and y are numpy arrays. They don't have data time information, but they represent time-ordered data.

from tscv.

mksamelson avatar mksamelson commented on July 23, 2024

Thank you for clarifying. I eventually figured it out when I saw a reference in the code comments.

I recommend you make it clear in your documentation.

Also, do you have a layout recommendations/guidance on how to set combination layouts of split/test size/gap size?

I made some guesses when using and in some cases got errors. I'm using GapWalkForward and given that it ignores data after the test set I'm trying to easy figure exactly what I'm using in the folds so I'm making best use of data.

Thank you so much for creating and publishing this package

from tscv.

WenjieZ avatar WenjieZ commented on July 23, 2024

The documentation part is on the roadmap (see the v0.1.0 milestone).

do you have a layout recommendations/guidance on how to set combination layouts of split/test size/gap size?

This topic is publication worthy. There is no single fixed rule that can handle all cases, and many heuristics are available for choice. I do have some professional insight on this issue, but they cannot be made clear within a couple of sentences. I can give you some quick and dirty advice though: try some small gap sizes and check whether your conclusion stays the same with and without the gaps (cf. stress test and scenario analysis).

from tscv.

Related Issues (20)

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.