Description Usage Arguments Value Author(s) Examples
Loads EEG data and writes cleaned data to an output directory
1 | train_model(DATtrain,LABtrain,DATval,LABval,featuredict,classifier="rf")
|
DATtrain |
Training feature values as produced by extract_features and split up by split_data |
LABtrain |
Training labels as derived from split_data |
DATval |
Validation feature values as produced by extract_features and split up by split_data |
LABval |
Validation labels as derived from split_data |
featuredict |
Dataframe with all overview of all available combinations of wavelet types, wavelet levels, extracted signal features, and aggregation type. |
classifier |
type of classification model, defaul is "rf" for random forrest. Alternative value could be "lg" for logistic regression |
|
classificiation performance in the validation set for each value of the hyperparameter |
|
classification model as produced by caret function train |
|
column indices of the DAT corresponding to the features used for the best model |
Vincent T van Hees
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## Not run:
data(data.eeg)
data(data.labels)
RDL = reformat_DATLAB(data.eeg,data.labels,aggregateperid=TRUE)
DAT = RDL$DAT
LAB = RDL$LAB
P = split_data(LAB,DAT,logfile = logfile,proto_i=1,split=c(2,2),
uselog = FALSE,logdur=10)
LABval = P$LABval;LABtest=P$LABtest;LABtrain=P$LABtrain
DATval=P$DATval;DATtest=P$DATtest;DATtrain=P$DATtrain
featuredict = create_featuredict(DAT)
mymodel = train_model(DATtrain,LABtrain,DATval,LABval,featuredict,classifier="rf")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.