Closed simonw closed 2 years ago
This worked for me:
echo 'age,gender,chest_pain,resting_blood_pressure,cholesterol,fasting_blood_sugar_greater_than_120,resting_ecg_result,exercise_max_heart_rate,exercise_induced_angina,exercise_st_depression,exercise_st_slope,fluoroscopy_vessels_colored,thallium_stress_test
63,male,typical angina,145,233,true,probable or definite left ventricular hypertrophy,150,no,2.3,downsloping,0,fixed defect' \
| tangram predict -m heart_disease.tangram
Output was:
diagnosis
Positive
Hey @simonw thanks so much for giving tangram a try. This is a great suggestion. I added a page at https://www.tangram.dev/docs/getting_started/predict/cli that covers this.
I was following the tutorial, and I got to this page: https://www.tangram.dev/docs/getting_started/train
I ran
tangram train --file heart_disease.csv --target diagnosis
and generated myheart_disease.tangram
model file - then I clicked the "Next: Make a Prediction. >" link at the bottom of the page and it took me here: https://www.tangram.dev/docs/getting_started/predict/I'm not quite ready to spin up a development environment for one of those languages! I was hoping that I'd be able to use the CLI tool to make a prediction.
It looks like I can, with
tangram predict -m heart_disease.tangram
- but in order to use that I need to feed the tool a CSV file with new data in it, and the tutorial doesn't provide me with one of those.Instead, I have to manually create a CSV from the examples in the different languages, e.g. here: https://www.tangram.dev/docs/getting_started/predict/python
It would be great if the first page of the "Make a Prediction" documentation (this page here) gave me a copy-and-paste CLI example using
tangram predict
, so that I could try that out before digging into the programming language demos.