str.sivs | R Documentation |
This function shows the structure of a an object of either class "sivs" or "list" and shows the internal structure of the object in human-readable format. sivs object is a complex S3 object and it might be a deterrent to users to get to know if better. This function is aiming to facilitate the experience of user.
## S3 method for class 'sivs'
str(
object,
max_depth = 2,
max_leaves = 2,
max_width = options("width")$width,
...
)
object |
An object of class "sivs" or "list". |
max_depth |
A numerical value of length 1 indicating how many layers the function should dive into. |
max_leaves |
A numericl vector of length 1 indicating how many of the objects of each list should be shown. |
max_width |
A numerical vector of length 1 indicating the maximum width of the terminal that should be used by the function. If there are any lines larger than this value, they will be truncated. Default is the terminal size that is retuned by R. |
... |
potential further arguments (required for Method/Generic reasons). |
The function uses 'cat' to output general structure of sivs object in human readable format in a tree-like structure.
## WORKING EXAMPLE
## Note that this example does not logically make sense as iris data has only
## 4 columns and there is no need for SIVS to take care of feature selection
## therefore this example is only here for testing purposes.
tmp <- subset(x = iris, subset = Species != "setosa")
tmp <- varhandle::unfactor(tmp)
sivs_obj <- sivs(x = tmp[, c("Sepal.Length", "Sepal.Width",
"Petal.Length", "Petal.Width")],
y = factor(tmp$Species),
family = "binomial",
verbose = "detailed",
progressbar = FALSE,
nfolds = 3,
parallel.cores = FALSE,
iter.count = 20)
str(sivs_obj)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.