class_docstr: Analyze results of machine learning experiments.
docstr: Friedman test.
  
  The Friedman test is a non-parametric statistical test used to
  detect differences
  in treatments across multiple test attempts. The procedure involves
  ranking each row (or block) together,
  then considering the values of ranks by columns.
  Implementation used:
  `scipy.stats <https://docs.scipy.org/doc/scipy-0.15.1/reference
  /generated/scipy.stats.friedmanchisquare.html>`_.
docstr_tok: ["Friedman","test",".","The","Friedman","test","is","a","non-parametric","statistical","test","used","to","detect","differences","in","treatments","across","multiple","test","attempts",".","The","procedure","involves","ranking","each","row","(","or","block",")","together",",","then","considering","the","values","of","ranks","by","columns",".","Implementation","used",":","`","scipy.stats","<","https",":","\/\/docs.scipy.org\/doc\/scipy-0.15.1\/reference","\/generated\/scipy.stats.friedmanchisquare.html",">","`","_","."]
code: def friedman_test(self, metric_name=None):
      """Friedman test.
  
      The Friedman test is a non-parametric statistical test used to
      detect differences
      in treatments across multiple test attempts. The procedure involves
      ranking each row (or block) together,
      then considering the values of ranks by columns.
      Implementation used:
      `scipy.stats <https://docs.scipy.org/doc/scipy-0.15.1/reference
      /generated/scipy.stats.friedmanchisquare.html>`_.
      """
      self._check_is_evaluated()
      metric_name = self._validate_metric_name(metric_name)
      metrics_per_estimator_dataset = (
          self._get_metrics_per_estimator_dataset(metric_name)
      )
  
      friedman_test = stats.friedmanchisquare(
          *[
              metrics_per_estimator_dataset[k]
              for k in metrics_per_estimator_dataset.keys()
          ]
      )
      values = [friedman_test[0], friedman_test[1]]
      values_df = pd.DataFrame(
          [values], columns=["statistic", "p_value"]
      )
  
      return friedman_test, values_df
  
imports: import itertools
  import numpy
  import pandas
  from scipy import stats
  from scipy.stats import ranksums, ttest_ind
  from sktime.benchmarking.base import BaseResults
  from sktime.exceptions import NotEvaluatedError
  from sktime.utils.validation._dependencies import _check_soft_dependencies
label_desc: Use image node_id 14 for calling the Evaluator obj's underlying member method code with example usage: obj.friedman_test(metric_name) and returns: friedman_test,  values_df