示例#1
0
def expand_study(study_name):
    study = StudyDirectory(study_name).get_study()
    theblend, concepts = study.get_assoc_blend()
    U, S, V = theblend.normalize_all().svd(k=50)
    doc_rows = divisi2.aligned_matrix_multiply(study.get_documents_matrix(), U)
    projections = U.extend(doc_rows)
    spectral = divisi2.reconstruct_activation(projections, S, post_normalize=True)
    divisi2.save(spectral, study_name+'/Results/expanded.rmat')
示例#2
0
def expand_study(study_name):
    study = StudyDirectory(study_name).get_study()
    theblend, concepts = study.get_assoc_blend()
    U, S, V = theblend.normalize_all().svd(k=50)
    doc_rows = divisi2.aligned_matrix_multiply(study.get_documents_matrix(), U)
    projections = U.extend(doc_rows)
    spectral = divisi2.reconstruct_activation(projections,
                                              S,
                                              post_normalize=True)
    divisi2.save(spectral, study_name + '/Results/expanded.rmat')
示例#3
0
    def set_study_dir(self, dir):
        self.dir_model.setRootPath(dir)
        index = self.dir_model.index(dir)
        self.ui.tree_view.setRootIndex(index)
        self.ui.tree_view.hideColumn(1)
        self.ui.tree_view.hideColumn(2)
        self.ui.tree_view.hideColumn(3)

        self.study_dir = StudyDirectory(dir)

        # Expand the trees that should be initially visible
        self.ui.tree_view.expand(
            self.dir_model.index(self.dir_model.rootPath() + '/Canonical'))
        self.ui.tree_view.expand(
            self.dir_model.index(self.dir_model.rootPath() + '/Documents'))
        self.ui.tree_view.expand(
            self.dir_model.index(self.dir_model.rootPath() + '/Matrices'))
示例#4
0
 def new_study_dialog(self):
     dirname = QtGui.QFileDialog.getSaveFileName(
         self, "Choose where to save this study", package_dir)
     if dirname:
         study = StudyDirectory.make_new(unicode(dirname))
         self.load_study(unicode(dirname))
示例#5
0
 def new_study_dialog(self):
     dirname = QtGui.QFileDialog.getSaveFileName(self, "Choose where to save this study", package_dir)
     if dirname:
         study = StudyDirectory.make_new(unicode(dirname))
         self.load_study(unicode(dirname))
示例#6
0
import config
from luminoso.study import StudyDirectory;

StudyDirectory.make_new(config.study_location)