Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MKLでのエラー #1

Closed
kokitsuyuzaki opened this issue Jan 12, 2022 · 5 comments
Closed

MKLでのエラー #1

kokitsuyuzaki opened this issue Jan 12, 2022 · 5 comments

Comments

@kokitsuyuzaki
Copy link
Contributor

treefitがCRANから削除されているようです。
https://cloud.r-project.org/web/packages/treefit/index.html

原因は、test-treefit.Rでのcalculate_low_dimension_laplacian_eigenvectors()の出力が、ハードコードされた数値と異なるためだと思われます。
https://cran-archive.r-project.org/web/checks/2021/2021-03-29_check_results_treefit.html

おそらくBLASの実装がMKLかOpenBLASかで結果が変わっているのだと予想していますが、これら実装が違うと、固有ベクトルの符号が反転する場合があるのと、小数点以下何位かで値がずれてくるので、

expect_equal(c(-0.44170765403093942281,
-0.42532540417602071603,
-0.39847023129619907333,
-0.36180339887498919049),
eigenvectors[1, ])

の部分は、例えば

  expect_equal(c(0.44170,
                 0.42532,
                 0.39847,
                 0.36180),
               abs(eigenvectors[1, ]))

expect_equal(c(0.94948070,
0.76344509,
0.57019530,
0.06708014),
calculate_canonical_correlation(eigenvectors1, eigenvectors2))

の部分は、

  expect_equal(c(0.94948,
                 0.76344,
                 0.57019,
                 0.06708),
               calculate_canonical_correlation(eigenvectors1, eigenvectors2))

としてみてはいかがでしょうか。

@kou
Copy link
Contributor

kou commented Jan 12, 2022

おぉ。。。
全然気づいていませんでした。。。
最後のcheckの日が2021-03-29ということはそのときから削除されていたということですよね。。。

その変更でよさそうな気がするのでpull requestにしてもらえますか!?

M1のMacでのCIも追加したいですが、GitHub Actionsではまだ使えないんですよねぇ。。。

@kokitsuyuzaki
Copy link
Contributor Author

kokitsuyuzaki commented Jan 13, 2022

テスト部分だけを書き換えてPRしておきました。
R CMD CHECKや、バージョンの変更などはしてません。
特に問題なさそうであれば、CRANに再投稿をお願いします。
#2

@kou
Copy link
Contributor

kou commented Jan 13, 2022

ありがとうございます!
R 4.1での確認とかもろもろやったらCRANに出しておきます!

@kou kou closed this as completed Jan 13, 2022
@kou
Copy link
Contributor

kou commented Jan 17, 2022

CRANにsubmitしました!
スムーズにいけば今週中にでも復活すると思います!
(機能追加はないのでCRANの環境でのテストが通りさえすればスムーズにいくはず。)

@kou
Copy link
Contributor

kou commented Jan 18, 2022

復活しました!

https://cran.r-project.org/package=treefit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants