# Using an Opportunity Matrix to Select Centers for RBF Neural Networks
## 2 Materials and Methods
### The Opportunity Matrix RBF Center Selection Algorithm  
Having related the foundational concepts underlying the opportunity matrix and its use, we are now properly equipped to proceed with a complete description of the opportunity matrix RBF center selection algorithm. In what follows, the steps in the Algorithm 1 are described textually rather than symbolically in order to ensure clarity, as well as to allow for additional commentary. ```
1. Identify the range of values for each input feature in the training data. 2 Choose the number of equidistantly spaced intervals into which the range of values for each input feature should be partitioned, and then use the results to construct a corresponding opportunity matrix (vide supra, Section 2.1). Alternatively, each feature may be partitioned using a quantile split in order to account for the distributional properties of its underlying data. Comments: As noted previously, the product of the number of partitions for each input feature defines the maximum number of RBF nodes that can potentially appear in the final RBF neural network, since only one RBF node may be derived from each element of the opportunity matrix. For example, a two-dimensional opportunity matrix with five partitions for each input feature would yield a maximum of \(5\,\times\,5\,=\,25\) RBF nodes, while a three-dimensional opportunity matrix with 100 partitions for each input feature would yield a maximum of \(100\,\times\,100\,\times\,100\,=\,1,000,000\) RBF nodes. The size of the opportunity matrix must therefore be chosen judiciously. Figure 5: Example of an opportunity matrix being used to iteratively select RBF node centers. ```
3 Compute the centroid for each matrix element's corresponding bounded region. 4 Take a reasonably sized sample of the training data. This can be done randomly or by using stratified random sampling [23]. Comments: If random sampling is used, the sample size should ideally be sufficiently large to ensure that the bounded region for each element in the opportunity matrix is likely to contain several input values. For example, many of the elements of a \(100~{}\times~{}100\) opportunity matrix would be empty if the sample data consisted of only 5000 cases, since the opportunity matrix itself would contain \(100~{}\times~{}100~{}=~{}10,000\) elements. From a practical perspective, the implications of an empty element in the opportunity matrix are simply that the element's corresponding location in the input space would never be chosen as the location for an RBF node center. The total size of the opportunity matrix should thus be considered carefully in light of the number of cases in the sample training data. If desired, stratified random sampling may be used to guarantee that each bounded region of the opportunity matrix contains one or more input values. 5 If this is the initial iteration: 1. Identify the center for the first RBF node and add the new node to the neural network structure. Comments: The initial center's location may be chosen randomly or by computing the centroid of the input features in the sample data. 2. Compute the global RBF width value to use for the initial iteration. Comments: Since Equation (2) presupposes the existence of multiple RBF nodes, the largest distance between the first RBF node's center and any of the input values in the sample data may be substituted for the \(d_{max}\) parameter in Equation (2) during the initial iteration. 6 Compute the weights for the current RBF neural network using the sample data. Comments: This can be accomplished either through direct calculation by using a pseudoinverse approach [5; 14], or via gradient descent [10; 15]. 7 If the stopping criterion has been met, then use the complete set of training data in conjunction with the current collection of RBF node centers and the current global width value to train the final neural network model. When training is complete, save the resulting final model and terminate.