code: def evaluate(self, truth, predicted):
          
          correct = 0.0
          total = 0.0
          for i in range(len(truth)):
              if(truth[i] == predicted[i]):
                  correct += 1
              total += 1
          return 1.0*correct/total
docs: Evaluates the predicted outputs against the gold data.