-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ENH] Add polars version of dummy proba regressor #447
base: main
Are you sure you want to change the base?
Conversation
tests in |
They are not failing because there are no tests covering the new code, i.e., feeding |
This comment was marked as resolved.
This comment was marked as resolved.
that's strange. Could you kindly investigate? |
oh, I think I got it - the estimator is in a private module. The test framework skips estimators that are private and not publicly exported. |
@fkiraly How do we specify to ignore 'pandas dataframe' tests for estimators that do not have pandas specified x/y mtypes? |
we should not skip these - it should still work with back/from conversion. |
adds index support as part of #440 and is used to sync up polars conversion utilities between skpro and sktime. Correponding sktime pr for polars conversion utilities is sktime/sktime#6455. In this pr: If a pandas Dataframe is a `from_type` and polars frame is a `to_type` then during the conversion, we will save the index (assumed never to be in multi-index format) and insert it as an individual column with column name `__index__`. Then the resulting pandas dataframe will be converted to a polars dataframe. In the inverse function, if we are converting from polars dataframe to pandas dataframe, if the column `__index__` exists in the pandas dataframe post-conversion, then we will map that column to the index before returning the pandas Dataframe After this is merged, #447 will be implemented as a `polars` only estimator. tests will also be written to check polars input end to end and pandas input and output through the polars estimator (i.e pandas input into polars estimator -> polars predictions -> pandas output)
Completes #440 and is a polars extension of #437
Adds polars version of dummy proba regressor - also to help test e2e input flow of polars tables
In this pull request:
polars_eager_table
. However, sinceBaseDistribution
objects are currently is not supported forpolars
DataFrames, we leverage pandas DataFrames inside both_fit
and_predict_proba
. Otherwise the functionality should mirror [ENH]DummyProbaRegressor
- probabilistic dummy regressor #437.skpro.utils.polars
file which contains 2 functionspolars_split_index_values_frame
andpolars_combine_index_values_frame
. The goal of these two functions is to split and combine__index__
columns in and out of the main polars dataFrame (if they are created via the _convert utils from pandas to polars) in order to properly do predictions or fitting.test_polars.py
, as well as other polars tests that is related to the adapter enhancements as part of [ENH] Polars adapter enhancements #449