I've been beating my head on this one, with not too much success.

I'm trying to build the maximum likelihood loss functions for two equations, where lambda (and lambdas/m) are parameters, and N and x are column values, and s and pi are constants.

(N*s*pi)*lambda*exp(-lambda*x)

and

(N*s*pi)*(p*lambdas*exp(-lambdas*x)+(1-p)*lambdam*exp(-lambdam*x))

Any suggestions?

thanks so much.