Returns the score of the RVFDatum for the specified label.
Ignores the true label of the RVFDatum.
423713
@Deprecated
  public double scoreOf(RVFDatum<L, F> example, L label) {
    int iLabel = labelIndex.indexOf(label);
    double score = 0.0;
    Counter<F> features = example.asFeaturesCounter();
    for (F f : features.keySet()) {
      score += weight(f, iLabel) * features.getCount(f);
    }
    return score + thresholds[iLabel];
  }
903033
def has_level_label(label_flags, vmin):
    
    if label_flags.size == 0 or (label_flags.size == 1 and
                                 label_flags[0] == 0 and
                                 vmin % 1 > 0.0):
        return False
    else:
        return True
453089
def find_max_label_length(labels):
    """"""
    length = 0
    for i in range(len(labels)):
        if len(labels[i]) > length:
            length = len(labels[i])

    return length
756290
def f1Measure(self, label=None):
        
        if label is None:
            return self.call("f1Measure")
        else:
            return self.call("f1Measure", float(label))
1356423
def proxy_label_for(label: str) -> str:
        
        label_java = _VertexLabel(label).unwrap()
        proxy_label_java = k.jvm_view().SequenceBuilder.proxyLabelFor(label_java)
        return proxy_label_java.getQualifiedName()
185366
def get_name_and_value(self, label_type):
        
        if label_type in self._label_values:
            return self._label_values[label_type]
        else:
            return (label_type, self._df_labels[label_type])
977012
private Counter<L> probabilityOfRVFDatum(RVFDatum<L, F> example) {
    // NB: this duplicate method is needed so it calls the scoresOf method
    // with a RVFDatum signature
    Counter<L> scores = logProbabilityOfRVFDatum(example);
    for (L label : scores.keySet()) {
      scores.setCount(label, Math.exp(scores.getCount(label)));
    }
    return scores;
  }
285380
def get_label(self, label, params=None):
        
        return self.label(label, action='GET', params=params)
1084690
def is_label_dataframe(label, df):
    """"""

    setdiff = set(label) - set(df.columns.tolist())

    if len(setdiff) == 0:
        return True
    else:
        return False
407715
def mutual_info_score(self, reference_clusters):
        
        return mutual_info_score(self.get_labels(self), self.get_labels(reference_clusters))
1028365
def _get_x_label(self, i):
        """"""
        if not self.x_labels or not self._x_labels or len(self._x_labels) <= i:
            return
        return self._x_labels[i][0]
960952
def score(self, i):
        """"""
        if self.minimize:
            return self.data[i][0]
        else:
            return self.data[(-1 * i) - 1][0]
594322
def feed(self, pred, label):
        
        assert pred.shape == label.shape, "{} != {}".format(pred.shape, label.shape)
        self.nr_pos += (label == 1).sum()
        self.nr_neg += (label == 0).sum()
        self.nr_pred_pos += (pred == 1).sum()
        self.nr_pred_neg += (pred == 0).sum()
        self.corr_pos += ((pred == 1) & (pred == label)).sum()
        self.corr_neg += ((pred == 0) & (pred == label)).sum()
1259350
def get_by_label(self, label):
        
        return next((x for x in self if x.label == label), None)
183426
@Override
    public double f1Score(INDArray input, INDArray labels) {
        feedForward(input);
        setLabels(labels);
        Evaluation eval = new Evaluation();
        eval.eval(labels, output(input));
        return eval.f1();
    }
103146
def format_dapi_score(cls, meta, offset):
        ''''''
        if 'average_rank' and 'rank_count' in meta:
            label = (cls._nice_strings['average_rank'] + ':').ljust(offset + 2)
            score = cls._format_field(meta['average_rank'])
            votes = ' ({num} votes)'.format(num=meta['rank_count'])
            return label + score + votes
        else:
            return ''
791817
protected Frame scoreImpl(Frame adaptFrm) {
    if (isSupervised()) {
      int ridx = adaptFrm.find(responseName());
      assert ridx == -1 : "Adapted frame should not contain response in scoring method!";
      assert nfeatures() == adaptFrm.numCols() : "Number of model features " + nfeatures() + " != number of test set columns: " + adaptFrm.numCols();
      assert adaptFrm.vecs().length == nfeatures() : "Scoring data set contains wrong number of columns: " + adaptFrm.vecs().length + " instead of " + nfeatures();
    }
    // Create a new vector for response
    // If the model produces a classification/enum, copy the domain into the
    // result vector.
    int nc = nclasses();
    Vec [] newVecs = new Vec[]{adaptFrm.anyVec().makeZero(classNames())};
    if(nc > 1)
      newVecs = Utils.join(newVecs,adaptFrm.anyVec().makeZeros(nc));
    String [] names = new String[newVecs.length];
    names[0] = "predict";
    for(int i = 1; i < names.length; ++i)
      names[i] = classNames()[i-1];
    final int num_features = nfeatures();
    new MRTask2() {
      @Override public void map( Chunk chks[] ) {
        double tmp [] = new double[num_features]; // We do not need the last field representing response
        float preds[] = new float [nclasses()==1?1:nclasses()+1];
        int len = chks[0]._len;
        for( int row=0; row<len; row++ ) {
          float p[] = score0(chks,row,tmp,preds);
          for( int c=0; c<preds.length; c++ )
            chks[num_features+c].set0(row,p[c]);
        }
      }
    }.doAll(Utils.join(adaptFrm.vecs(),newVecs));
    // Return just the output columns
    return new Frame(names,newVecs);
  }