# How do I compute the correlation between two features and their output class?

I just read these two quotes in a paper and wondered how I do this.

For each classifier, one selects a subset of the input features according to their correlation to the corresponding class.

and

Compute the correlation between each feature and Yi the output for class i.

Can you tell me how to accomplish that?

This is called correlation filter. If you are using R, You can have a look at FSelector package's linear.correlation and rank.correlation functions. When class labels are categorical, you can use Point-Biserial Correlation, polyserial or polychloric correlation.