aksnzhy / xlearn

High performance, easy-to-use, and scalable machine learning (ML) package, including linear model (LR), factorization machines (FM), and field-aware factorization machines (FFM) for Python and CLI interface.
https://xlearn-doc.readthedocs.io/en/latest/index.html
Apache License 2.0
3.09k stars 519 forks source link

Support to take Python object directly for scoring #277

Open yueguoguo opened 5 years ago

yueguoguo commented 5 years ago

If I did not miss anything, currently, the scoring operation of a model takes a txt file. It would be great that the model can directly take a Python object like pandas dataframe, numpy array, or dict, which can make the model object more useful for scoring.

Imaging a scenario where a query is made to use the model to score a given input, one needs to convert it to an txt file before the scoring can happen. This will induce overhead.