Utilties to help build models, both in specific applications such as time series and text analysis, and in general tools..
qeCompare(data,yName,qeFtnList,nReps,opts=NULL,seed=9999)qeFT(data,yName,qeftn,pars,nCombs,nTst,nXval,showProgress=TRUE)qeText(data,yName,kTop=50,stopWords=tm::stopwords("english"), qeName,opts=NULL,holdout=floor(min(1000,0.1*nrow(data))))qeTS(lag,data,qeName,opts=NULL,holdout=floor(min(1000,0.1*length(data))))## S3 method for class 'qeText'predict(object,newDocs,...)## S3 method for class 'qeTS'predict(object,newx,...)
Arguments
...: Further arguments.
object: Object returned by a qe-series function.
newx: New data to be predicted.
newDocs: Vector of new documents to be predicted.
lag: number of recent values to use in predicting the next.
qeName: Name of qe-series predictive function, e.g. 'qeRF'.
stopWords: Stop lists to use.
nTst: Number of parameter combinations.
kTop: Number of most-frequent words to use.
data: Dataframe, training set. Classification case is signaled via labels column being an R factor.
yName: Name of the class labels column.
holdout: If not NULL, form a holdout set of the specified size. After fitting to the remaining data, evaluate accuracy on the test set.
qeFtnList: Character vector of qe* function names.
nReps: Number of holdout sets to generate.
opts: R list of optional arguments for none, some or all of th functions in qeFtnList.
seed: Seed for random number generation.
qeftn: Quoted string, specifying the name of a qe-series machine learning method.
pars: R list of hyperparameter ranges. See regtools::fineTuning.
nCombs: Number of hyperparameter combinations to run. See regtools::fineTuning.
nXval: Number of cross-validations to run. See regtools::fineTuning.
showProgress: If TRUE, show results as they arise. See regtools::fineTuning.
Details
Overviews of the functions:
qeTs is a tool for time series modeling
qeText is a tool for textual modeling
qeCompare facilitates comparison among models
qeFT does a random grid search for optimal hyperparameter values
Examples
data(mlb1)# predict Weight in the mlb1 dataset, using qeKNN, with k = 5 and 25,# with 10 cross-validationsqeFT(mlb1,'Weight','qeKNN',list(k=c(5,25)),nTst=100,nXval=10)