ability.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:OG-JRC 作者: OpenRG 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号