Check out the DTREE and PERCEPTRON example scripts.