The highest value from among the predictions made by the action
        sets in this match set.
349318
def best_prediction(self):
        """"""
        if self._best_prediction is None and self._action_sets:
            self._best_prediction = max(
                action_set.prediction
                for action_set in self._action_sets.values()
            )
        return self._best_prediction
564378
def top_losses(self, k:int=None, largest=True):
        ""
        return self.losses.topk(ifnone(k, len(self.losses)), largest=largest)
753969
public void calculateMaxFindSkip()
    {
        Map<DFAState<T>,Integer> indexOf = new NumMap<>();
        Map<DFAState<T>,Integer> skip = new NumMap<>();
        Deque<DFAState<T>> stack = new ArrayDeque<>();
        findSkip(root, indexOf, stack, new LinkedList());
        root.setAcceptStartLength(1);
    }
372779
def best(self):
        '''
        
        '''

        if len(self.choices) < 1:
            print('slots: No trials run so far.')
            return None
        else:
            return np.argmax(self.wins/(self.pulls+0.1))
1129203
@Override
    public int predict(T x) {
        List<Neighbor<T,T>> neighbors = new ArrayList<>();
        nns.range(x, radius, neighbors);
        
        if (neighbors.size() < minPts) {
            return OUTLIER;
        }
        
        int[] label = new int[k + 1];
        for (Neighbor<T,T> neighbor : neighbors) {
            int yi = y[neighbor.index];
            if (yi == OUTLIER) yi = k;
            label[yi]++;
        }
        
        int c = Math.whichMax(label);
        if (c == k) c = OUTLIER;
        return c;
    }
1160254
def _sort_by_sortedset_before(self):
        
        return self._sort_by_sortedset and self._sort_limits and (not self._lazy_collection['pks']
                                                            or self._want_score_value)
1319506
def predict_maxprob(self, x, **kwargs):
        
        return self.base_estimator_.predict(x.values, **kwargs)
511410
public static int maxCount(final Multiset<?> multiset) {
    int ret = 0;
    for (final Multiset.Entry<?> entry : multiset.entrySet()) {
      if (entry.getCount() > ret) {
        ret = entry.getCount();
      }
    }
    return ret;
  }
1082819
def maximum(attrs, inputs, proto_obj):
    
    if len(inputs) > 1:
        mxnet_op = symbol.maximum(inputs[0], inputs[1])
        for op_input in inputs[2:]:
            mxnet_op = symbol.maximum(mxnet_op, op_input)
    else:
        mxnet_op = symbol.maximum(inputs[0], inputs[0])
    return mxnet_op, attrs, inputs
388234
def _update_fitness(self, action_set):
        """"""
        # Compute the accuracy of each rule. Accuracy is inversely
        # proportional to error. Below a certain error threshold, accuracy
        # becomes constant. Accuracy values range over (0, 1].
        total_accuracy = 0
        accuracies = {}
        for rule in action_set:
            if rule.error < self.error_threshold:
                accuracy = 1
            else:
                accuracy = (
                    self.accuracy_coefficient *
                    (rule.error / self.error_threshold) **
                    -self.accuracy_power
                )
            accuracies[rule] = accuracy
            total_accuracy += accuracy * rule.numerosity

        # On rare occasions we have zero total accuracy. This avoids a div
        # by zero
        total_accuracy = total_accuracy or 1

        # Use the relative accuracies of the rules to update their fitness
        for rule in action_set:
            accuracy = accuracies[rule]
            rule.fitness += (
                self.learning_rate *
                (accuracy * rule.numerosity / total_accuracy -
                 rule.fitness)
            )
544236
private int calculateClosest(float base, float[] others) {

        int result = -1;
        float bestMatch = Float.MAX_VALUE;
        for (int count = 0; count < others.length; count++) {
            float difference = Math.abs(base - others[count]);
            if (difference < bestMatch) {
                // new best match found
                bestMatch = difference;
                result = count;
            }
            if (bestMatch == 0f) {
                // it does not get better then this
                break;
            }
        }
        return result;
    }
99223
function predict(word, amount) {

    if (!word) {
      return [];
    }

    amount = amount || this.config.maxAmount;

    var currentWord = false;

    var initialBranchResult = this._findInitialBranch(word);

    if(!initialBranchResult) {
      return [];
    }

    if (initialBranchResult.currentBranch.$ === true) {
      currentWord = initialBranchResult.baseWord;
    }

    var predictedList = this._exploreBranch(initialBranchResult.baseWord, initialBranchResult.currentBranch);

    if (currentWord) {
      predictedList.push(currentWord);
    }

    predictedList.sort(this.config.sort);

    return predictedList.slice(0, amount);
  }
428726
def predict(self, sample, pstates):
        
        scores = {}
        for label, pohmm in self.pohmms.items():
            scores[label] = pohmm.score(sample, pstates)
        max_score_label = max(scores.items(), key=itemgetter(1))[0]
        return max_score_label, scores
511010
def _get_best_prediction(self, record, train=True):
        
        if not self.trees:
            return
        best = (+1e999999, None)
        for tree in self.trees:
            best = min(best, (tree.mae.mean, tree))
        _, best_tree = best
        prediction, tree_mae = best_tree.predict(record, train=train)
        return prediction.mean
578337
@Override
    public int predict(double[] x) {
        double minDist = Double.MAX_VALUE;
        int bestCluster = 0;

        for (Neuron neuron : neurons) {
            double dist = Math.squaredDistance(x, neuron.w);
            if (dist < minDist) {
                minDist = dist;
                bestCluster = neuron.y;
            }
        }

        return bestCluster;
    }
1332651
def value_net(rng_key,
              batch_observations_shape,
              num_actions,
              bottom_layers=None):
  """"""
  del num_actions

  if bottom_layers is None:
    bottom_layers = []
  bottom_layers.extend([
      layers.Dense(1),
  ])
  net = layers.Serial(*bottom_layers)
  return net.initialize(batch_observations_shape, rng_key), net
398700
public final int getMaxValue(int which) {
        int max;

        max=indexes[IX_MAX_VALUES];
        switch(which) {
        case UProperty.BIDI_CLASS:
            return (max&CLASS_MASK);
        case UProperty.JOINING_GROUP:
            return (max&MAX_JG_MASK)>>MAX_JG_SHIFT;
        case UProperty.JOINING_TYPE:
            return (max&JT_MASK)>>JT_SHIFT;
        case UProperty.BIDI_PAIRED_BRACKET_TYPE:
            return (max&BPT_MASK)>>BPT_SHIFT;
        default:
            return -1; /* undefined */
        }
    }