class_docstr: This class represents a simulation of hypothetical machine learning algorithm hyper-parameter spaces.
  
  It is mostly used for conducting abstract research into hyper-parameter optimization.
class_docstr_tok: ["This","class","represents","a","simulation","of","hypothetical","machine","learning","algorithm","hyper-parameter","spaces",".","It","is","mostly","used","for","conducting","abstract","research","into","hyper-parameter","optimization","."]
code: def computeAllResultStatistics(self, results):
      losses = numpy.array(
          sorted(
              [
                  result["loss"]
                  for result in results
                  if result["loss"] is not None
              ]
          )
      )
  
      if len(set(losses)) > 1:
          percentile10Loss = numpy.percentile(losses, 10)
          percentile20Loss = numpy.percentile(losses, 20)
          percentile30Loss = numpy.percentile(losses, 30)
      else:
          percentile10Loss = losses[0]
          percentile20Loss = losses[0]
          percentile30Loss = losses[0]
  
      allResults = list(results)
      percentile10Results = [
          result
          for result in results
          if result["loss"] is not None
          and result["loss"] <= percentile10Loss
      ]
      percentile20Results = [
          result
          for result in results
          if result["loss"] is not None
          and result["loss"] <= percentile20Loss
      ]
      percentile30Results = [
          result
          for result in results
          if result["loss"] is not None
          and result["loss"] <= percentile30Loss
      ]
  
      recent10Count = min(len(results), 10)
      recent10Results = results[-recent10Count:]
  
      recent25Count = min(len(results), 25)
      recent25Results = results[-recent25Count:]
  
      recent15PercentCount = max(math.ceil(len(results) * 0.15), 5)
      recent15PercentResults = results[-recent15PercentCount:]
  
      statistics = {}
      allResultStatistics = self.computePartialResultStatistics(
          allResults
      )
      for stat, value in allResultStatistics.items():
          statistics["all_" + stat] = value
  
      percentile10Statistics = self.computePartialResultStatistics(
          percentile10Results
      )
      for stat, value in percentile10Statistics.items():
          statistics["top_10%_" + stat] = value
  
      percentile20Statistics = self.computePartialResultStatistics(
          percentile20Results
      )
      for stat, value in percentile20Statistics.items():
          statistics["top_20%_" + stat] = value
  
      percentile30Statistics = self.computePartialResultStatistics(
          percentile30Results
      )
      for stat, value in percentile30Statistics.items():
          statistics["top_30%_" + stat] = value
  
      recent10Statistics = self.computePartialResultStatistics(
          recent10Results
      )
      for stat, value in recent10Statistics.items():
          statistics["recent_10_" + stat] = value
  
      recent25Statistics = self.computePartialResultStatistics(
          recent25Results
      )
      for stat, value in recent25Statistics.items():
          statistics["recent_25_" + stat] = value
  
      recent15PercentResult = self.computePartialResultStatistics(
          recent15PercentResults
      )
      for stat, value in recent15PercentResult.items():
          statistics["recent_15%_" + stat] = value
  
      self.addAlgorithmStatistics(statistics)
  
      # Although we have added lots of protection in the computePartialResultStatistics code, one last hedge against any NaN or infinity values coming up
      # in our statistics
      for key in statistics.keys():
          if math.isnan(statistics[key]) or math.isinf(statistics[key]):
              statistics[key] = 0
  
      return statistics
  
imports: import hyperopt
  import math
  import json
  import random
  import numpy
  import functools
  import concurrent.futures
  import os
  import sys
  import time
  import datetime
  import subprocess
  import scipy.stats
  import csv
  import pickle
  import matplotlib.pyplot
  from scipy.stats import norm
  import scipy.interpolate
  import copy
  import sklearn.preprocessing
  import sklearn.cluster
  from hypermax.utils import roundPrecision
  from hypermax.hyperparameter import Hyperparameter
  from pprint import pprint
  import psutil
  import lightgbm
label_desc: Use image node_id 16 for calling the AlgorithmSimulation obj's underlying member method code with example usage: obj.computeAllResultStatistics(results) and returns: statistics