Example #1
0
    def dissimilarity(self):
        resps = self.classify()
        df = []
        dims = self.get_dims()
        for layer, resps in resps.items():
            for g, i in enumerate(range(0, len(resps), 3)):
                dis = models.dissimilarity(resps[i:i + 3], kind='correlation')
                n = int(os.path.basename(self.ims[i]).split('os')[0])
                df.append([layer, g, n, dims[n], 'non-accidental', dis[1, 0]])
                df.append([layer, g, n, dims[n], 'metric', dis[1, 2]])

        nap = pandas.DataFrame(
            df, columns=['layer', 'geon', 'fno', 'dimension', 'kind', 'dist'])
        self.save(nap, 'nap')
        return nap
Example #2
0
    def dissimilarity(self):
        resps = self.classify()
        df = []
        dims = self.get_dims()
        for layer, resps in resps.items():
            for g,i in enumerate(range(0, len(resps), 3)):
                dis = models.dissimilarity(resps[i:i+3],
                                                      kind='correlation')
                n = int(os.path.basename(self.ims[i]).split('os')[0])
                df.append([layer, g, n, dims[n], 'non-accidental', dis[1,0]])
                df.append([layer, g, n, dims[n], 'metric', dis[1,2]])

        nap = pandas.DataFrame(df,
                            columns=['layer', 'geon', 'fno', 'dimension', 'kind', 'dist'])
        self.save(nap, 'nap')
        return nap
Example #3
0
 def dissimilarity(self):
     resps = self.classify()
     dis = models.dissimilarity(resps, kind=self.dissim)
     self.save(dis, 'dis')
     return dis
Example #4
0
 def dissimilarity(self):
     resps = self.classify()
     dis = models.dissimilarity(resps, kind=self.dissim)
     self.save(dis, "dis")
     return dis