-
Notifications
You must be signed in to change notification settings - Fork 176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Whats the best route to save the predictions into a csv file (using Tribuo classes) #109
Comments
There isn't a helper to write out a csv file of predictions. You can save the dataset back out using It's roughly two lines by converting the list into a stream. First write out the dimension headers from the output info inside the model, and then |
Alternatively there is |
It would be nice to have a method that allows this, cause it's something we all probably want to do as part of a pipeline. I can think of many usecases, I;m already in the middle of one such use case. |
Ok. I'm not sure where such a method should live. We have done this in the past when writing out classification outputs for comparison against other systems, but it lives in the main method - https://github.com/oracle/tribuo/blob/main/Classification/Experiments/src/main/java/org/tribuo/classification/experiments/ConfigurableTrainTest.java#L169. Any suggestions on where it should go? It needs to be specialised to each |
Let me try to work a workflow from a user perspective, I think some of the low-level (granular) calls could be brought to a higher-level (wrapped with higher-level functions) so we don't have to do a lot of |
Also, another question sort of related to this one, say I have this block of code:
I'm not able to get hold of each of the example in the |
Assuming that's the complete snippet then it's because you forgot the type parameter on You won't get |
I used your tips and some workarounds to get my solutions but ideally, it would be good to have them via cleaner methods (flows) i.e. class/instance level methods to get to the stuff we need from the input data as well as the prediction classes. |
What else did you need apart from the regression outputs? The features and ground truth outputs should be simple to access. |
Ask the question
What's the best route to save the predictions into a csv file (using Tribuo classes). Say I have a
List<Prediction<Regressor>>
One way could be to iterate thru the list of items and write it to the disk via some
FileXxxx()
class.Is your question about a specific Tribuo class?
List<Prediction<Regressor>>
andDataset
(one of it's concrete subclasses)The text was updated successfully, but these errors were encountered: