Comments (4)
I suppose it fails, since pd.date_range(start="2001-01-01", periods=30, freq="M")
is resulting in a date time index with ME
periodicities. And ME
is no supported Period Alias
pd.date_range(start="2001-01-01", periods=30, freq="M")
DatetimeIndex(['2001-01-31', '2001-02-28', '2001-03-31', '2001-04-30',
'2001-05-31', '2001-06-30', '2001-07-31', '2001-08-31',
'2001-09-30', '2001-10-31', '2001-11-30', '2001-12-31',
'2002-01-31', '2002-02-28', '2002-03-31', '2002-04-30',
'2002-05-31', '2002-06-30', '2002-07-31', '2002-08-31',
'2002-09-30', '2002-10-31', '2002-11-30', '2002-12-31',
'2003-01-31', '2003-02-28', '2003-03-31', '2003-04-30',
'2003-05-31', '2003-06-30'],
dtype='datetime64[ns]', freq='ME')
(BTW: Using "M" here is also deprecated)
from sktime.
Additional question in coerce_to_period
, we are using the frequency information provided, if one is provided. However, would it be possible to let the frequency just be inferred by pandas?
In that case the error from above would not be raised.
from sktime.
message hidden, likely AI generated content
The issue you are encountering is related to the limitations of the frequencies supported by pandas PeriodIndex for Periods. Specifically, you mentioned that in pandas 2.2.X, there is a bug where the frequency "2M" is failing to work as expected. It seems that you have observed this issue in pandas 2.2.X, while lower versions are functioning correctly. This issue is relevant to the limitations of period frequencies described in the pandas documentation, specifically the Period Aliases section found at the provided URL.
You mentioned an example code snippet:
ForecastingHorizon([1,2]).to_absolute(pd.date_range("2020", periods=1, freq="2M"))
This code snippet is being impacted by the issue of frequency "2M" not being supported as expected in pandas 2.2.X.
This issue can impact forecasting and time series analysis where the accurate handling of periods and frequencies is crucial.
It's important to note that this issue is related to the specific version of pandas (2.2.X) and the limitations of supported frequencies for Periods.
from sktime.
Probably duplication of #5131
from sktime.
Related Issues (20)
- [BUG] fix classifiers erroneously failing on non-int typed `y`
- [ENH] Add fine tuning methods using PEFT for `HFTransformersForecaster` HOT 3
- [BUG] `CNNClassifier` and `CNNRegressor` do not accept `filter_sizes` argument listed in docstring HOT 2
- [DOC] Misleading docstring parameters for convert utility function of dask_to_pd and vice versa
- [ENH] Logging intermediate results in forecasting benchmarking HOT 1
- [MNT] keras/transformers installation error on python 3.8-3.11 in CI HOT 2
- [ENH] EnbPI and SPCI algorithms
- [ENH][MNT] interface estimators from `neuralforecast` into `sktime`
- [BUG] `LabelEncoder` does not fit in a nested pipeline HOT 24
- [BUG] broken MACNNClassifier and MACNNRegressor
- [BUG] MCDCNNRegressor does not perform fitting/training?
- [BUG] CNTCRegressor raises an error on calling .fit()
- [BUG] In clustering averaging_method = 'dba' crashed HOT 3
- [ENH] categorical feature support: input checking - column type encoding by the `__dataframe__` protocol HOT 3
- [BUG] `TimeSeriesForestRegressor` failure - Parameter `self.criterion` does not exist in `TimeSeriesForestRegressor` HOT 1
- [BUG] pepy.tech downloads tracker on readme landing page is broken
- [BUG] Differencer is producing `SettingWithCopyWarning` HOT 3
- [ENH] wishlist: outlier detection, segmentation, change point detection (annotation module) HOT 3
- [MNT] Bump scikit-base to 0.8.0 HOT 1
- [BUG] failure of `test_differencer_cutoff` HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sktime.