Implemented weight grabber.

This commit is contained in:
Andru Liu
2024-10-08 21:10:31 -07:00
parent 7548c26c04
commit c3be2c3010
+9
View File
@@ -72,3 +72,12 @@ void RBFModel::adapt(double error, double learningRate, const double* input) {
weights[i] += learningRate * error * influence; // Update weight based on error and influence
}
}
/**
* @brief Get the weight at a specific index.
*/
double RBFModel::get_weight(int index) const {
if (index < 0 || index >= numCenters) return 0.0;
return weights[index];
}