示例#1
0
def test_estimate_noise_matrices():
    nm, inv = latent_estimation.estimate_noise_matrices(
        X=data["X_train"],
        s=data["s"],
    )
    assert (np.all(abs(nm - data["est_nm"]) < 0.1))
    assert (np.all(abs(inv - data["est_inv"]) < 0.1))
示例#2
0
def test_estimate_noise_matrices(sparse):
    data = make_data(sparse=sparse, seed=seed)
    nm, inv = latent_estimation.estimate_noise_matrices(
        X=data["X_train"],
        s=data["s"],
    )
    assert (np.all(abs(nm - data["est_nm"]) < 0.1))
    assert (np.all(abs(inv - data["est_inv"]) < 0.1))