Cascade-Correlation
This commit is contained in:
@@ -54,7 +54,7 @@ namespace NeuralNetwork {
|
||||
|
||||
std::cout << error << "\n";
|
||||
|
||||
if(_prunningStatus && error*1.01 >= lastError) { // it is not getting bettter
|
||||
if(_pruningStatus && error*_pruningLimit >= lastError) { // it is not getting bettter
|
||||
network.removeLastHiddenNeuron();
|
||||
error=lastError;
|
||||
std::cout << "PRUNED\n";
|
||||
@@ -93,12 +93,13 @@ namespace NeuralNetwork {
|
||||
return _epoch;
|
||||
}
|
||||
|
||||
void setPruningStatus(bool status) {
|
||||
_prunningStatus=status;
|
||||
void setPruningLimit(float limit) {
|
||||
_pruningStatus=true;
|
||||
_pruningLimit=limit;
|
||||
}
|
||||
|
||||
bool getPruningStatus() const {
|
||||
return _prunningStatus;
|
||||
bool getPruningLimit() const {
|
||||
return _pruningLimit;
|
||||
}
|
||||
|
||||
void setErrorThreshold(float err) {
|
||||
@@ -155,7 +156,8 @@ namespace NeuralNetwork {
|
||||
float _errorTreshold;
|
||||
float _weightRange;
|
||||
|
||||
bool _prunningStatus = false;
|
||||
bool _pruningStatus = false;
|
||||
float _pruningLimit=0.0;
|
||||
|
||||
std::size_t _epoch = 0;
|
||||
std::size_t _maxHiddenUnits = 20;
|
||||
|
||||
Reference in New Issue
Block a user