public PairwiseModel(PairwiseModel.Builder builder)
 {
     name             = builder.name;
     meta             = builder.meta;
     trainingExamples = builder.trainingExamples;
     epochs           = builder.epochs;
     singletonRatio   = builder.singletonRatio;
     classifier       = new SimpleLinearClassifier(builder.loss, builder.learningRateSchedule, builder.regularizationStrength, builder.modelFile == null ? null : ((builder.modelFile.EndsWith(".ser") || builder.modelFile.EndsWith(".gz")) ? builder.modelFile
                          : StatisticalCorefTrainer.pairwiseModelsPath + builder.modelFile + "/model.ser"));
     str = StatisticalCorefTrainer.FieldValues(builder);
 }
 public MaxMarginMentionRanker(MaxMarginMentionRanker.Builder builder)
     : base(builder)
 {
     costs = builder.costs;
     multiplicativeCost = builder.multiplicativeCost;
     if (multiplicativeCost)
     {
         foreach (MaxMarginMentionRanker.ErrorType et in MaxMarginMentionRanker.ErrorType.Values())
         {
             losses[et.id] = SimpleLinearClassifier.MaxMargin(builder.costs[et.id]);
         }
     }
     loss = SimpleLinearClassifier.MaxMargin(1.0);
 }
 public ClustererClassifier(string modelFile, double learningRate)
     : base(SimpleLinearClassifier.Risk(), SimpleLinearClassifier.Constant(learningRate), 0, modelFile)
 {
 }
 public ClustererClassifier(double learningRate)
     : base(SimpleLinearClassifier.Risk(), SimpleLinearClassifier.Constant(learningRate), 0)
 {
 }