'Refresh available metrics depending on the input data\'s sparsenes'

def refresh_metrics(self):

    sparse = ((self.data is not None) and issparse(self.data.X))
    for (i, metric) in enumerate(METRICS):
        item = self.metrics_combo.model().item(i)
        item.setEnabled(((not sparse) or metric.supports_sparse))
    self._checksparse()
