Skip to content

Generating Spectra factors for test set #55

@mariemoullet

Description

@mariemoullet

hello, thank you very much for this method and tutorials!

i was wondering if there was the option to train the spectra model on one dataset and then generate spectra factors / scores for a new dataset?

following the syntax of the tutorial, something like

model = spc.SPECTRA_Model(X = X_train, labels =  np.array(adata_train.obs['cell_type']), 
                          L = L,
                          adj_matrix = adj_matrix,
                          weights = None, lam = 0.01,  delta=0.001,kappa = None, rho = 0.05, 
                          use_cell_types = True)


model.train(X = X_train, labels =  np.array(adata_train.obs['cell_type']),
            num_epochs=2) 

model.test(X = X_test, labels =  np.array(adata_test.obs['cell_type'])) 

thank you very much in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions