1. A computerized method for electronic document classification, the method comprising: providing training documents sorted into a plurality of classes; using a processor to perform linear programming including selecting input values which maximize an output value, given specific constraints on the input values, wherein the output value maximized is a difference between: a. a first estimated probability that a document instance will be correctly classified, by a given classifier corresponding to given input values, as belonging to its own class, and b. a second estimated probability that the document instance will be classified, by the given classifier, as belonging to a class other than its own class; and classifying electronic document instances into the plurality of classes, using at least one preferred classifier corresponding to the input values selected by said linear programming including storing an indication of said classifying in computer memory.