src/FitnessFunctions.cpp
void EchoBay::Comparator::set_targetLabel(const Eigen::Ref<const MatrixBO> label, const Eigen::Ref<const ArrayI8> sampleState)
{
    if (_problemType == "Classification")
    {
        _targetLabel = label;
        _nClasses = get_nClasses(_targetLabel);
    }
    else // Regression and Memory Capacity
    {
        // Count columns of output
        _outCols = label.cols();

        // Copy data in realOut
        _targetLabel.resize(sampleState.count(), _outCols);
        int outRows = 0;
        for (int s = 0; s < sampleState.rows(); s++)
        {
            if (sampleState(s) != 0)
            {
                _targetLabel.row(outRows) = label.row(s);
                outRows++;
            }
        }
    }
}
/**
 * @brief Set internal targetLabel according to Comparator problemType
 * 
 * Classification problems use the same label and then calculate the number of classes.
 * Regression and MemoryCapacity problems resize targetLabel and manage washout samples
 * 
 * @param label Eigen Matrix containing the desired target label
 * @param sampleState Eigen Array containing the sampling index to manage ESN washout
 * see also EchoBay::DataStorage::set_sampleArray(Eigen::Ref<MatrixBO> samplingData, int nWashout, bool init_flag, const std::string &problemType, const std::string type)
 */
@brief Set internal targetLabel according to Comparator problemType

Classification problems use the same label and then calculate the number of classes.
Regression and MemoryCapacity problems resize targetLabel and manage washout samples


@brief Set internal targetLabel according to Comparator problemType Classification problems use the same label and then calculate the number of classes . Regression and MemoryCapacity problems resize targetLabel and manage washout samples
void EchoBay::Comparator::set_targetLabel(const Eigen::Ref<const MatrixBO> label, const Eigen::Ref<const ArrayI8> sampleState)
{
    if (_problemType == "Classification")
    {
        _targetLabel = label;
        _nClasses = get_nClasses(_targetLabel);
    }
    else 
    {
        _outCols = label.cols();
        _targetLabel.resize(sampleState.count(), _outCols);
        int outRows = 0;
        for (int s = 0; s < sampleState.rows(); s++)
        {
            if (sampleState(s) != 0)
            {
                _targetLabel.row(outRows) = label.row(s);
                outRows++;
            }
        }
    }
}
void EchoBay :: Comparator :: set_targetLabel ( const Eigen :: Ref < const MatrixBO > label , const Eigen :: Ref < const ArrayI8 > sampleState ) { if ( _problemType == " " ) { _targetLabel = label ; _nClasses = get_nClasses ( _targetLabel ) ; } else { _outCols = label . cols ( ) ; _targetLabel . resize ( sampleState . count ( ) , _outCols ) ; int outRows = 0 ; for ( int s = 0 ; s < sampleState . rows ( ) ; s ++ ) { if ( sampleState ( s ) != 0 ) { _targetLabel . row ( outRows ) = label . row ( s ) ; outRows ++ ; } } } }
@brief Set internal targetLabel according to Comparator problemType
@brief Set internal targetLabel according to Comparator problemType
// Regression and Memory Capacity // Count columns of output // Copy data in realOut