Comments (4)
was starting a new job so busy with admin, moving, etc.
Good luck with your new job!
Would you like to fix this, or should I?
Yes I am happy to fix this.
from skpro.
@fkiraly, tagging you incase you have not seen this.
It looks like the pandas' convert_dtypes
function might be the problem.
https://github.com/sktime/skpro/blob/main/skpro/distributions/empirical.py#L129
Here is an example that is similar to the for loop here https://github.com/sktime/skpro/blob/main/skpro/distributions/empirical.py#L118.
>>> import pandas as pd
>>> df = pd.DataFrame(index=[1, 2, 3], columns=['a', 'b'])
>>> df.dtypes
a object
b object
dtype: object
>>> df.loc[1, 'a'] = 1.5
>>> df.loc[2, 'b'] = 1.6
>>> df
a b
1 1.5 NaN
2 NaN 1.6
3 NaN NaN
>>> df.dtypes
a object
b object
dtype: object
>>> df_conv = df.convert_dtypes()
>>> df_conv.dtypes
a Float64
b Float64
dtype: object
>>> df_conv.values
array([[1.5, <NA>],
[<NA>, 1.6],
[<NA>, <NA>]], dtype=object)
So using convert_dtypes
on a dataframe containing objects
seems to give some unexpected datatypes. The resulting numpy array df_conv.values
also has type object
here which makes it difficult to work with.
Avoiding convert_dtypes
might solve the issue.
from skpro.
Yes, I did not see this - was starting a new job so busy with admin, moving, etc. Also you opened this first in skbase, by accident (all fixed).
Would you like to fix this, or should I? If you are already working on tests, might be more synergistic if you do.
I'm busy with making the refactored version of the package "feature complete" for the presentation in mid-Sep and interoperable with sktime.
from skpro.
Yes I am happy to fix this.
thx!
from skpro.
Related Issues (20)
- [ENH] sync `skpro` and `sktime` probabilistic metrics modules
- [ENH] `sample_weight` for metrics
- [ENH] feature importance interface and tag for regression models
- [ENH] general Johnson QPD regression wrapper to reduce proba to quantile predictions
- [ENH] proba regression: reduction to multiclass classification HOT 7
- [BUG] test_methods_p not handling getattr after shifting
- [ENH] Multiple link function support for GLMs HOT 3
- [BUG] `sklearn.utils._param_validation.InvalidParameterError` thrown when using max_iter parameter in various sklearn regressors HOT 1
- [BUG] `Singular Matrix` error when testing param set with Cross Validation estimators
- [ENH] Design of a Bayesian model interface for sktime and skpro
- [ENH] outlier detection based on probabilitsic regressors
- [MNT] `numpy 2` compatibility HOT 3
- [ENH] merge `test_probabilistic_metrics` into `TestAllDistrMetrics` HOT 1
- [ENH] Improve efficiency of `Histogram Distribution` HOT 1
- [MNT] addres incompatibility of `lifelines` with `scipy 1.14`
- [BUG] `Histogram` distribution fails to construct on `numpy 2` HOT 2
- [BUG] `plot` method of the `Binomial` distribution shows incorrect pmf.
- Intervals/quantiles can be negative for models that can only make non-negative predictions HOT 3
- [ENH] interface `TweedieRegressor` from `sklearn` as `skpro` regressor HOT 6
- [ENH] interface GLM models from `glum`
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 skpro.