Description Usage Arguments Value
View source: R/make_feature_from_data_frame.R
Convert a data frame containing pairwise interactions, and a score or other data associated with each interaction, into a feature vector that matches the dimensions of a data frame used as input to a classifier, such as a naive Bayes, random forests, or support vector machine classifier.
1 2 | make_feature_from_data_frame(dat, target, dat_node_cols = c(1, 2),
target_node_cols = c(1, 2), feature_col = 3, default_value = NA)
|
dat |
a data frame containing pairwise interactions and a feature to be converted to a vector in a third column |
target |
the data frame of features that will be provided as input to a classifier |
dat_node_cols |
a vector of length two, denoting either the indices
(integer vector) or column names (character vector) of the columns within
the feature data frame; defaults to the first two columns of the data
frame ( |
target_node_cols |
a vector of length two, denoting either the indices
(integer vector) or column names (character vector) of the columns within
the target data frame; defaults to the first two columns of the data
frame ( |
feature_col |
the name or index of the column in the first data frame that contains a feature for each interaction |
default_value |
the default value for protein pairs that are not in the
first data frame (set, by default, to |
a vector matching the dimensions and order of the feature data frame, to use as input for a classifier in interaction prediction
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.