Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #inverse #transformation #python
ADD COMMENT
Topic
Name
4+5 =