extract_features: Extract features from neuronlist

View source: R/extractor.R

extract_featuresR Documentation

Extract features from neuronlist

Description

extract features from a neuronlist

Usage

extract_features(
  neurons_list,
  features_list = NULL,
  y = NULL,
  to_numeric = FALSE,
  normalise = c("none", "zscore", "scale"),
  split_proportion = NULL,
  remove_nas = TRUE,
  n_jobs = 1
)

## S3 method for class 'neuronlist'
extract_features(
  neurons_list,
  features_list = NULL,
  y = NULL,
  to_numeric = FALSE,
  normalise = c("none", "zscore", "scale"),
  split_proportion = NULL,
  remove_nas = TRUE,
  ...
)

Arguments

neurons_list

neuronlist of neurons (nat)

features_list

list with feature names of functions that generate them

y

target class (can be character of function), will be added as column "Y" if name is NULL.

to_numeric

flag that says whether all factor/ character features are meant to be transformed to numeric (default: F)

normalise

what normalization to use

split_proportion

if numeric then it splits dataset into train test. The number should be a target proportion of test cases (although not guaranteed as it makes sure that there's at least one element per class).

remove_nas

flags whether to remove NAs or not

n_jobs

number of cores used to call a function feature extraction

...

extra arguments

Value

data frame with features

Examples

features_list <- list( "upstream", "downstream", "soma")
kc_train_features <- extract_features(
  kc_train,
  features_list = features_list,
  y = "type"
)

dokato/natML documentation built on Sept. 12, 2022, 6:04 a.m.