add c code generating training data prediction