nemos icon indicating copy to clipboard operation
nemos copied to clipboard

Fix transformer

Open gviejo opened this issue 1 year ago • 1 comments

This PR adress issues with Transformers. When creating a pipeline, the number of basis should be equal to the number of dimensions for the feature. If the number of columns for the feature is very high, it become tedious to add basis by hand. I added multiplication by integers for the class Basis.

There was also an issue where the class AdditiveBasis was trying to get the attributes basis1 and basis2 but they were only available as _basis1 and _basis2. As a quick hack, i added two properties for AdditiveBasis that return basis 1 and basis 2.

Extra: I also added the method __len__ for Basis where it returns basis.n_basis_funcs. It's more convenient.

gviejo avatar Oct 02 '24 21:10 gviejo

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 97.01%. Comparing base (6dcd891) to head (a8c8e36). Report is 147 commits behind head on development.

Additional details and impacted files
@@               Coverage Diff               @@
##           development     #235      +/-   ##
===============================================
- Coverage        97.24%   97.01%   -0.24%     
===============================================
  Files               20       20              
  Lines             1815     1874      +59     
===============================================
+ Hits              1765     1818      +53     
- Misses              50       56       +6     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Oct 11 '24 15:10 codecov-commenter

Thanks @gviejo, I incorporated the change on the basis attribute in the #276 PR. I will add the __len__ method too but I am closing this since I made a lot of changes in the Basis api and included the fixes for the TransformerBasis.

Thanks starting off this process.

BalzaniEdoardo avatar Dec 15 '24 17:12 BalzaniEdoardo