5-fold cross validation #112
Unanswered
DJHeisenberg01
asked this question in
Q&A
Replies: 1 comment 3 replies
-
Hi, you can always do cross-validation by including your model, datasets and trainer in a loop for Now, regarding "making predictions and evaluations of the predictions", the tutorials explain the process. You will create your def accuracy(y_hat, y):
return torch.sum(torch.eq(torch.round(sig(y_hat)), y))/len(y)/2 # half due to double-counting
eval_metrics = {"acc": accuracy} and you will pass it to the trainer (with Let me know if you need more help. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi again Lambeq community,
I am currently testing both the quantum pipeline using jax and the classical pipeline shown in the examples using my own dataset, rather than asking for help on a piece of code, I wanted to know if it would be possible to perform a 5-fold cross validation in both pipelines and what approach I should use, as I cannot find a way to make predictions and evaluations of the predictions that is included in the trainer description, probably due to not reading the library carefully.
Thanks for your help
Beta Was this translation helpful? Give feedback.
All reactions