Closed pevnak closed 2 weeks ago
logistic(x) = log(1 + exp(x)) hinge(x) = max(0, 1 - x) loss01(x) = x > 0 function policy_loss_func1(policy, ee, yj, surrogate::Function = logistic) p = policy(ee) diff = p[1, yj] .- p filtered_diff = filter(!=(0), diff) loss = sum(surrogate.(filtered_diff)) end