original_docstring: 
              All statistics available:
              percentage_hits -> percentage of correct predictions
                                 in initial input data
              weights         -> the final weights calculated in
                                 perceptron algorithm.
          
docstring: All statistics available:
  percentage_hits -> percentage of correct predictions
  in initial input data
  weights         -> the final weights calculated in
  perceptron algorithm.
docstring_tokens: All statistics available : percentage_hits - > percentage of correct predictions in initial input data weights - > the final weights calculated in perceptron algorithm .
code: def statistics(self):
          """
              All statistics available:
              percentage_hits -> percentage of correct predictions
                                 in initial input data
              weights         -> the final weights calculated in
                                 perceptron algorithm.
          """
          all_data = len(self.data)
          hits = 0
          for data, result in zip(self.data, self.results):
              signal = self._apply_function(data) >= 0
              if signal == result:
                  hits += 1
  
          statistics = {
              'percentage_hits': round(hits*100/all_data, 2),
              'weights': self.weights
          }
          return statistics
code_tokens: def statistics ( self ) : all_data = len ( self . data ) hits = 0 for data , result in zip ( self . data , self . results ) : signal = self . _apply_function ( data ) >= 0 if signal == result : hits += 1 statistics = { 'percentage_hits' : round ( hits * 100 / all_data , 2 ) , 'weights' : self . weights } return statistics
short_docstring: All statistics available:
  percentage_hits -> percentage of correct predictions
  in initial input data
  weights         -> the final weights calculated in
  perceptron algorithm.
short_docstring_tokens: All statistics available : percentage_hits - > percentage of correct predictions in initial input data weights - > the final weights calculated in perceptron algorithm .
comment: """
              All statistics available:
              percentage_hits -> percentage of correct predictions
                                 in initial input data
              weights         -> the final weights calculated in
                                 perceptron algorithm.
          """