Thanks for the amazing package!
I successfully managed to run spectra on a few datasets and I was eager to calculate the importance and information scores for the factors that spectra found. However, while reading the utils functions it was not immediately clear how to use these functions to calculate the scores for each factor:
- There is no mention of an importance score function, am I right to assume that this is calculated with the
holdout_loss() function? For this function I am unsure what cell_type and labels arguments should contain. The lines below suggest that there should be a loop over each unique cell_type, where labels is an array of the the cell_type annotations for each cell. Am I correct that this loop missing from the current code?
|
# loop through cell types and evaluate loss at every cell type |
|
X_c = X[labels == cell_type] |
- The get_information_score returns and empty list because of the commented out code. In here the
labels parameter is missing as mentioned in the #todo
|
# TODO: Fix undefined "labels" variable |
Islabels the supposed to contain the same array of cell_type annotations as in holdout_loss()?
In #24 (comment) it is mentioned that an example would be added to the tutorial, but I have not found it there. Ideally I would like to make a figure similar to "Extended Data Fig. 6a".
Any help would be greatly appreciated.
Thanks for the amazing package!
I successfully managed to run spectra on a few datasets and I was eager to calculate the importance and information scores for the factors that spectra found. However, while reading the utils functions it was not immediately clear how to use these functions to calculate the scores for each factor:
holdout_loss()function? For this function I am unsure whatcell_typeandlabelsarguments should contain. The lines below suggest that there should be a loop over each unique cell_type, wherelabelsis an array of the the cell_type annotations for each cell. Am I correct that this loop missing from the current code?spectra/src/Spectra/Spectra_util.py
Line 371 in 474a3c7
spectra/src/Spectra/Spectra_util.py
Line 382 in 474a3c7
labelsparameter is missing as mentioned in the #todospectra/src/Spectra/Spectra_util.py
Line 428 in 474a3c7
labelsthe supposed to contain the same array of cell_type annotations as inholdout_loss()?In #24 (comment) it is mentioned that an example would be added to the tutorial, but I have not found it there. Ideally I would like to make a figure similar to "Extended Data Fig. 6a".
Any help would be greatly appreciated.