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