partial LinearSVM implementation