# -*- coding: utf-8 -*-
'''
Copyright (c) 2017 by Benjamin Manns
This file is part of Statistical Parameter Estimation Tool (SPOTPY).
:author: Tobias Houska, Benjamin Manns

This code shows how to use the likelihood framework and present all existing function.
'''

import numpy as np
from spotpy.likelihood import *


data, comparedata = np.random.uniform(150, 250, 20), np.random.uniform(15, 25, 20)
data, comparedata = np.random.normal(150, 250, 20), np.random.normal(15, 25, 20)


l = logLikelihood(data, comparedata)
print("logLikelihood: " + str(l))

l = gaussianLikelihoodMeasErrorOut(data, comparedata)
print("gaussianLikelihoodMeasErrorOut: " + str(l))

l = gaussianLikelihoodHomoHeteroDataError(data, comparedata)
print("gaussianLikelihoodHomoHeteroDataError: " + str(l))

l = LikelihoodAR1NoC(data, comparedata)
print("LikelihoodAR1NoC: " + str(l))

l = LikelihoodAR1WithC(data, comparedata)
print("LikelihoodAR1WithC: " + str(l))

l = generalizedLikelihoodFunction(data, comparedata)
print("generalizedLikelihoodFunction: " + str(l))

l = LaplacianLikelihood(data, comparedata)
print("LaplacianLikelihood: " + str(l))

l = SkewedStudentLikelihoodHomoscedastic(data, comparedata)
print("SkewedStudentLikelihoodHomoscedastic: " + str(l))

l = SkewedStudentLikelihoodHeteroscedastic(data, comparedata)
print("SkewedStudentLikelihoodHeteroscedastic: " + str(l))

l = SkewedStudentLikelihoodHeteroscedasticAdvancedARModel(data, comparedata)
print("SkewedStudentLikelihoodHeteroscedasticAdvancedARModel: " + str(l))

l = NoisyABCGaussianLikelihood(data, comparedata)
print("NoisyABCGaussianLikelihood: " + str(l))

l = ABCBoxcarLikelihood(data, comparedata)
print("ABCBoxcarLikelihood: " + str(l))

l = LimitsOfAcceptability(data, comparedata)
print("LimitsOfAcceptability: " + str(l))

l = InverseErrorVarianceShapingFactor(data, comparedata)
print("inverseErrorVarianceShapingFactor: " + str(l))

l = ExponentialTransformErrVarShapingFactor(data, comparedata)
print("inverseErrorVarianceShapingFactor: " + str(l))

l = NashSutcliffeEfficiencyShapingFactor(data, comparedata)
print("NashSutcliffeEfficiencyShapingFactor: " + str(l))

l = sumOfAbsoluteErrorResiduals(data, comparedata)
print("sumOfAbsoluteErrorResiduals: " + str(l))


@@ -282,39 +282,21 @@
  np%0A
-from spotpy.likelihood import *
+import spotpy
 %0A%0A%0Ad
@@ -464,16 +464,35 @@
 )%0A%0A%0Al = 
+spotpy.likelihoods.
 logLikel
@@ -547,32 +547,51 @@
  + str(l))%0A%0Al = 
+spotpy.likelihoods.
 gaussianLikeliho
@@ -680,16 +680,35 @@
 ))%0A%0Al = 
+spotpy.likelihoods.
 gaussian
@@ -811,32 +811,51 @@
  + str(l))%0A%0Al = 
+spotpy.likelihoods.
 LikelihoodAR1NoC
@@ -916,16 +916,35 @@
 ))%0A%0Al = 
+spotpy.likelihoods.
 Likeliho
@@ -1017,16 +1017,35 @@
 ))%0A%0Al = 
+spotpy.likelihoods.
 generali
@@ -1140,16 +1140,35 @@
 ))%0A%0Al = 
+spotpy.likelihoods.
 Laplacia
@@ -1235,32 +1235,51 @@
  + str(l))%0A%0Al = 
+spotpy.likelihoods.
 SkewedStudentLik
@@ -1372,32 +1372,51 @@
  + str(l))%0A%0Al = 
+spotpy.likelihoods.
 SkewedStudentLik
@@ -1521,16 +1521,35 @@
 ))%0A%0Al = 
+spotpy.likelihoods.
 SkewedSt
@@ -1692,16 +1692,35 @@
 ))%0A%0Al = 
+spotpy.likelihoods.
 NoisyABC
@@ -1809,16 +1809,35 @@
 ))%0A%0Al = 
+spotpy.likelihoods.
 ABCBoxca
@@ -1912,16 +1912,35 @@
 ))%0A%0Al = 
+spotpy.likelihoods.
 LimitsOf
@@ -2019,16 +2019,35 @@
 ))%0A%0Al = 
+spotpy.likelihoods.
 InverseE
@@ -2150,16 +2150,35 @@
 ))%0A%0Al = 
+spotpy.likelihoods.
 Exponent
@@ -2287,16 +2287,35 @@
 ))%0A%0Al = 
+spotpy.likelihoods.
 NashSutc
@@ -2424,16 +2424,35 @@
 ))%0A%0Al = 
+spotpy.likelihoods.
 sumOfAbs

Update tutorial_likelihood.py