| ga_fsm-class {datafsm} | R Documentation |
An S4 class to return the results of using a GA to estimate a FSM with
evolve_model.
Description
An S4 class to return the results of using a GA to estimate a FSM with
evolve_model.
Turns ga_fsm S4 object into list of summaries for printing and then prints it.
Plots ga_fsm S4 object's state transition matrix
Plots ga_fsm S4 object's variable importances
Plots ga_fsm S4 object's variable importances
Extracts slot relevant to estimating the fsm
Extracts performance
Extracts slot of variable importances
Extracts slot of action_vec
Extracts number of states
Predicts new data with estimated model
Usage
## S4 method for signature 'ga_fsm'
print(x, ...)
## S4 method for signature 'ga_fsm'
show(object)
## S4 method for signature 'ga_fsm'
summary(object, digits = 3)
## S4 method for signature 'ga_fsm,ANY'
plot(x, y, maintitle = "Transition Diagram",
action_label = NULL, transition_label = NULL,
curvature = c(0.3, 0.6, 0.8))
## S4 method for signature 'ga_fsm'
barplot(height, ...)
## S4 method for signature 'ga_fsm'
dotchart(x, labels)
## S4 method for signature 'ga_fsm'
estimation_details(x)
## S4 method for signature 'ga_fsm'
best_performance(x)
## S4 method for signature 'ga_fsm'
varImp(x)
## S4 method for signature 'ga_fsm'
action_vec(x)
## S4 method for signature 'ga_fsm'
states(x)
## S4 method for signature 'ga_fsm'
predict(object, data, type = "prob", na.action = stats::na.omit, ...)
Arguments
x |
S4 ga_fsm object. @export |
... |
arguments to be passed to/from other methods. |
object |
S4 ga_fsm object |
digits |
Optional numeric vector length one for how many significant digits to print, default is 3. @export |
y |
not used. |
maintitle |
optional character vector |
action_label |
optional character vector same length as action vector, where each ith element corresponds to what that ith element in the action vector represents. This will be used to fill in the states (circles) of the state transition matrix to be plotted. |
transition_label |
optional character vector same length as number of columns of state transition matrix. |
curvature |
optional numeric vector specifying the curvature of the lines for a diagram of 2 or more states. |
height |
ga_fsm S4 object |
labels |
vector of labels for each point. For vectors the default is to use names(x) and for matrices the row labels dimnames(x)[[1]]. |
data |
A |
type |
Not currently used. |
na.action |
Optional function. |
Methods (by generic)
-
print: An S4 method for printing a ga_fsm S4 object -
show: An S4 method for showing a ga_fsm S4 object -
summary: An S4 method for summarizing a ga_fsm S4 object -
plot: -
barplot: -
dotchart: Plots ga_fsm S4 object's variable importances -
estimation_details: @export -
best_performance: @export -
varImp: @export -
action_vec: @export -
states: @export -
predict: Predicts new data with estimated model
Slots
callLanguage from the call of the function
evolve_model.actionsNumeric vector with the number of actions.
statesNumeric vector with the number of states.
GAS4 object created by ga() from the GA package.
state_matNumeric matrix with rows as states and columns as predictors.
action_vecNumeric vector indicating what action to take for each state.
predictiveNumeric vector of length one with test data accuracy if test data was supplied; otherwise, a character vector with a message that the user should provide test data for better estimate of performance.
varImpNumeric vector same length as number of columns of state matrix with relative importance scores for each predictor.
varImp2Numeric matrix same size as state matrix with relative importance scores for each transition.
timingNumeric vector length one with the total elapsed seconds it took
evolve_modelto execute.diagnosticsCharacter vector length one, to be printed with base::cat().