Classify samples output - feature_importance.qza

(Devon O'rourke) #1

:raised_hand: 2 Questions about the output of the classify samples scripts :raised_hand:

#1. The feature_importance.qza artifact produced after running classify samples consists of two columns: the ASV (feature) and “importance”.

Could someone point me in the direction of what this means (from the docs)?:

–o-feature-importance
Importance of each input feature to model accuracy.

I have a sense that this is providing me with an indication of which ASVs are more important at discriminating between the group(s) when the model is being built, but I was hoping to have a better understanding of how any such value is actually derived.


#2. Does anyone have a sense of how importance abundance information is? I’ve been playing with both rarefied and non rarefied data and it seems like:
a. Rarefied data has more ASVs with larger Importance values (per ASV) … and as a result …
b. There are fewer ASVs to provide, say, something like 50% of the overall Importance

In the example plots below, there are 4 different groups that I was investigating (the horizontal facets); the same data were analyzed using either rarefied data or unrarefied data. Same samples, same ASVs. What’s curious to me is how many more ASVs are part of the outcome in the unrarefied data; I’m struggling to grasp the meaning behind why so few ASVs provide a high level of discrimination among rarefied data yet not in unrarefied data… except… well apparently for the last factor (“batch”).

Thanks for the tips!

1 Like

(Nicholas Bokulich) #2

Bingo

assuming you are using random forests: https://scikit-learn.org/stable/modules/ensemble.html#feature-importance

This is so subjective I cannot answer. The model decides for itself based on the input data.

Yep, you rarefy and you lose those low-abundance ASVs, leading to a shorter tail of importance scores. More % variation is explained by a smaller number of features pretty much just because you have fewer features… note that in rarefying you may be losing some explanatory features.

I’d say stop worrying and just trust the machine :robot:

0 Likes

(Devon O'rourke) #3

@Nicholas_Bokulich
+1 :clap: for the help
+2 :clap:s for the program !

I would note that the plot above has nearly identical samples and ASVs. There are about 2500 ASVs and about 280 samples that were input to the sample classifier. The rarefied reads had 7 fewer samples and 84 less ASVs (and those ASVs represent just 0.03% of the total dataset read abundance).

What’s odd to me is how many more ASVs appear “important” at all in the unrarefied data. I wonder if the reason is that rarefying the data is basically flattening out the low abundant reads to the same value… making the variance in abundance much less, especially for low abundance reads.

The good news is that the ASVs at the top of the list are typically all the same whether the data is rarefied or not.

Thanks again !

0 Likes

(Nicholas Bokulich) #4

that is really what counts for your interpretation at the end of the day, and I would focus on that information.

:robot::robot::robot::robot::robot::robot:

0 Likes

(Devon O'rourke) #5

So many machines… :slot_machine:, :robot: , and Bert Kreischer.

Thanks for the help (as usual!) @Nicholas_Bokulich

1 Like