simpleSvm implemented by Java