def __init__(
    self,
    helpfulnessRaterMin: int = 5,
    tagRaterMin: int = 5,
    helpfulTagPercentile: int = 1,
    notHelpfulTagPercentile: int = 50,
    tagRatioBins: int = 10,
    summaryBins: int = 10,
    helpfulStatsBins: int = 10,
    penalty: str = "l2",
    C: float = 0.002,
    maxIter: int = 2500,
    verbose: int = 1,
    classWeight: Dict[int, int] = {0: 1000, 1: 1},
    trainSize: float = 0.9,
    seed: Optional[int] = None,
    crhFpRate: float = 0.6,
  ):
    """Configure feature extraction and learning hyperparameters for pflip model.

    Args:
      helpfulnessRaterMin: Minimum number of ratings from a given rater with a given
        Helpfulness value for the {rater, value} pair to appear as a feature.
      tagRaterMin: Minimum number of uses of a tag from a given rater for the
        {rater, tag} pair to appear as a feature.
      helpfulTagPercentile: Percentage of {rater, tag} feature columns to retain for
        Helpful tags.
      notHelpfulTagPercentile: Percentage of {rater, tag} feature columns to retain
        for Not Helpful tags.
      tagRatioBins: Number of intervals for discretization of tag ratios.
      summaryBins: Number of intervals for discretization of rating count buckets.
      helpfulStatBins: Number of intervals for discretization of aggregate stats about
        rater factors from Helpful ratings.
      penalty: str specifying whether to apply "l1" or "l2" regularization.
      C: float specifying inverse of the regularization strength.
      maxIter: maximum number of training rounds
      verbose: logging level during training
      classWeight: loss weight assigned to positive (flip) and negative (crh) samples
      validation: amount of data to hold out for model validation
      seed: randomness seed used to make data split and model training deterministic
      chrFpRate: target FP rate for CRH notes
    """
    self._pipeline: Optional[Pipeline] = None
    self._predictionThreshold: Optional[float] = None
    self._helpfulnessRaterMin = helpfulnessRaterMin
    self._tagRaterMin = tagRaterMin
    self._helpfulTagPercentile = helpfulTagPercentile
    self._notHelpfulTagPercentile = notHelpfulTagPercentile
    self._tagRatioBins = tagRatioBins
    self._summaryBins = summaryBins
    self._helpfulStatsBins = helpfulStatsBins
    self._penalty = penalty
    self._C = C
    self._maxIter = maxIter
    self._verbose = verbose
    self._classWeight = classWeight
    self._trainSize = trainSize
    self._seed = seed
    self._crhFpRate = crhFpRate
Configure feature extraction and learning hyperparameters for pflip model.

    Args:
      helpfulnessRaterMin: Minimum number of ratings from a given rater with a given
        Helpfulness value for the {rater, value} pair to appear as a feature.
      tagRaterMin: Minimum number of uses of a tag from a given rater for the
        {rater, tag} pair to appear as a feature.
      helpfulTagPercentile: Percentage of {rater, tag} feature columns to retain for
        Helpful tags.
      notHelpfulTagPercentile: Percentage of {rater, tag} feature columns to retain
        for Not Helpful tags.
      tagRatioBins: Number of intervals for discretization of tag ratios.
      summaryBins: Number of intervals for discretization of rating count buckets.
      helpfulStatBins: Number of intervals for discretization of aggregate stats about
        rater factors from Helpful ratings.
      penalty: str specifying whether to apply "l1" or "l2" regularization.
      C: float specifying inverse of the regularization strength.
      maxIter: maximum number of training rounds
      verbose: logging level during training
      classWeight: loss weight assigned to positive (flip) and negative (crh) samples
      validation: amount of data to hold out for model validation
      seed: randomness seed used to make data split and model training deterministic
      chrFpRate: target FP rate for CRH notes
    
sourcecode/scoring/pflip_model.py