Skip to content

Instantly share code, notes, and snippets.

View adokoy001's full-sized avatar

Toshiaki_Yokoda adokoy001

View GitHub Profile
@adokoy001
adokoy001 / partial_corr_demo.pl
Created December 25, 2014 11:06
Perl : PDLを使って偏相関係数行列を生成
use strict;
use warnings;
use PDL;
use PDL::Stats::Basic;
# モジュール化するまでも無いのでgistに載せます。
# ランダム要素を無くすと出力がInfになったりするのでそこはご愛嬌ということで。
# また、対角要素は-1になってしまいます。
# 偏相関係数行列を求める関数
sub partial_corr{
@adokoy001
adokoy001 / zinnia feature.cpp
Created May 18, 2013 22:14
zinniaの特徴量抽出方法
// zinniaの特徴量抽出は以下を参照
void Features::makeBasicFeature(int offset,
const Node *first,
const Node *last) {
// distance
addFeature(offset + 1 , 10 * distance(first, last));
// degree
addFeature(offset + 2 ,