correlate {correlationfunnel}R Documentation

Correlate a response (target) to features in a data set.

Description

correlate returns a correlation between a target column and the features in a data set.

Usage

correlate(data, target, ...)

Arguments

data

A tibble or data.frame

target

The feature that contains the response (Target) that you want to measure relationship.

...

Other arguments passed to cor

Details

The correlate() function provides a convient wrapper around the cor function where the target is the column containing the Y variable. The function is intended to be used with binarize(), which enables creation of the binary correlation analysis, which is the feed data for the plot_correlation_funnel() visualization.

The default method is the Pearson correlation, which is the Correlation Coefficient from L. Duan et al., 2014. This represents the linear relationship between two dichotomous features (binary variables). Learn more about the binary correlation approach in the Vignette covering the Methodology, Key Considerations and FAQs.

Value

A tbl

References

Lian Duan, W. Nick Street, Yanchi Liu, Songhua Xu, and Brook Wu. 2014. Selecting the right correlation measure for binary data. ACM Trans. Knowl. Discov. Data 9, 2, Article 13 (September 2014), 28 pages. DOI: http://dx.doi.org/10.1145/2637484

See Also

binarize(), plot_correlation_funnel()

Examples

library(dplyr)
library(correlationfunnel)

marketing_campaign_tbl %>%
    select(-ID) %>%
    binarize() %>%
    correlate(TERM_DEPOSIT__yes)



[Package correlationfunnel version 0.2.0 Index]