00001 /* 00002 * This program is free software; you can redistribute it and/or modify 00003 * it under the terms of the GNU General Public License as published by 00004 * the Free Software Foundation; either version 3 of the License, or 00005 * (at your option) any later version. 00006 * 00007 * Written (W) 2012 Chiyuan Zhang 00008 * Copyright (C) 2012 Chiyuan Zhang 00009 */ 00010 00011 #include <shogun/mathematics/Math.h> 00012 #include <shogun/multiclass/tree/RandomConditionalProbabilityTree.h> 00013 00014 using namespace shogun; 00015 00016 bool CRandomConditionalProbabilityTree::which_subtree(node_t *node, SGVector<float32_t> ex) 00017 { 00018 if (CMath::random(0.0, 1.0) > 0.5) 00019 return true; 00020 return false; 00021 }