microprobe.utils.distrib

microprobe.utils.distrib module

Functions

average(array[, weights])

param array:

compute_weighted_profile_average(profile, ...)

param profile:

discrete_average(average_val)

param average_val:

generate_plain_profile(elements)

param elements:

generate_weighted_profile(elements, ...[, ...])

param elements:

locality(values, locdef)

probability(value)

pstdev(data)

Calculates the population standard deviation

regular_probability(value)

Returns callable that returns True every value calls

regular_seq(items)

param items:

shuffle(slist, threshold)

param slist:

sort_by_distance(regs, distdict, useddict, ...)

param regs:

sort_by_usage(regs, lastdict, dummy_defdict)

param regs:

weighted_choice(items)

Returns a function that makes a weighted random choice from items.

Classes

Choice(items)

Classes diagram

Inheritance diagram of Choice



Functions

average(array, weights=None)[source]
Parameters:
  • array

  • weights

compute_weighted_profile_average(profile, attribute)[source]
Parameters:
  • profile

  • attribute

discrete_average(average_val)[source]
Parameters:

average_val

generate_plain_profile(elements)[source]
Parameters:

elements

generate_weighted_profile(elements, attribute, targetvalue, maxvalue=None, minvalue=None)[source]
Parameters:
  • elements

  • attribute

  • targetvalue

  • maxvalue – (Default value = None)

  • minvalue – (Default value = None)

locality(values, locdef)[source]
probability(value)[source]
pstdev(data)[source]

Calculates the population standard deviation

regular_probability(value)[source]

Returns callable that returns True every value calls

regular_seq(items)[source]
Parameters:

items

shuffle(slist, threshold)[source]
Parameters:
  • slist

  • threshold

sort_by_distance(regs, distdict, useddict, distance, dummy_instr, dummy_idx)[source]
Parameters:
  • regs

  • distdict

  • useddict

  • distance

  • dummy_instr

  • dummy_idx

sort_by_usage(regs, lastdict, dummy_defdict)[source]
Parameters:
  • regs

  • lastdict

  • dummy_defdict

weighted_choice(items)[source]

Returns a function that makes a weighted random choice from items.

Parameters:

items