Esempio n. 1
0
    def __call__(self, dataset):
        # create the dissimilarity matrix for the data in the input dataset
        self.dset_dsm = DSMatrix(dataset.samples, self.dset_metric)

        in_vec = self.dsmatrix.get_vector_form()
        dset_vec = self.dset_dsm.get_vector_form()

        # concatenate the two vectors, send to dissimlarity function
        test_mat = np.asarray([in_vec, dset_vec])

        test_dsmatrix = DSMatrix(test_mat, self.output_metric)

        # return correct dissimilarity value
        return test_dsmatrix.get_full_matrix()[0, 1]