This package contains bicluster evaluation metrics.
External metrics require that the ground truth be known; i.e. that a set of expected biclusters is known.
Internal metrics depend only on properties of the data and biclusters themselvs.
Metrics for evaluating biclusters and sets of biclusters.
Bases: tuple
ListScore(relevance, recovery)
Alias for field number 1
Alias for field number 0
Returns two matrices,Crow and Ccol, that contain the information about how many times two pair of rows (and columns) are clustered together in the biclustering result. That is C_ij = 1/ (1+k), where k is the number of biclusters that row_i and row_j (col_i and col_j) appear together. Args:
- datamatrix: 2-Dimensional np array representing dataset.
- bicluster_set: List of bicluster instaces. The list of found biclusters in the datamatrix.
Returns a matrix, Prows, that contains the information about proximity between rows. Args:
- datamatrix: 2-Dimensional np array representing dataset.
- distance_function: Function that calculates the distance between 2 vectors. For example ecludian_distance function.
Returns the count of biclusters where the col_i and col_j appear together Args:
- i: First col index, starting from 0.
- j: Second col index, starting from 0.
- bicluster_set: List of bicluster instaces. The list of found biclusters in the datamatrix.
Returns the euclidian distance of the two vectors. Raises if the lengths of the vectors are not equal. Args:
- vector1: 1-Dimensional list (vector)
- vector1: 1-Dimensional list (vector)
Calculates the f_measure score of a result of an algorithm with the expected biclusters that are embedded to the dataset. Uses relevance and recovery scores, and takes the harmonic mean of them. In the harmonic mean formula, relevance score is scaled with the square of beta as in the following formula:
Calculates both the relevance and the recovery scores of the algorithm result according to f_measure score with the given beta scale.
Returns two matrices, Prows and Pcols, that contain the information about proximity between rows and columns respectively. Args:
- datamatrix: 2-Dimensional np array representing dataset.
- distance_function: Function that calculates the distance between 2 vectors. For example ecludian_distance function.
Returns a single dimensional array containing the values at upper half of the matrix C. Args: * C: 2-Dimensional square np array. Simply result of calculate_bicluster_group_matrix function.
Returns a score that is calculated using internal indices. Uses hubert_statistics explained in R. Santamaria et. al 2007. Args: * P: 2-Dimensional squared np array. A result of get_distance_matrices function. * C: 2-Dimensional square np array. A result of calculate_bicluster_group_matrix function.
Returns the weighted hubert_statistics scores of 2 scores calculated for columns and rows.(R. Santamaria et. al 2007 section 3.3) Args: * datamatrix: 2-Dimensional np array representing dataset. * bicluster_set: List of bicluster instaces. The list of found biclusters in the datamatrix.
Jaccard coefficient of bicluster area.
Recovery and relevance scores of a set of biclusters using Jaccard coefficient.
The proportion of ‘expected’ retrieved in ‘found’.
Note that the one-way relevance is not true relevance: it is the intersection divided by the size of ‘found’.
One way relevance:
Calculates both the relevance and the recovery scores of the algorithm result according to Prelics row jaccard score.
The proportion of true positives found.
N.B.: The f-measure calculated as the harmonic mean of the recovery and relevance scores returned by this function is different from the f_measure_list function.
The proportion of true negatives to all negatives.
expected: Bicluster
found: Bicluster
parameter can be ommitted if expected and found have their .data attribute set.
The Jaccard coefficient of rows only. As used by Prelic - intersection_of_rows / union_of_rows
Returns the count of biclusters where the row_i and row_j appear together Args:
- i: First row index, starting from 0.
- j: Second row index, starting from 0.
- bicluster_set: List of bicluster instaces. The list of found biclusters in the datamatrix.