示例#1
0
文件: LoadModel.cpp 项目: openube/ELL
 model::Model GetTreeModel(size_t numSplits)
 {
     auto forest = CreateForest(numSplits);
     model::Model model;
     auto inputNode = model.AddNode<model::InputNode<double>>(3);
     model.AddNode<nodes::SimpleForestPredictorNode>(inputNode->output, forest);
     return model;
 }
示例#2
0
/*!
 * Creates some "spraypainted" (someone called them that)
 * forests throughout the `wilderness`
 */
static void
CreateForests(void)
{
	UInt16 i, j, k;
	UInt32 pos;

	j = (UInt16)(GetRandomNumber(6) + 7);
	for (i = 0; i < j; i++) {
		k = (UInt16)(GetRandomNumber(6) + 8);
		pos = (UInt16)GetRandomNumber(MapMul());
		CreateForest(pos, k);
	}
}