LIBLINEAR-PREDICT(1)

πŸ’– LIBLINEAR-PREDICT πŸ’–

okay bestie, welcome to the LIBLINEAR-PREDICT(1) page, living in the General Commands Manual section, and it's literally the moment your trained model gets to ✨shine✨. It's called liblinear-predict, and the command you actually type in the synopsis is linear-predict (yes, two names, it's giving mysterious πŸ’…, just roll with it).


🌸 NAME 🌸

liblinear-predict β€” make predictions based on a trained linear classifier model 🧚


πŸŽ€ SYNOPSIS πŸŽ€

linear-predict [options] test_file model_file output_file

πŸ¦‹ DESCRIPTION πŸ¦‹

So here's the vibe: liblinear-predict takes your model-file (the linear classifier you already trained, no cap) and goes through every single sample in test_file, making a prediction for each one. Then it drops all those results into output_file. That's it. That's the whole job. And it ate. πŸ”₯


✨ OPTIONS ✨

A lil summary of the options is right here, bestie:

  • -b (0|1) β€” do you want probability estimates or not? <pink>0</pink> = nope, <pink>1</pink> = yes please. The default is <pink>0</pink>. πŸ’–
  • -q β€” quiet mode, aka no outputs, aka the "not me, I'm being mysterious" setting. 🀫

🌈 EXAMPLES 🌈

Wanna train a linear SVM using the L2-loss function? Use linear-train(1), like this:

liblinear-train data_file

And now for the main character moment β€” outputting probability estimates (for logistic regression only, iykyk):

liblinear-predict -b 1 test_file data_file.model output_file
bestie, note the <pink>1</pink> after -b β€” that's the "yes, probabilities please" signal. And <yellow>logistic regression only</yellow> is not a suggestion, it's the rules. πŸ™ˆ

πŸ‘‘ SEE ALSO πŸ‘‘


πŸ’œ AUTHORS πŸ’œ

liblinear-predict was written by the LIBLINEAR authors at National Taiwan university for the LIBLINEAR Project. Slay, honestly. 🫢

This manual page was written by Christian Kastner <ckk@debian.org>, for the Debian project (and may be used by others).


and that's the whole page, bestie! this version is from Ocotber 21, 2019 (yes, "Ocotber", we're keeping it, it's iconic πŸ’€) and it's the LIBLINEAR-PREDICT(1) page β€” go predict something gorgeous. bye bestie, mwah πŸ’‹πŸ’–