Migration Guide

Version 1.2 of lightonopu and lightonml introduce API changes, requiring action on your code:


We noticed that in some situations, two successive transforms on related data can have inconsistent result, fitting the OPU on input data fixes this. The previous methods transform1d and transform2d are still provided for compatibility, but you will get a deprecation warning on calling them. To migrate your code, do the following:


Similarly to lightonopu, the OPUMap objects in lightonml.projections.sklearn and lightonml.projections.torch now also have a fit method. It can be called explicitly, or it will be called automatically when the first transform is performed. The migration procedure is similar: - If you do several transform operations on related data (like train and test), first call fit on one of the data, and then transform, or forward in the case of the Pytorch wrapper - Alternatively, replace transform calls by fit_transform for the Scikit-learn wrapper.