Commit e503288f authored by panos's avatar panos Committed by Jérome Perrin

Change the output of Exponential distribution

parent 187d55e8
...@@ -71,10 +71,10 @@ class Distributions: ...@@ -71,10 +71,10 @@ class Distributions:
data=robjects.FloatVector(data) data=robjects.FloatVector(data)
rFitDistr=robjects.r['fitdistr'] rFitDistr=robjects.r['fitdistr']
try: try:
self.Exp= rFitDistr(data,'Exp') self.Exp= rFitDistr(data,'Exponential')
except RRuntimeError: except RRuntimeError:
return None return None
myDict = {'distributionType':'Exponential','aParameter':'rate', 'aParameterValue':self.Exp[0][0]} myDict = {'distributionType':'Exp','aParameter':'mean', 'aParameterValue':self.Exp[0][0]}
return myDict return myDict
def Poisson_distrfit(self,data): def Poisson_distrfit(self,data):
...@@ -335,9 +335,9 @@ class DistFittest: ...@@ -335,9 +335,9 @@ class DistFittest:
self.Lognormal_distrfit(data) self.Lognormal_distrfit(data)
myDict = {'distributionType':list1[b],'aParameter':'logmean','bParameter':'logsd','aParameterValue':self.Lognormal[0][0],'bParameterValue': self.Lognormal[0][1]} myDict = {'distributionType':list1[b],'aParameter':'logmean','bParameter':'logsd','aParameterValue':self.Lognormal[0][0],'bParameterValue': self.Lognormal[0][1]}
return myDict return myDict
elif list1[b]=='Exponential': elif list1[b]=='Exp':
self.Exponential_distrfit(data) self.Exponential_distrfit(data)
myDict = {'distributionType':list1[b],'aParameter':'rate', 'aParameterValue':self.Exp[0][0]} myDict = {'distributionType':list1[b],'aParameter':'mean', 'aParameterValue':self.Exp[0][0]}
return myDict return myDict
elif list1[b]=='Poisson': elif list1[b]=='Poisson':
self.Poisson_distrfit(data) self.Poisson_distrfit(data)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment