class_docstr: A distribution that samples permutations and penalizes item scores.
  
  This distribution samples elements of a permutation incrementally, and after
  every sample it penalizes the scores of the remaining items by the similarity
  of already chosen items.
docstr: Initializes an instance of PenalizedPlackettLuce.
  
  Args:
    features: Item features based on which similarity is calculated.
    num_slots: The number of slots to fill: this many items will be sampled.
    logits: Unnormalized log probabilities for the PlackettLuce distribution.
      Shape is `[num_items]`.
    penalty_mixture_coefficient: A parameter responsible for the balance
      between selecting high scoring items and enforcing diverisity.
docstr_tok: ["Initializes","an","instance","of","PenalizedPlackettLuce",".","Args",":","features",":","Item","features","based","on","which","similarity","is","calculated",".","num_slots",":","The","number","of","slots","to","fill",":","this","many","items","will","be","sampled",".","logits",":","Unnormalized","log","probabilities","for","the","PlackettLuce","distribution",".","Shape","is","`","[","num_items","]","`",".","penalty_mixture_coefficient",":","A","parameter","responsible","for","the","balance","between","selecting","high","scoring","items","and","enforcing","diverisity","."]
code: def __init__(
      self,
      features: types.Tensor,
      num_slots: int,
      logits: types.Tensor,
      penalty_mixture_coefficient: float = 1.0,
  ):
      """Initializes an instance of PenalizedPlackettLuce.
  
      Args:
        features: Item features based on which similarity is calculated.
        num_slots: The number of slots to fill: this many items will be sampled.
        logits: Unnormalized log probabilities for the PlackettLuce distribution.
          Shape is `[num_items]`.
        penalty_mixture_coefficient: A parameter responsible for the balance
          between selecting high scoring items and enforcing diverisity.
      """
      self._features = features
      self._num_slots = num_slots
      self._penalty_mixture_coefficient = penalty_mixture_coefficient
      super(PenalizedPlackettLuce, self).__init__(scores=logits)
  
imports: from typing import Optional, Sequence, Text
  import numpy
  import tensorflow
  import tensorflow_probability
  from tf_agents.policies import tf_policy
  from tf_agents.policies import utils
  from tf_agents.specs import bandit_spec_utils
  from tf_agents.specs import tensor_spec
  from tf_agents.trajectories import policy_step
  from tf_agents.typing import types
label_desc: Use image node_id 1 to create a new PenalizedPlackettLuce object from inherited base classes: tfd with example: obj = PenalizedPlackettLuce(features, num_slots, logits, penalty_mixture_coefficient)