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

Change in the output of Exponential distribution

parent a70a7b90
...@@ -71,7 +71,7 @@ class Distributions: ...@@ -71,7 +71,7 @@ class Distributions:
data=robjects.FloatVector(data) data=robjects.FloatVector(data)
rFitDistr=robjects.r['fitdistr'] rFitDistr=robjects.r['fitdistr']
try: try:
self.Exp= rFitDistr(data,'Exponential') self.Exp= rFitDistr(data,'Exp')
except RRuntimeError: except RRuntimeError:
return None return None
myDict = {'distributionType':'Exponential','aParameter':'rate', 'aParameterValue':self.Exp[0][0]} myDict = {'distributionType':'Exponential','aParameter':'rate', 'aParameterValue':self.Exp[0][0]}
...@@ -263,7 +263,7 @@ class DistFittest: ...@@ -263,7 +263,7 @@ class DistFittest:
def ks_test(self,data): #Method that conducts the Kolmogorov-Smirnov statistical test and returns the best fitting distribution among the list of the available statistical distributions def ks_test(self,data): #Method that conducts the Kolmogorov-Smirnov statistical test and returns the best fitting distribution among the list of the available statistical distributions
data=robjects.FloatVector(data) #The given data sample changes into float vector in order to be handled by RPy2 data=robjects.FloatVector(data) #The given data sample changes into float vector in order to be handled by RPy2
#Create a list with strings the available statistical distributions #Create a list with strings the available statistical distributions
list1=['Normal','Lognormal','Exponential','Poisson', 'Geometric','Logistic','Gamma','Weibull', 'Cauchy'] list1=['Normal','Lognormal','Exp','Poisson', 'Geometric','Logistic','Gamma','Weibull', 'Cauchy']
list2=[] #Create a list list2=[] #Create a list
#if...else syntaxes to test if the Kolmogorov-Smirnov statistical tests can be conducted to the available distributions #if...else syntaxes to test if the Kolmogorov-Smirnov statistical tests can be conducted to the available distributions
......
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