alibaba / EasyRec

A framework for large scale recommendation algorithms.
Apache License 2.0
1.71k stars 311 forks source link

Outputting Class Probabilities for Multiclass Models During Prediction in EasyRec #436

Open KKKatherineeee opened 9 months ago

KKKatherineeee commented 9 months ago

Hello EasyRec Team,

I am using EasyRec for a multiclass prediction task and I have encountered an issue with the data type of the 'probs' output when running the prediction command. The error message indicates that 'probs' is not of type string. Here is the command I am using:

-Doutput_cols='probs string,probs_y double,y bigint'

I would greatly appreciate it if you could provide guidance on the correct way to specify the data type for 'probs' in the context of the prediction command. Is there a specific format or type that EasyRec expects for probability outputs?

Thank you for your assistance.

chengmengli06 commented 7 months ago

probs is actually a vector of floats, on ODPS, currently only probs_y(the probs corresponding to y) could be saved, to save probs, a slight modification of the source code is required to convert probs into a comma separated string, such as: '0.1,0.2,0.6,0.1'.