Learn R Programming

varSelRF (version 0.7-3)

basicClusterInit: Initialize a cluster of workstations

Description

Use Snow to initialize a cluster of workstations, with either MPI or PVM as the type of cluster, setup the random number generator, and load randomForest library in all the nodes.

Usage

basicClusterInit(clusterNumberNodes = 1, nameCluster = "TheCluster",
                 typeCluster = "MPI")

Arguments

clusterNumberNodes
The number of nodes in the cluster. If you only have 1 CPU you can pass a 1 here.
nameCluster
The name you want to give to the newly created cluster.
typeCluster
Either "MPI" or "PVM".

Value

  • This function is used to create a cluster. An object with name "nameCluster" with a reference to the cluster will be created. See makeCluster for details.

Details

This function is a wrapper to makeCluster with a little bit of additional code (load randomForest and varSelRF in all the nodes and initialize the random number generator). It can be used to initialize a cluster of workstations. It will be called by several other functions in the package if you ask that computations be done using a cluster and you do not specify a cluster name. In this case, a "dummy" cluster of only one node will be created. For this function to run you MUST have installed the following Rpackages: snow, Rmpi or rpvm, and rsprng. You might also need to start your cluster environment (e.g., "lamboot whatever.the.name.of.your.def.file" from a shell).

References

http://ligarto.org/rdiaz/Papers/rfVS/randomForestVarSel.html

See Also

makeCluster, randomVarImpsRF, varSelRFBoot

Examples

Run this code
## Create a simple cluster with only one slave node. Will work even
## in 1 CPU cases if you have the required packages.
basicClusterInit(clusterNumberNodes = 1,
                 nameCluster = "TheCluster",
                 typeCluster = "MPI")

Run the code above in your browser using DataLab