-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathev_distributions.py
52 lines (40 loc) · 932 Bytes
/
ev_distributions.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# -*- coding: utf-8 -*-
"""
Created on Mon Mar 23 10:36:36 2020
@author: sgnodde
"""
import numpy as np
def gumbel_cdf(x, mu, beta):
"""Gumbel CDF.
Parameters
----------
x : list or numpy.array (1d)
x-values.
mu : float
mu parameter of Gumbel function.
beta : float
beta parameter of Gumbel function.
Returns
-------
F : similar to x
CDF of x-values of Gumbel function
"""
F = np.exp(-np.exp((mu-x)/beta))
return F
def weibull_cdf(x, lambda_, k):
"""Weibull CDF.
Parameters
----------
x : list or numpy.array (1d)
x-values.
lambda_ : float
lambda parameter of Weibull function.
k : float
k parameter of Weibull function.
Returns
-------
F : similar to x
CDF of x-values of Weibull function
"""
F = 1 - np.exp(-(x/lambda_)**k)
return F