Answers for "inverse box-cox transformation python"

0

inverse box-cox transformation python

#Function
def invboxcox(y,ld):
   if ld == 0:
      return(np.exp(y))
   else:
      return(np.exp(np.log(ld*y+1)/ld))

# Test the code
x=[100]
ld = 0
y = stats.boxcox(x,ld)
print invboxcox(y[0],ld)
Posted by: Guest on June-20-2020

Python Answers by Framework

Browse Popular Code Answers by Language