Does anyone know what this line is doing in the carvana notebook?
I checked the source code and I’m really confused:
return lambda preds,targs: accuracy_multi(preds, targs, thresh)
def accuracy_multi(preds, targs, thresh):
what’s going on here? In
accuracy_thresh(), where are the 2 arguments to the lambda function
pred,targs, coming from? It appears to be comparing the predictions to the targets (but only the predictions above a certain threshold), but I can’t figure out how it’s actually working. Where is the info coming from? Are there some global variables or something I’m missing?
[EDIT]: Leaving this here for anyone who is also confused — I figured it out. It’s creating the function object and then returning it, and it’s used in