scikit-learn
FloDR is a scikit-learn transformer: it clones, sits in a Pipeline and returns DataFrames on request.
from sklearn.pipeline import make_pipelinefrom sklearn.preprocessing import StandardScaler
pipe = make_pipeline(StandardScaler(), FloDR(random_state=0))Y = pipe.fit_transform(X)set_output(transform="pandas")returns DataFrames with columnsflodr0,flodr1, …scoreis the mean log density, soGridSearchCVselects on held-out likelihood when no scorer is given.- A fitted model pickles (
pickle,joblib) with its tensors on the CPU; a model fitted on a GPU moves back to it when loaded on a machine with one.