Exponential curve fitting in SciPy
up vote
23
down vote
favorite
I have two NumPy arrays x
and y
. When I try to fit my data using exponential function and curve_fit
(SciPy) with this simple code
#!/usr/bin/env python
from pylab import *
from scipy.optimize import curve_fit
x = np.array([399.75, 989.25, 1578.75, 2168.25, 2757.75, 3347.25, 3936.75, 4526.25, 5115.75, 5705.25])
y = np.array([109,62,39,13,10,4,2,0,1,2])
def func(x, a, b, c, d):
return a*np.exp(b-c*x)+d
popt, pcov = curve_fit(func, x, y)
I get wrong coefficients popt
[a,b,c,d] = [1., 1., 1., 24.19999988]
What is the problem?
python numpy scipy curve-fitting
add a comment |
up vote
23
down vote
favorite
I have two NumPy arrays x
and y
. When I try to fit my data using exponential function and curve_fit
(SciPy) with this simple code
#!/usr/bin/env python
from pylab import *
from scipy.optimize import curve_fit
x = np.array([399.75, 989.25, 1578.75, 2168.25, 2757.75, 3347.25, 3936.75, 4526.25, 5115.75, 5705.25])
y = np.array([109,62,39,13,10,4,2,0,1,2])
def func(x, a, b, c, d):
return a*np.exp(b-c*x)+d
popt, pcov = curve_fit(func, x, y)
I get wrong coefficients popt
[a,b,c,d] = [1., 1., 1., 24.19999988]
What is the problem?
python numpy scipy curve-fitting
similar question stackoverflow.com/questions/17527869/…
– Josef
Jan 29 '14 at 2:54
add a comment |
up vote
23
down vote
favorite
up vote
23
down vote
favorite
I have two NumPy arrays x
and y
. When I try to fit my data using exponential function and curve_fit
(SciPy) with this simple code
#!/usr/bin/env python
from pylab import *
from scipy.optimize import curve_fit
x = np.array([399.75, 989.25, 1578.75, 2168.25, 2757.75, 3347.25, 3936.75, 4526.25, 5115.75, 5705.25])
y = np.array([109,62,39,13,10,4,2,0,1,2])
def func(x, a, b, c, d):
return a*np.exp(b-c*x)+d
popt, pcov = curve_fit(func, x, y)
I get wrong coefficients popt
[a,b,c,d] = [1., 1., 1., 24.19999988]
What is the problem?
python numpy scipy curve-fitting
I have two NumPy arrays x
and y
. When I try to fit my data using exponential function and curve_fit
(SciPy) with this simple code
#!/usr/bin/env python
from pylab import *
from scipy.optimize import curve_fit
x = np.array([399.75, 989.25, 1578.75, 2168.25, 2757.75, 3347.25, 3936.75, 4526.25, 5115.75, 5705.25])
y = np.array([109,62,39,13,10,4,2,0,1,2])
def func(x, a, b, c, d):
return a*np.exp(b-c*x)+d
popt, pcov = curve_fit(func, x, y)
I get wrong coefficients popt
[a,b,c,d] = [1., 1., 1., 24.19999988]
What is the problem?
python numpy scipy curve-fitting
python numpy scipy curve-fitting
edited Dec 21 '16 at 20:16
Fermi paradox
2,91452752
2,91452752
asked Jan 29 '14 at 2:14
drastega
65131430
65131430
similar question stackoverflow.com/questions/17527869/…
– Josef
Jan 29 '14 at 2:54
add a comment |
similar question stackoverflow.com/questions/17527869/…
– Josef
Jan 29 '14 at 2:54
similar question stackoverflow.com/questions/17527869/…
– Josef
Jan 29 '14 at 2:54
similar question stackoverflow.com/questions/17527869/…
– Josef
Jan 29 '14 at 2:54
add a comment |
2 Answers
2
active
oldest
votes
up vote
36
down vote
accepted
First comment: since a*exp(b - c*x) = (a*exp(b))*exp(-c*x) = A*exp(-c*x)
, a
or b
is redundant. I'll drop b
and use:
def func(x, a, c, d):
return a*np.exp(-c*x)+d
That isn't the main issue. The problem is simply that curve_fit
fails to converge to a solution to this problem when you use the default initial guess (which is all 1s). Check pcov
; you'll see that it is inf
. This is not surprising, because if c
is 1, most of the values of exp(-c*x)
underflow to 0:
In [32]: np.exp(-x)
Out[32]:
array([ 2.45912644e-174, 0.00000000e+000, 0.00000000e+000,
0.00000000e+000, 0.00000000e+000, 0.00000000e+000,
0.00000000e+000, 0.00000000e+000, 0.00000000e+000,
0.00000000e+000])
This suggests that c
should be small. A better initial guess is, say, p0 = (1, 1e-6, 1)
. Then I get:
In [36]: popt, pcov = curve_fit(func, x, y, p0=(1, 1e-6, 1))
In [37]: popt
Out[37]: array([ 1.63561656e+02, 9.71142196e-04, -1.16854450e+00])
This looks reasonable:
In [42]: xx = np.linspace(300, 6000, 1000)
In [43]: yy = func(xx, *popt)
In [44]: plot(x, y, 'ko')
Out[44]: [<matplotlib.lines.Line2D at 0x41c5ad0>]
In [45]: plot(xx, yy)
Out[45]: [<matplotlib.lines.Line2D at 0x41c5c10>]
Why do you use -c instead of c? curve_fit can find a negative c if necessary, no?
– Elliot Gorokhovsky
Apr 28 '15 at 18:53
@RenéG: That's the convention that drastega used in the question.
– Warren Weckesser
Apr 29 '15 at 3:20
Another approach to initial parameters (using default values, that is) is normalizing x to (approximately) 0—1, e.g., ξ=x/k, estimate a, c' and d and eventually have c=c'/k.
– gboffi
Nov 8 at 11:26
add a comment |
up vote
4
down vote
Firstly I would recommend modifying your equation to a*np.exp(-c*(x-b))+d
, otherwise the exponential will always be centered on x=0
which may not always be the case.
You also need to specify reasonable initial conditions (the 4th argument to curve_fit
specifies initial conditions for [a,b,c,d]
).
This code fits nicely:
from pylab import *
from scipy.optimize import curve_fit
x = np.array([399.75, 989.25, 1578.75, 2168.25, 2757.75, 3347.25, 3936.75, 4526.25, 5115.75, 5705.25])
y = np.array([109,62,39,13,10,4,2,0,1,2])
def func(x, a, b, c, d):
return a*np.exp(-c*(x-b))+d
popt, pcov = curve_fit(func, x, y, [100,400,0.001,0])
print popt
plot(x,y)
x=linspace(400,6000,10000)
plot(x,func(x,*popt))
show()
1
Where do initial conditions come from?
– Marcin Zdunek
Jan 2 '16 at 17:30
@MarcinZdunek this was a while ago so I don't remember exactly. The amplitude will have been estimated from the graph. The others may have been determined via trial and error, although the value for c can be estimated too (see the accepted answer of this question)
– three_pineapples
Jan 2 '16 at 22:08
@MarcinZdunek The default initial values are fine if you normalize both data ranges and afterwards denormalize the estimated parameters...
– gboffi
Nov 8 at 11:39
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
36
down vote
accepted
First comment: since a*exp(b - c*x) = (a*exp(b))*exp(-c*x) = A*exp(-c*x)
, a
or b
is redundant. I'll drop b
and use:
def func(x, a, c, d):
return a*np.exp(-c*x)+d
That isn't the main issue. The problem is simply that curve_fit
fails to converge to a solution to this problem when you use the default initial guess (which is all 1s). Check pcov
; you'll see that it is inf
. This is not surprising, because if c
is 1, most of the values of exp(-c*x)
underflow to 0:
In [32]: np.exp(-x)
Out[32]:
array([ 2.45912644e-174, 0.00000000e+000, 0.00000000e+000,
0.00000000e+000, 0.00000000e+000, 0.00000000e+000,
0.00000000e+000, 0.00000000e+000, 0.00000000e+000,
0.00000000e+000])
This suggests that c
should be small. A better initial guess is, say, p0 = (1, 1e-6, 1)
. Then I get:
In [36]: popt, pcov = curve_fit(func, x, y, p0=(1, 1e-6, 1))
In [37]: popt
Out[37]: array([ 1.63561656e+02, 9.71142196e-04, -1.16854450e+00])
This looks reasonable:
In [42]: xx = np.linspace(300, 6000, 1000)
In [43]: yy = func(xx, *popt)
In [44]: plot(x, y, 'ko')
Out[44]: [<matplotlib.lines.Line2D at 0x41c5ad0>]
In [45]: plot(xx, yy)
Out[45]: [<matplotlib.lines.Line2D at 0x41c5c10>]
Why do you use -c instead of c? curve_fit can find a negative c if necessary, no?
– Elliot Gorokhovsky
Apr 28 '15 at 18:53
@RenéG: That's the convention that drastega used in the question.
– Warren Weckesser
Apr 29 '15 at 3:20
Another approach to initial parameters (using default values, that is) is normalizing x to (approximately) 0—1, e.g., ξ=x/k, estimate a, c' and d and eventually have c=c'/k.
– gboffi
Nov 8 at 11:26
add a comment |
up vote
36
down vote
accepted
First comment: since a*exp(b - c*x) = (a*exp(b))*exp(-c*x) = A*exp(-c*x)
, a
or b
is redundant. I'll drop b
and use:
def func(x, a, c, d):
return a*np.exp(-c*x)+d
That isn't the main issue. The problem is simply that curve_fit
fails to converge to a solution to this problem when you use the default initial guess (which is all 1s). Check pcov
; you'll see that it is inf
. This is not surprising, because if c
is 1, most of the values of exp(-c*x)
underflow to 0:
In [32]: np.exp(-x)
Out[32]:
array([ 2.45912644e-174, 0.00000000e+000, 0.00000000e+000,
0.00000000e+000, 0.00000000e+000, 0.00000000e+000,
0.00000000e+000, 0.00000000e+000, 0.00000000e+000,
0.00000000e+000])
This suggests that c
should be small. A better initial guess is, say, p0 = (1, 1e-6, 1)
. Then I get:
In [36]: popt, pcov = curve_fit(func, x, y, p0=(1, 1e-6, 1))
In [37]: popt
Out[37]: array([ 1.63561656e+02, 9.71142196e-04, -1.16854450e+00])
This looks reasonable:
In [42]: xx = np.linspace(300, 6000, 1000)
In [43]: yy = func(xx, *popt)
In [44]: plot(x, y, 'ko')
Out[44]: [<matplotlib.lines.Line2D at 0x41c5ad0>]
In [45]: plot(xx, yy)
Out[45]: [<matplotlib.lines.Line2D at 0x41c5c10>]
Why do you use -c instead of c? curve_fit can find a negative c if necessary, no?
– Elliot Gorokhovsky
Apr 28 '15 at 18:53
@RenéG: That's the convention that drastega used in the question.
– Warren Weckesser
Apr 29 '15 at 3:20
Another approach to initial parameters (using default values, that is) is normalizing x to (approximately) 0—1, e.g., ξ=x/k, estimate a, c' and d and eventually have c=c'/k.
– gboffi
Nov 8 at 11:26
add a comment |
up vote
36
down vote
accepted
up vote
36
down vote
accepted
First comment: since a*exp(b - c*x) = (a*exp(b))*exp(-c*x) = A*exp(-c*x)
, a
or b
is redundant. I'll drop b
and use:
def func(x, a, c, d):
return a*np.exp(-c*x)+d
That isn't the main issue. The problem is simply that curve_fit
fails to converge to a solution to this problem when you use the default initial guess (which is all 1s). Check pcov
; you'll see that it is inf
. This is not surprising, because if c
is 1, most of the values of exp(-c*x)
underflow to 0:
In [32]: np.exp(-x)
Out[32]:
array([ 2.45912644e-174, 0.00000000e+000, 0.00000000e+000,
0.00000000e+000, 0.00000000e+000, 0.00000000e+000,
0.00000000e+000, 0.00000000e+000, 0.00000000e+000,
0.00000000e+000])
This suggests that c
should be small. A better initial guess is, say, p0 = (1, 1e-6, 1)
. Then I get:
In [36]: popt, pcov = curve_fit(func, x, y, p0=(1, 1e-6, 1))
In [37]: popt
Out[37]: array([ 1.63561656e+02, 9.71142196e-04, -1.16854450e+00])
This looks reasonable:
In [42]: xx = np.linspace(300, 6000, 1000)
In [43]: yy = func(xx, *popt)
In [44]: plot(x, y, 'ko')
Out[44]: [<matplotlib.lines.Line2D at 0x41c5ad0>]
In [45]: plot(xx, yy)
Out[45]: [<matplotlib.lines.Line2D at 0x41c5c10>]
First comment: since a*exp(b - c*x) = (a*exp(b))*exp(-c*x) = A*exp(-c*x)
, a
or b
is redundant. I'll drop b
and use:
def func(x, a, c, d):
return a*np.exp(-c*x)+d
That isn't the main issue. The problem is simply that curve_fit
fails to converge to a solution to this problem when you use the default initial guess (which is all 1s). Check pcov
; you'll see that it is inf
. This is not surprising, because if c
is 1, most of the values of exp(-c*x)
underflow to 0:
In [32]: np.exp(-x)
Out[32]:
array([ 2.45912644e-174, 0.00000000e+000, 0.00000000e+000,
0.00000000e+000, 0.00000000e+000, 0.00000000e+000,
0.00000000e+000, 0.00000000e+000, 0.00000000e+000,
0.00000000e+000])
This suggests that c
should be small. A better initial guess is, say, p0 = (1, 1e-6, 1)
. Then I get:
In [36]: popt, pcov = curve_fit(func, x, y, p0=(1, 1e-6, 1))
In [37]: popt
Out[37]: array([ 1.63561656e+02, 9.71142196e-04, -1.16854450e+00])
This looks reasonable:
In [42]: xx = np.linspace(300, 6000, 1000)
In [43]: yy = func(xx, *popt)
In [44]: plot(x, y, 'ko')
Out[44]: [<matplotlib.lines.Line2D at 0x41c5ad0>]
In [45]: plot(xx, yy)
Out[45]: [<matplotlib.lines.Line2D at 0x41c5c10>]
edited Jan 29 '14 at 3:00
answered Jan 29 '14 at 2:53
Warren Weckesser
67k792126
67k792126
Why do you use -c instead of c? curve_fit can find a negative c if necessary, no?
– Elliot Gorokhovsky
Apr 28 '15 at 18:53
@RenéG: That's the convention that drastega used in the question.
– Warren Weckesser
Apr 29 '15 at 3:20
Another approach to initial parameters (using default values, that is) is normalizing x to (approximately) 0—1, e.g., ξ=x/k, estimate a, c' and d and eventually have c=c'/k.
– gboffi
Nov 8 at 11:26
add a comment |
Why do you use -c instead of c? curve_fit can find a negative c if necessary, no?
– Elliot Gorokhovsky
Apr 28 '15 at 18:53
@RenéG: That's the convention that drastega used in the question.
– Warren Weckesser
Apr 29 '15 at 3:20
Another approach to initial parameters (using default values, that is) is normalizing x to (approximately) 0—1, e.g., ξ=x/k, estimate a, c' and d and eventually have c=c'/k.
– gboffi
Nov 8 at 11:26
Why do you use -c instead of c? curve_fit can find a negative c if necessary, no?
– Elliot Gorokhovsky
Apr 28 '15 at 18:53
Why do you use -c instead of c? curve_fit can find a negative c if necessary, no?
– Elliot Gorokhovsky
Apr 28 '15 at 18:53
@RenéG: That's the convention that drastega used in the question.
– Warren Weckesser
Apr 29 '15 at 3:20
@RenéG: That's the convention that drastega used in the question.
– Warren Weckesser
Apr 29 '15 at 3:20
Another approach to initial parameters (using default values, that is) is normalizing x to (approximately) 0—1, e.g., ξ=x/k, estimate a, c' and d and eventually have c=c'/k.
– gboffi
Nov 8 at 11:26
Another approach to initial parameters (using default values, that is) is normalizing x to (approximately) 0—1, e.g., ξ=x/k, estimate a, c' and d and eventually have c=c'/k.
– gboffi
Nov 8 at 11:26
add a comment |
up vote
4
down vote
Firstly I would recommend modifying your equation to a*np.exp(-c*(x-b))+d
, otherwise the exponential will always be centered on x=0
which may not always be the case.
You also need to specify reasonable initial conditions (the 4th argument to curve_fit
specifies initial conditions for [a,b,c,d]
).
This code fits nicely:
from pylab import *
from scipy.optimize import curve_fit
x = np.array([399.75, 989.25, 1578.75, 2168.25, 2757.75, 3347.25, 3936.75, 4526.25, 5115.75, 5705.25])
y = np.array([109,62,39,13,10,4,2,0,1,2])
def func(x, a, b, c, d):
return a*np.exp(-c*(x-b))+d
popt, pcov = curve_fit(func, x, y, [100,400,0.001,0])
print popt
plot(x,y)
x=linspace(400,6000,10000)
plot(x,func(x,*popt))
show()
1
Where do initial conditions come from?
– Marcin Zdunek
Jan 2 '16 at 17:30
@MarcinZdunek this was a while ago so I don't remember exactly. The amplitude will have been estimated from the graph. The others may have been determined via trial and error, although the value for c can be estimated too (see the accepted answer of this question)
– three_pineapples
Jan 2 '16 at 22:08
@MarcinZdunek The default initial values are fine if you normalize both data ranges and afterwards denormalize the estimated parameters...
– gboffi
Nov 8 at 11:39
add a comment |
up vote
4
down vote
Firstly I would recommend modifying your equation to a*np.exp(-c*(x-b))+d
, otherwise the exponential will always be centered on x=0
which may not always be the case.
You also need to specify reasonable initial conditions (the 4th argument to curve_fit
specifies initial conditions for [a,b,c,d]
).
This code fits nicely:
from pylab import *
from scipy.optimize import curve_fit
x = np.array([399.75, 989.25, 1578.75, 2168.25, 2757.75, 3347.25, 3936.75, 4526.25, 5115.75, 5705.25])
y = np.array([109,62,39,13,10,4,2,0,1,2])
def func(x, a, b, c, d):
return a*np.exp(-c*(x-b))+d
popt, pcov = curve_fit(func, x, y, [100,400,0.001,0])
print popt
plot(x,y)
x=linspace(400,6000,10000)
plot(x,func(x,*popt))
show()
1
Where do initial conditions come from?
– Marcin Zdunek
Jan 2 '16 at 17:30
@MarcinZdunek this was a while ago so I don't remember exactly. The amplitude will have been estimated from the graph. The others may have been determined via trial and error, although the value for c can be estimated too (see the accepted answer of this question)
– three_pineapples
Jan 2 '16 at 22:08
@MarcinZdunek The default initial values are fine if you normalize both data ranges and afterwards denormalize the estimated parameters...
– gboffi
Nov 8 at 11:39
add a comment |
up vote
4
down vote
up vote
4
down vote
Firstly I would recommend modifying your equation to a*np.exp(-c*(x-b))+d
, otherwise the exponential will always be centered on x=0
which may not always be the case.
You also need to specify reasonable initial conditions (the 4th argument to curve_fit
specifies initial conditions for [a,b,c,d]
).
This code fits nicely:
from pylab import *
from scipy.optimize import curve_fit
x = np.array([399.75, 989.25, 1578.75, 2168.25, 2757.75, 3347.25, 3936.75, 4526.25, 5115.75, 5705.25])
y = np.array([109,62,39,13,10,4,2,0,1,2])
def func(x, a, b, c, d):
return a*np.exp(-c*(x-b))+d
popt, pcov = curve_fit(func, x, y, [100,400,0.001,0])
print popt
plot(x,y)
x=linspace(400,6000,10000)
plot(x,func(x,*popt))
show()
Firstly I would recommend modifying your equation to a*np.exp(-c*(x-b))+d
, otherwise the exponential will always be centered on x=0
which may not always be the case.
You also need to specify reasonable initial conditions (the 4th argument to curve_fit
specifies initial conditions for [a,b,c,d]
).
This code fits nicely:
from pylab import *
from scipy.optimize import curve_fit
x = np.array([399.75, 989.25, 1578.75, 2168.25, 2757.75, 3347.25, 3936.75, 4526.25, 5115.75, 5705.25])
y = np.array([109,62,39,13,10,4,2,0,1,2])
def func(x, a, b, c, d):
return a*np.exp(-c*(x-b))+d
popt, pcov = curve_fit(func, x, y, [100,400,0.001,0])
print popt
plot(x,y)
x=linspace(400,6000,10000)
plot(x,func(x,*popt))
show()
edited Jan 2 '16 at 22:05
answered Jan 29 '14 at 2:51
three_pineapples
8,90132447
8,90132447
1
Where do initial conditions come from?
– Marcin Zdunek
Jan 2 '16 at 17:30
@MarcinZdunek this was a while ago so I don't remember exactly. The amplitude will have been estimated from the graph. The others may have been determined via trial and error, although the value for c can be estimated too (see the accepted answer of this question)
– three_pineapples
Jan 2 '16 at 22:08
@MarcinZdunek The default initial values are fine if you normalize both data ranges and afterwards denormalize the estimated parameters...
– gboffi
Nov 8 at 11:39
add a comment |
1
Where do initial conditions come from?
– Marcin Zdunek
Jan 2 '16 at 17:30
@MarcinZdunek this was a while ago so I don't remember exactly. The amplitude will have been estimated from the graph. The others may have been determined via trial and error, although the value for c can be estimated too (see the accepted answer of this question)
– three_pineapples
Jan 2 '16 at 22:08
@MarcinZdunek The default initial values are fine if you normalize both data ranges and afterwards denormalize the estimated parameters...
– gboffi
Nov 8 at 11:39
1
1
Where do initial conditions come from?
– Marcin Zdunek
Jan 2 '16 at 17:30
Where do initial conditions come from?
– Marcin Zdunek
Jan 2 '16 at 17:30
@MarcinZdunek this was a while ago so I don't remember exactly. The amplitude will have been estimated from the graph. The others may have been determined via trial and error, although the value for c can be estimated too (see the accepted answer of this question)
– three_pineapples
Jan 2 '16 at 22:08
@MarcinZdunek this was a while ago so I don't remember exactly. The amplitude will have been estimated from the graph. The others may have been determined via trial and error, although the value for c can be estimated too (see the accepted answer of this question)
– three_pineapples
Jan 2 '16 at 22:08
@MarcinZdunek The default initial values are fine if you normalize both data ranges and afterwards denormalize the estimated parameters...
– gboffi
Nov 8 at 11:39
@MarcinZdunek The default initial values are fine if you normalize both data ranges and afterwards denormalize the estimated parameters...
– gboffi
Nov 8 at 11:39
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f21420792%2fexponential-curve-fitting-in-scipy%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
similar question stackoverflow.com/questions/17527869/…
– Josef
Jan 29 '14 at 2:54