Description Usage Arguments Value Author(s) Examples
Feature predictive power will be calculated for all features contained in a dataset along with the outcome feature. Works for binary classification, multi-class classification and regression problems. Can also be used when exploring a feature of interest to determine correlations of independent features with the outcome feature. When the outcome feature is continuous of nature or is a regression problem, correlation calculations are performed. When the outcome feature is categorical of nature or is a classification problem, the Kolmogorov Smirnov distance measure is used to determine predictive power. For multi-class classification outcomes, a one vs all approach is taken which is then averaged to arrive at the mean KS distance measure. The predictive power is sensitive towards the manner in which the data has been prepared and will differ should the manner in which the data has been prepared changes.
1 | predictivePower(x, y, outcomeType = "automatic")
|
x |
[data.frame | Required] Dataset which should contain the outcome feature. If x is not a data.frame object it will be converted to one. |
y |
[character | Required] The name of the outcome feature contained in the dataset specified in x. |
outcomeType |
[character | Optional] The outcome type of the outcome feature specified in y. Available options are: automatic, binary (Binary classification), multi (Multi-class classification) and regression. For high cardinal categorical outcomes (>= 15), it is recommended to specify the outcome type manually. Defaults to automatic. |
Object of type data.frame containing all features and their respective predictive power.
Xander Horn
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | .-
# Classification example:
power <- predictivePower(x = iris,
y = "Species",
outcomeType = "automatic")
# Regression example:
power <- predictivePower(x = iris,
y = "Sepal.Length",
outcomeType = "automatic")
# Manually specifying outcome type example:
power <- predictivePower(x = iris,
y = "Sepal.Length",
outcomeType = "regression")
power <- predictivePower(x = iris,
y = "Species",
outcomeType = "multi")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.