def arctan_func(xvals, a, b, c):
'''
--------------------------------------------------------------------
This function generates predicted ability levels given data (xvals)
and parameters a, b, and c, from the following arctan function:
y = (-a / pi) * arctan(b * x + c) + (a / 2)
--------------------------------------------------------------------
INPUTS:
xvals = (N,) vector, data inputs to arctan function
a = scalar, scale parameter for arctan function
b = scalar, curvature parameter for arctan function
c = scalar, shift parameter for arctan function
OTHER FUNCTIONS AND FILES CALLED BY THIS FUNCTION: None
OBJECTS CREATED WITHIN FUNCTION:
yvals = (N,) vector, predicted values (output) of arctan function
RETURNS: yvals
--------------------------------------------------------------------
'''
yvals = (-a / np.pi) * np.arctan(b * xvals + c) + (a / 2)
return yvals
评论列表
文章目录