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 , | |
std::atan2(last->y - first->y, last->x - first->x)); | |
// absolute position | |
addFeature(offset + 3, 10 * (first->x - 0.5)); | |
addFeature(offset + 4, 10 * (first->y - 0.5)); | |
addFeature(offset + 5, 10 * (last->x - 0.5)); | |
addFeature(offset + 6, 10 * (last->y - 0.5)); | |
// absolute degree | |
addFeature(offset + 7, std::atan2(first->y - 0.5, first->x - 0.5)); | |
addFeature(offset + 8, std::atan2(last->y - 0.5, last->x - 0.5)); | |
// absolute distance | |
addFeature(offset + 9, 10 * distance2(first)); | |
addFeature(offset + 10, 10 * distance2(last)); | |
// diff | |
addFeature(offset + 11, 5 * (last->x - first->x)); | |
addFeature(offset + 12, 5 * (last->y - first->y)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This comment has been minimized.
zinniaの特徴量抽出の処理です。feature.cppから抜粋