skpro icon indicating copy to clipboard operation
skpro copied to clipboard

[ENH] Add polars version of dummy proba regressor

Open julian-fong opened this issue 7 months ago • 7 comments

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:

  • Introduces a Dummy probabilistic regressor that supports the x and y inner mtype polars_eager_table. However, since BaseDistribution objects are currently is not supported for polars DataFrames, we leverage pandas DataFrames inside both _fit and _predict_proba. Otherwise the functionality should mirror #437.
  • Introduces a skpro.utils.polars file which contains 2 functions polars_split_index_values_frame and polars_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.
  • Adds a simple polars e2e test inside test_polars.py, as well as other polars tests that is related to the adapter enhancements as part of #449

julian-fong avatar Aug 03 '24 19:08 julian-fong