I'm trying to implement this python function in scala. Can someone help?
The Python code is:
from scipy.stats import norm
import numpy as np
def expected_spend(mu,sigma,cl):
return norm.expect(lambda x: np.minimum(x,cl),lb=0,ub=np.inf,loc=mu,scale=sigma)
I don't have access to many external libraries in scala, I'm trying to implement it using Breeze, but any open source library recommendation is welcome.