Phi (φ) Coefficient -- lack of confusion
        Arguments:
          scalar (bool or None): Whether to return a scalar Phi coefficient
          (assume binary classification) rather than a multiclass vector
        Measure of the lack of confusion in a single value
        References:
          [MCC on wikipedia](https://en.wikipedia.org/wiki/Matthews_correlation_coefficient)
          [docs on R implementation](http://www.personality-project.org/r/html/phi.html)
        φ =   (TP*TN - FP*FN) / sqrt((TP+FP) * (TP+FN) * (TN+FP) * (TN+FN))
        mcc = (tp*tn - fp*fn) / sqrt((tp+fp) * (tp+fn) * (tn+fp) * (tn+fn))

def get_phi(self, scalar=None):
        """Phi (φ) Coefficient -- lack of confusion
        Arguments:
          scalar (bool or None): Whether to return a scalar Phi coefficient
          (assume binary classification) rather than a multiclass vector
        Measure of the lack of confusion in a single value
        References:
          [MCC on wikipedia](https://en.wikipedia.org/wiki/Matthews_correlation_coefficient)
          [docs on R implementation](http://www.personality-project.org/r/html/phi.html)
        φ =   (TP*TN - FP*FN) / sqrt((TP+FP) * (TP+FN) * (TN+FP) * (TN+FN))
        mcc = (tp*tn - fp*fn) / sqrt((tp+fp) * (tp+fn) * (tn+fp) * (tn+fn))
        """
        # If requested, compute the phi coeffients for all possible 'positive' and 'negative' class labels
        # (multiclass problem)
        if ((not self._scalar_stats and not scalar and self._num_classes > 2) or
                ((scalar is False or self._scalar_stats is False) and self._num_classes > 1)):
            phi = PrettyDict()
            # count of predictions labeled with pred_label for a slice of data that was actually labeled true_label:
            # `count = self[pred_label][true_label]`
            for pos_label in self.columns:
                tp, tn, fp, fn = dataframe_tptnfpfn(self, pos_label=pos_label, labels=self.columns)
                phi[pos_label] = tptnfpfn_mcc(tp=tp, tn=tn, fp=fp, fn=fn)
            return pd.Series(phi)
        # A scalar phi value was requested, so compute it for the "inferred" positive classification class
        return tptnfpfn_mcc(self._tp, self._tn, self._fp, self._fn)