Lorenz.py 文件源码

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

项目:SINDy 作者: loiseaujc 项目源码 文件源码
def Identified_Model(y, t, library, estimator) :

    '''
    Simulates the model from Sparse identification.

    Inputs
    ------

    library: library object used in the sparse identification
             (e.g. poly_lib = PolynomialFeatures(degree=3) )

    estimator: estimator object obtained from the sparse identification

    Output
    ------

    dy : numpy array object containing the derivatives evaluated using the
         model identified from sparse regression.

    '''

    dy = np.zeros_like(y)

    lib = library.fit_transform(y.reshape(1,-1))
    Theta = block_diag(lib, lib, lib)
    dy = Theta.dot(estimator.coef_)

    return dy
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号