rust-ml / linfa

A Rust machine learning framework.
Apache License 2.0
3.68k stars 240 forks source link

Is it possible to use Polars instead of ndarray? #286

Closed ritvikos closed 1 year ago

ritvikos commented 1 year ago

Hello! I'm new to Linfa and ML in Rust. Is it possible to use Polars DataFrames instead of ndarray with Linfa ?

quietlychris commented 1 year ago

At the moment, linfa doesn't support the direct use of Polars dataframes as an input; it's likely you'll need to roll your own conversion between the data represented by those data types and ndarray's. There's been related discussion of this in #285; I'm closing this issue in favor of that one, which also links to ndarray-related discussion around Apache Arrow compatibility, since that's what Polars uses under the hood.