original_string: private function generateRules(array $frequent): void
      {
          foreach ($this->antecedents($frequent) as $antecedent) {
              $confidence = $this->confidence($frequent, $antecedent);
              if ($this->confidence <= $confidence) {
                  $consequent = array_values(array_diff($frequent, $antecedent));
                  $this->rules[] = [
                      self::ARRAY_KEY_ANTECEDENT => $antecedent,
                      self::ARRAY_KEY_CONSEQUENT => $consequent,
                      self::ARRAY_KEY_SUPPORT => $this->support($frequent),
                      self::ARRAY_KEY_CONFIDENCE => $confidence,
                  ];
              }
          }
      }
code: private function generateRules(array $frequent): void
      {
          foreach ($this->antecedents($frequent) as $antecedent) {
              $confidence = $this->confidence($frequent, $antecedent);
              if ($this->confidence <= $confidence) {
                  $consequent = array_values(array_diff($frequent, $antecedent));
                  $this->rules[] = [
                      self::ARRAY_KEY_ANTECEDENT => $antecedent,
                      self::ARRAY_KEY_CONSEQUENT => $consequent,
                      self::ARRAY_KEY_SUPPORT => $this->support($frequent),
                      self::ARRAY_KEY_CONFIDENCE => $confidence,
                  ];
              }
          }
      }
code_tokens: private function generateRules ( array $ frequent ) : void { foreach ( $ this -> antecedents ( $ frequent ) as $ antecedent ) { $ confidence = $ this -> confidence ( $ frequent , $ antecedent ) ; if ( $ this -> confidence <= $ confidence ) { $ consequent = array_values ( array_diff ( $ frequent , $ antecedent ) ) ; $ this -> rules [ ] = [ self :: ARRAY_KEY_ANTECEDENT => $ antecedent , self :: ARRAY_KEY_CONSEQUENT => $ consequent , self :: ARRAY_KEY_SUPPORT => $ this -> support ( $ frequent ) , self :: ARRAY_KEY_CONFIDENCE => $ confidence , ] ; } } }
docstring: Generate confident rules for frequent item set.
  
  @param mixed[] $frequent
docstring_tokens: Generate confident rules for frequent item set .