title: How to fix the false positives rate of a linear SVM?
body: <p>I am an SVM newbie and this is my use case: I have a lot of unbalanced data to be binary classified using a linear SVM. I need to fix the false positives rate at certain values and measure the corresponding false negatives for each value. I am using something like the following code making use of scikit-learn svm implementation:</p>
  
  <pre><code># define training data
  X = [[0, 0], [1, 1]]
  y = [0, 1]
  
  # define and train the SVM
  clf = svm.LinearSVC(C=0.01, class_weight='auto') #auto for unbalanced distributions
  clf.fit(X, y)
  
  # compute false positives and false negatives
  predictions = [clf.predict(ex) for ex in X]    
  false_positives = [(a, b) for (a, b) in zip(predictions,y) if a != b and b == 0]
  false_negatives = [(a, b) for (a, b) in zip(predictions,y) if a != b and b == 1] 
  </code></pre>
  
  <p>Is there a way to play with a parameter (or a few parameters) of the classifier such that one the measurement metrics is effectively fixed?</p>