georgeslabreche / opssat-orbitai

The OrbitAI app for the OPS-SAT spacecraft.
MIT License
4 stars 4 forks source link

Implement on the fly prediction with ranger given a single data sample #52

Closed georgeslabreche closed 3 years ago

georgeslabreche commented 3 years ago

Need to implement prediction for a given data sample rather than just batch predictions from reading a CSV file. Suggested command parameters:

./OrbitAI_ranger --includevars PD1,PD2,PD3,PD4,PD5,PD6,LABEL --input 0.01,0,1.12,0.29,0,0.02,1 --predict ranger_out.forest
./OrbitAI_ranger --includevars PD1,PD2,PD3,PD4,PD5,PD6,LABEL --input 0.01,0,0.28,0.2,0.01,1.16,0 --predict ranger_out.forest
TanguySoto commented 3 years ago

Maybe we just re-use the capability of ranger to predict on a given --file that will contain just one sample? This would save time since we avoid having to implement a parser of N-dimension data for the --input argument.

Unless you think you can easily re-use what exists to parse one line of the --file, then I'm ok with this.

georgeslabreche commented 3 years ago

@TanguySoto I'll give myself a few hours to see if I can adapt ranger to take in a string of values via command argument but if it requires too many disruptive untested changes then I will do as you suggest.

georgeslabreche commented 3 years ago

I ended up implementing the solution proposed by @TanguySoto.