Cramer_Distance

class turbustat.statistics.Cramer_Distance(cube1, cube2, noise_value1=0.1, noise_value2=0.1)[source] [edit on github]

Bases: object

Compute the Cramer distance between two data cubes. The data cubes are flattened spatially to give 2D objects. We clip off empty channels and keep only the top quartile in the remaining channels.

Parameters:

cube1 : numpy.ndarray

First cube to compare.

cube2 : numpy.ndarray

Second cube to compare.

noise_value1 : float, optional

Noise level in the first cube.

noise_value2 : float, optional

Noise level in the second cube.

data_format : str, optional

Method to arange cube into 2D. Only ‘intensity’ is currently implemented.

Methods Summary

Methods Documentation

cramer_statistic(n_jobs=1)[source] [edit on github]

Applies the Cramer Statistic to the datasets.

Parameters:

n_jobs : int, optional

Sets the number of cores to use to calculate pairwise distances

distance_metric(n_jobs=1)[source] [edit on github]

This serves as a simple wrapper in order to remain with the coding convention used throughout the rest of this project.

format_data(data_format='intensity', seed=13024)[source] [edit on github]

Rearrange data into a 2D object using the given format.