train svm rectangles and squares functional