The icikt API Reference¶
Python Information-Content-Informed Kendall Tau Correlation (ICIKT)¶
The icikt package provides a Python tool to calculate an information-content-informed Kendall Tau correlation coefficient between arrays, while also handling missing values or values which need to be removed.
- icikt.methods.icikt(x: ndarray, y: ndarray, perspective: str = 'global') tuple [source]¶
Finds missing values, and replaces them with a value slightly smaller than the minimum between both arrays.
- Parameters
x – First array of data
y – Second array of data
perspective – perspective can be ‘local’ or ‘global’. Default is ‘global’. Global includes (NA,NA) pairs in the calculation, while local does not.
- Returns
tuple with correlation, pvalue, and tauMax values
- icikt.methods.iciktArray(dataArray: ndarray, globalNA: float = 0, perspective: str = 'global', scaleMax: bool = True, diagGood: bool = True, includeOnly: Optional[tuple] = None) tuple [source]¶
Calls iciKT to calculate ICI-Kendall-Tau between every combination of columns in the input 2d array, dataArray. Also replaces any instance of the globalNA in the array with np.nan.
- Parameters
dataArray – 2d array with columns of data to analyze
globalNA – Optional value to replace with np.nan. Default is 0.
perspective – perspective can be ‘local’ or ‘global’. Default is ‘global’. Global includes (NA,NA) pairs in the calculation, while local does not.
scaleMax – should everything be scaled compared to the maximum correlation?
diagGood – should the diagonal entries reflect how many entries in the sample were “good”?
includeOnly – only run correlations of specified columns/combinations
- Returns
tuple of the output correlations, raw correlations, pvalues, and max tau 2d arrays
Future Parameters: featureNA sampleNA