Package schrodinger :: Package analysis :: Module enrichment :: Class StatisticalSummary
[hide private]
[frames] | no frames]

Class StatisticalSummary


Container class to store summary metrics describing an array of
numerical values.

API example:
------------
values = [x/1000 for x in range(1, 1001)]
stat_summary = StatisticalSummary(
    'test',
    numpy.array(values)
)
print stat_summary.mean 
>> 0.50
print stat_summary.std
>> 0.288

Instance Methods [hide private]
 
__init__(self, identifier, values, histogram_range=(0.0,1.0), histogram_bins=10)
 
identifier(self)
 
count(self)
Number of items in the original value array.
 
mean(self)
Mean of the original value array.
 
std(self)
Standard deviation of the original value array.
 
median(self)
Second quartile of the original value array.
 
min(self)
Minimum value of the original value array.
 
min_index(self)
Index of the minimum value of the original value array.
 
max(self)
Maximum value of the original value array.
 
max_index(self)
Index of the maximum value of the original value array.
 
first_quartile(self)
First quartile of the original value array.
 
third_quartile(self)
Third quartile of the original value array.
 
histogram(self)
Numpy histogram of the original value array.
 
bin_edges(self)
Numpy histogram bin edges of the original value array.
Method Details [hide private]

__init__(self, identifier, values, histogram_range=(0.0,1.0), histogram_bins=10)
(Constructor)

 
Parameters:
  • identifier (string) - Arbitrary string key.
  • values (numpy array) - Array of similary values to summarize.
  • histogram_bins - Number of bins for the histogram. Default is 10.
  • histogram_range (tuple) - Min, max tuple for the histogram range. Default is (0.0, 1.0).

identifier(self)

 
Decorators:
  • @property

count(self)

 

Number of items in the original value array.

Decorators:
  • @property

mean(self)

 

Mean of the original value array.

Decorators:
  • @property

std(self)

 

Standard deviation of the original value array.

Decorators:
  • @property

median(self)

 

Second quartile of the original value array.

Decorators:
  • @property

min(self)

 

Minimum value of the original value array.

Decorators:
  • @property

min_index(self)

 

Index of the minimum value of the original value array.

Decorators:
  • @property

max(self)

 

Maximum value of the original value array.

Decorators:
  • @property

max_index(self)

 

Index of the maximum value of the original value array.

Decorators:
  • @property

first_quartile(self)

 

First quartile of the original value array.

Decorators:
  • @property

third_quartile(self)

 

Third quartile of the original value array.

Decorators:
  • @property

histogram(self)

 

Numpy histogram of the original value array.

Decorators:
  • @property

bin_edges(self)

 

Numpy histogram bin edges of the original value array.

Decorators:
  • @property