Giter Club home page Giter Club logo

Comments (3)

JavierEscobarOrtiz avatar JavierEscobarOrtiz commented on May 24, 2024

Hello @yarnabrina

Thank you for opening the issue!

We have identified the root of the problem. What I can recommend you to avoid this error is to use a pd.RangeIndex object instead of a np.arange(). This will allow you to use an index that doesn't start at 0.

import numpy as np
import pandas as pd

np.random.seed(seed=0)

data = pd.DataFrame(
    np.random.random(size=3 * 20).reshape((20, 3)),
    index=pd.RangeIndex(3, 3 + 20), # Changed to pd.RangeIndex()
    columns=["y", "x1", "x2"],
)

from sklearn.linear_model import LinearRegression
regressor = LinearRegression()

from skforecast.ForecasterAutoreg import ForecasterAutoreg
forecaster = ForecasterAutoreg(regressor, 1)

forecaster.fit(data.iloc[:, 0], exog=data.iloc[:, 1:])

We will have a look 😄

Thank you!

from skforecast.

JavierEscobarOrtiz avatar JavierEscobarOrtiz commented on May 24, 2024

Hi @yarnabrina

This bug is fixed in version 0.11.0. Although this version is not yet released in PyPI, you can test it by installing skforecast from GitHub.

pip install git+https://github.com/JoaquinAmatRodrigo/[email protected]

Hope it helps!

from skforecast.

JavierEscobarOrtiz avatar JavierEscobarOrtiz commented on May 24, 2024

Skforecast 0.11.0 has been released in PyPI.

from skforecast.

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.