This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use strict; | |
use warnings; | |
use PDL; | |
use PDL::Stats::Basic; | |
# モジュール化するまでも無いのでgistに載せます。 | |
# ランダム要素を無くすと出力がInfになったりするのでそこはご愛嬌ということで。 | |
# また、対角要素は-1になってしまいます。 | |
# 偏相関係数行列を求める関数 | |
sub partial_corr{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// zinniaの特徴量抽出は以下を参照 | |
void Features::makeBasicFeature(int offset, | |
const Node *first, | |
const Node *last) { | |
// distance | |
addFeature(offset + 1 , 10 * distance(first, last)); | |
// degree | |
addFeature(offset + 2 , |
NewerOlder