1/ Using random forest to calculate feature importance?
The importance score might be biased. #machinelearning #featureimportance Thanks @Matthew_N_B for pointing it out
A thread 👇
2/ explained.ai/rf-importance/

The takeaway from this article is that the most popular RF implementation in Python (scikit) and R's RF default importance strategy do not give reliable feature importances
3/
when “... potential predictor variables vary in their scale of measurement or their number of categories.” (Strobl et al). Rather than figuring out whether your data set conforms to one that gets accurate results, simply use permutation importance.
4/
You can either use our Python implementation (rfpimp via pip) or, if using R, make sure to use importance=T in the Random Forest constructor then type=1 in R's importance() function. mljar.com/blog/feature-i… Image

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Ming "Tommy" Tang

Ming

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @tangming2005

Jul 27
1/ "What's the most important factor for your success?"
2/ I have heard many answers.

The most common one I got is "luck".
3/ A little story:

Qi Lu was earning $27 a month when he was 27 years old. At 47, he was the president of Microsoft.
Read 9 tweets
Feb 25
1/ collecting scRNAseq data in the context of immunotherapy. I will share what I know here. welcome to contribute. nature.com/articles/s4159…
Read 12 tweets
Dec 14, 2021
1/ Different ways to read in all files into R. A thread:
2/ files<- as.list(dir(".", pattern= ".tsv"))
datlist <- lapply(files, function(f) {
dat = read.table(f, header =T, sep ="\t", quote = "\"")
dat$sample = gsub(".tsv", "", f)
return(dat)
})
data<- do.call(rbind, datlist)
Read 5 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(