evolve_model
.R/class_def.R
ga_fsm-class.Rd
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
# S4 method for ga_fsm print(x, ...) # S4 method for ga_fsm show(object) # S4 method for ga_fsm summary(object, digits = 3) # S4 method for 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 ga_fsm barplot(height, ...) # S4 method for ga_fsm dotchart(x, labels) # S4 method for ga_fsm estimation_details(x) # S4 method for ga_fsm best_performance(x) # S4 method for ga_fsm varImp(x) # S4 method for ga_fsm action_vec(x) # S4 method for ga_fsm states(x) # S4 method for ga_fsm predict(object, data, type = "prob", na.action = stats::na.omit, ...)
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. |
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
call
Language from the call of the function evolve_model
.
actions
Numeric vector with the number of actions.
states
Numeric vector with the number of states.
GA
S4 object created by ga() from the GA package.
state_mat
Numeric matrix with rows as states and columns as predictors.
action_vec
Numeric vector indicating what action to take for each state.
predictive
Numeric 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.
varImp
Numeric vector same length as number of columns of state matrix with relative importance scores for each predictor.
varImp2
Numeric matrix same size as state matrix with relative importance scores for each transition.
timing
Numeric vector length one with the total elapsed seconds it took
evolve_model
to execute.
diagnostics
Character vector length one, to be printed with base::cat().