Commit c70e033f authored by Weronika's avatar Weronika

fixed the merge conflict

parents 93375090 ccfea02a
...@@ -51,6 +51,9 @@ libdcdboperator_smoothing.$(LIBEXT): operators/smoothing/SmoothingOperator.o ope ...@@ -51,6 +51,9 @@ libdcdboperator_smoothing.$(LIBEXT): operators/smoothing/SmoothingOperator.o ope
libdcdboperator_regressor.$(LIBEXT): operators/regressor/RegressorOperator.o operators/regressor/RegressorConfigurator.o ../common/src/sensornavigator.o libdcdboperator_regressor.$(LIBEXT): operators/regressor/RegressorOperator.o operators/regressor/RegressorConfigurator.o ../common/src/sensornavigator.o
$(CXX) $(LIBFLAGS)$@ -o $@ $^ -L$(DCDBDEPLOYPATH)/lib/ -lboost_log -lboost_system -lboost_regex -lopencv_core -lopencv_ml $(CXX) $(LIBFLAGS)$@ -o $@ $^ -L$(DCDBDEPLOYPATH)/lib/ -lboost_log -lboost_system -lboost_regex -lopencv_core -lopencv_ml
libdcdboperator_classifier.$(LIBEXT): operators/regressor/RegressorOperator.o operators/regressor/ClassifierOperator.o operators/regressor/ClassifierConfigurator.o ../common/src/sensornavigator.o
$(CXX) $(LIBFLAGS)$@ -o $@ $^ -L$(DCDBDEPLOYPATH)/lib/ -lboost_log -lboost_system -lboost_regex -lopencv_core -lopencv_ml
libdcdboperator_clustering.$(LIBEXT): operators/clustering/ClusteringOperator.o operators/clustering/ClusteringConfigurator.o ../common/src/sensornavigator.o libdcdboperator_clustering.$(LIBEXT): operators/clustering/ClusteringOperator.o operators/clustering/ClusteringConfigurator.o ../common/src/sensornavigator.o
$(CXX) $(LIBFLAGS)$@ -o $@ $^ -L$(DCDBDEPLOYPATH)/lib/ -lboost_log -lboost_system -lboost_regex -lopencv_core -lopencv_ml $(CXX) $(LIBFLAGS)$@ -o $@ $^ -L$(DCDBDEPLOYPATH)/lib/ -lboost_log -lboost_system -lboost_regex -lopencv_core -lopencv_ml
......
...@@ -22,8 +22,9 @@ ...@@ -22,8 +22,9 @@
1. [Aggregator Plugin](#averagePlugin) 1. [Aggregator Plugin](#averagePlugin)
2. [Job Aggregator Plugin](#jobaveragePlugin) 2. [Job Aggregator Plugin](#jobaveragePlugin)
3. [Regressor Plugin](#regressorPlugin) 3. [Regressor Plugin](#regressorPlugin)
4. [Clustering Plugin](#clusteringPlugin) 4. [Classifier Plugin](#classifierPlugin)
5. [Tester Plugin](#testerPlugin) 5. [Clustering Plugin](#clusteringPlugin)
6. [Tester Plugin](#testerPlugin)
4. [Sink Plugins](#sinkplugins) 4. [Sink Plugins](#sinkplugins)
1. [File Sink Plugin](#filesinkPlugin) 1. [File Sink Plugin](#filesinkPlugin)
2. [Writing Plugins](#writingPlugins) 2. [Writing Plugins](#writingPlugins)
...@@ -869,6 +870,14 @@ Finally, the Regressor plugin supports the following additional REST API actions ...@@ -869,6 +870,14 @@ Finally, the Regressor plugin supports the following additional REST API actions
| train | Triggers a new training phase for the random forest model. Feature vectors are temporarily collected in-memory until _trainingSamples_ vectors are obtained. Until this moment, the old random forest model is still used to perform prediction. | train | Triggers a new training phase for the random forest model. Feature vectors are temporarily collected in-memory until _trainingSamples_ vectors are obtained. Until this moment, the old random forest model is still used to perform prediction.
| importances | Returns the sorted importance values for the input features, together with the respective labels, if available. | importances | Returns the sorted importance values for the input features, together with the respective labels, if available.
## Classifier Plugin <a name="classifierPlugin"></a>
The _Classifier_ plugin, as the name implies, performs machine learning classification. It is based on the Regressor plugin, and as such it also uses OpenCV random forest models. The plugin supplies the same options and has the same behavior as the Regressor plugin, with the following two exceptions:
* The _target_ parameter here indicates a sensor which stores the labels (as numerical integer identifiers) to be used for training and on which classification will be based. The mapping from the integer labels to their text equivalent is left to the users. Moreover, unlike in the
Regressor plugin, the target sensor is always excluded from the feature vectors.
* The _targetDistance_ parameter is not used here, as it is only meaningful for regression.
## Clustering Plugin <a name="clusteringPlugin"></a> ## Clustering Plugin <a name="clusteringPlugin"></a>
The _Clustering_ plugin implements a gaussian mixture model for performance variation analysis and outlier detection. The plugin is based on the OpenCV library, similarly to the _Regressor_ plugin. The _Clustering_ plugin implements a gaussian mixture model for performance variation analysis and outlier detection. The plugin is based on the OpenCV library, similarly to the _Regressor_ plugin.
......
template_classifier def1 {
interval 1000
minValues 1
duplicate false
streaming true
window 10000
trainingSamples 3600
}
classifier clf1 {
default def1
window 20000
input {
sensor "<bottomup 1>ctxt"
sensor "<bottomup 1>Active"
sensor "<bottomup>col_user"
sensor "<bottomup>col_system"
sensor "<bottomup>branch_misses"
; This is a sensor containing the labels to be used for training
sensor "<bottomup 1>healthy" {
target true
}
}
output {
sensor "<bottomup 1>healthy_pred" {
mqttsuffix /healthyPred
}
}
}
\ No newline at end of file
...@@ -226,6 +226,14 @@ public: ...@@ -226,6 +226,14 @@ public:
*/ */
virtual void clearUnits() = 0; virtual void clearUnits() = 0;
/**
* @brief Returns the number of messages this operator will
* generate per second
*
* This method must be implemented in derived classes.
*/
virtual float getMsgRate() = 0;
/** /**
* @brief Performs an on-demand compute task * @brief Performs an on-demand compute task
* *
......
...@@ -205,6 +205,19 @@ public: ...@@ -205,6 +205,19 @@ public:
*/ */
virtual void clearUnits() override { _units.clear(); _baseUnits.clear(); _unitID = -1; } virtual void clearUnits() override { _units.clear(); _baseUnits.clear(); _unitID = -1; }
/**
* @brief Returns the number of messages this operator will
* generate per second
*
* @return Messages/s
*/
virtual float getMsgRate() override {
float msgRate = 0;
for (const auto &u : _units) {
msgRate += (float)u->getBaseOutputs().size() * (1000.0f / (float)_interval) / (float)_minValues;
}
return msgRate;
}
/** /**
* @brief Initializes this operator * @brief Initializes this operator
......
...@@ -40,7 +40,7 @@ class AggregatorConfigurator : virtual public OperatorConfiguratorTemplate<Aggre ...@@ -40,7 +40,7 @@ class AggregatorConfigurator : virtual public OperatorConfiguratorTemplate<Aggre
public: public:
AggregatorConfigurator(); AggregatorConfigurator();
~AggregatorConfigurator(); virtual ~AggregatorConfigurator();
private: private:
void sensorBase(AggregatorSensorBase& s, CFG_VAL config) override; void sensorBase(AggregatorSensorBase& s, CFG_VAL config) override;
......
...@@ -40,7 +40,7 @@ class JobAggregatorConfigurator : public JobOperatorConfiguratorTemplate<JobAggr ...@@ -40,7 +40,7 @@ class JobAggregatorConfigurator : public JobOperatorConfiguratorTemplate<JobAggr
public: public:
JobAggregatorConfigurator(); JobAggregatorConfigurator();
~JobAggregatorConfigurator(); virtual ~JobAggregatorConfigurator();
private: private:
void sensorBase(AggregatorSensorBase& s, CFG_VAL config) override; void sensorBase(AggregatorSensorBase& s, CFG_VAL config) override;
......
...@@ -40,7 +40,7 @@ class ClusteringConfigurator : virtual public OperatorConfiguratorTemplate<Clust ...@@ -40,7 +40,7 @@ class ClusteringConfigurator : virtual public OperatorConfiguratorTemplate<Clust
public: public:
ClusteringConfigurator(); ClusteringConfigurator();
~ClusteringConfigurator(); virtual ~ClusteringConfigurator();
private: private:
void sensorBase(ClusteringSensorBase& s, CFG_VAL config) override; void sensorBase(ClusteringSensorBase& s, CFG_VAL config) override;
......
...@@ -41,7 +41,7 @@ class FilesinkConfigurator : virtual public OperatorConfiguratorTemplate<Filesin ...@@ -41,7 +41,7 @@ class FilesinkConfigurator : virtual public OperatorConfiguratorTemplate<Filesin
public: public:
FilesinkConfigurator(); FilesinkConfigurator();
~FilesinkConfigurator(); virtual ~FilesinkConfigurator();
private: private:
void sensorBase(FilesinkSensorBase& s, CFG_VAL config) override; void sensorBase(FilesinkSensorBase& s, CFG_VAL config) override;
......
...@@ -51,7 +51,7 @@ PerSystSqlOperator::PerSystSqlOperator(const std::string& name) : ...@@ -51,7 +51,7 @@ PerSystSqlOperator::PerSystSqlOperator(const std::string& name) :
OperatorTemplate(name), JobOperatorTemplate(name), _number_of_even_quantiles( OperatorTemplate(name), JobOperatorTemplate(name), _number_of_even_quantiles(
0), _severity_formula(NOFORMULA), _severity_threshold(0), _severity_exponent( 0), _severity_formula(NOFORMULA), _severity_threshold(0), _severity_exponent(
0), _severity_max_memory(0), _go_back_ns(0), _backend(DEFAULT), _scaling_factor( 0), _severity_max_memory(0), _go_back_ns(0), _backend(DEFAULT), _scaling_factor(
1), _property_id(0) { 1), _searchedOnceForMetaData(false), _property_id(0) {
_persystdb = MariaDB::getInstance(); _persystdb = MariaDB::getInstance();
} }
...@@ -90,6 +90,7 @@ void PerSystSqlOperator::copy(const PerSystSqlOperator& other){ ...@@ -90,6 +90,7 @@ void PerSystSqlOperator::copy(const PerSystSqlOperator& other){
this->_conn.user = other._conn.user; this->_conn.user = other._conn.user;
this->_property_id = other._property_id; this->_property_id = other._property_id;
this->_persystdb = other._persystdb; this->_persystdb = other._persystdb;
this->_searchedOnceForMetaData = other._searchedOnceForMetaData;
} }
void PerSystSqlOperator::printConfig(LOG_LEVEL ll) { void PerSystSqlOperator::printConfig(LOG_LEVEL ll) {
...@@ -147,20 +148,27 @@ void PerSystSqlOperator::compute(U_Ptr unit, qeJobData& jobData) { ...@@ -147,20 +148,27 @@ void PerSystSqlOperator::compute(U_Ptr unit, qeJobData& jobData) {
uint64_t jobEnd = jobData.endTime != 0 && my_timestamp > jobData.endTime ? jobData.endTime : my_timestamp; uint64_t jobEnd = jobData.endTime != 0 && my_timestamp > jobData.endTime ? jobData.endTime : my_timestamp;
uint64_t jobStart = jobEnd - my_timestamp < jobData.startTime ? jobData.startTime : jobEnd - my_timestamp; uint64_t jobStart = jobEnd - my_timestamp < jobData.startTime ? jobData.startTime : jobEnd - my_timestamp;
// Job units are hierarchical, and thus we iterate over all sub-units associated to each single node // Job units are hierarchical, and thus we iterate over all sub-units associated to each single node
std::vector<std::string> vectorOfSensorNames;
for (const auto& subUnit : unit->getSubUnits()) { for (const auto& subUnit : unit->getSubUnits()) {
// Since we do not clear the internal buffer, all sensor readings will be accumulated in the same vector // Since we do not clear the internal buffer, all sensor readings will be accumulated in the same vector
for (const auto& in : subUnit->getInputs()) { for (const auto& in : subUnit->getInputs()) {
if( _scaling_factor == 1){ if(!_searchedOnceForMetaData){
SensorMetadata buffer; SensorMetadata buffer;
if(_queryEngine.queryMetadata(in->getName(), buffer) && buffer.getScale()){ if(_queryEngine.queryMetadata(in->getName(), buffer) && buffer.getScale()){
_scaling_factor = *buffer.getScale(); _scaling_factor = *buffer.getScale();
LOG(debug) << "PerSystSql Operator " << _name << " using scaling factor of " << _scaling_factor; LOG(debug) << "PerSystSql Operator " << _name << " using scaling factor of " << _scaling_factor;
_searchedOnceForMetaData = true;
} }
} }
if (!_queryEngine.querySensor(in->getName(), my_timestamp, my_timestamp, _buffer, false)) { vectorOfSensorNames.push_back(in->getName());
//LOG(debug)<< "PerSystSql Operator " << _name << " cannot read from sensor " << in->getName() << "!";
} }
} }
if(vectorOfSensorNames.size() == 0 ){
LOG(debug) << "PerSystSql Operator: No names found for vectorOfSensorNames ";
return;
}
if (!_queryEngine.querySensor(vectorOfSensorNames, my_timestamp, my_timestamp, _buffer, false)) {
LOG(debug)<< "PerSystSql Operator " << _name << " cannot read vector sensor " << (*vectorOfSensorNames.begin()) << "!";
} }
uint64_t measurement_ts = 0; uint64_t measurement_ts = 0;
if(_buffer.size() == 0){ if(_buffer.size() == 0){
......
...@@ -145,6 +145,7 @@ private: ...@@ -145,6 +145,7 @@ private:
int _go_back_ns; int _go_back_ns;
Backend_t _backend; Backend_t _backend;
double _scaling_factor; double _scaling_factor;
bool _searchedOnceForMetaData;
struct MariaDB_conn_t { struct MariaDB_conn_t {
std::string host; std::string host;
......
//================================================================================
// Name : ClassifierConfigurator.cpp
// Author : Alessio Netti
// Contact : info@dcdb.it
// Copyright : Leibniz Supercomputing Centre
// Description :
//================================================================================
//================================================================================
// This file is part of DCDB (DataCenter DataBase)
// Copyright (C) 2019-2019 Leibniz Supercomputing Centre
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
//================================================================================
#include "ClassifierConfigurator.h"
ClassifierConfigurator::ClassifierConfigurator() {
_operatorName = "classifier";
_baseName = "sensor";
}
ClassifierConfigurator::~ClassifierConfigurator() {}
void ClassifierConfigurator::sensorBase(RegressorSensorBase& s, CFG_VAL config) {
BOOST_FOREACH(boost::property_tree::iptree::value_type &val, config)
{
if (boost::iequals(val.first, "target")) {
s.setTrainingTarget(to_bool(val.second.data()));
std::string opName = val.second.data();
}
}
}
void ClassifierConfigurator::operatorAttributes(ClassifierOperator& op, CFG_VAL config) {
BOOST_FOREACH(boost::property_tree::iptree::value_type &val, config)
{
if (boost::iequals(val.first, "trainingSamples"))
op.setTrainingSamples(stoull(val.second.data()));
else if(boost::iequals(val.first, "window"))
op.setAggregationWindow(stoull(val.second.data()) * 1000000);
else if(boost::iequals(val.first, "inputPath"))
op.setInputPath(val.second.data());
else if(boost::iequals(val.first, "outputPath"))
op.setOutputPath(val.second.data());
else if(boost::iequals(val.first, "getImportances"))
op.setComputeImportances(to_bool(val.second.data()));
}
}
bool ClassifierConfigurator::unit(UnitTemplate<RegressorSensorBase>& u) {
if(u.isTopUnit()) {
LOG(error) << " " << _operatorName << ": This operator type only supports flat units!";
return false;
}
bool targetSet=false;
for(const auto& in : u.getInputs())
if(in->getTrainingTarget()) {
if(!targetSet)
targetSet = true;
else {
LOG(error) << _operatorName << ": Only one classification target can be specified!";
return false;
}
}
if(!targetSet) {
LOG(error) << " " << _operatorName << ": No classification target was specified!";
return false;
}
if(u.getOutputs().size()!=1) {
LOG(error) << " " << _operatorName << ": Only one output sensor per unit is allowed!";
return false;
}
return true;
}
\ No newline at end of file
//================================================================================
// Name : ClassifierConfigurator.h
// Author : Alessio Netti
// Contact : info@dcdb.it
// Copyright : Leibniz Supercomputing Centre
// Description :
//================================================================================
//================================================================================
// This file is part of DCDB (DataCenter DataBase)
// Copyright (C) 2019-2019 Leibniz Supercomputing Centre
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
//================================================================================
#ifndef PROJECT_CLASSIFIERCONFIGURATOR_H
#define PROJECT_CLASSIFIERCONFIGURATOR_H
#include "../../includes/OperatorConfiguratorTemplate.h"
#include "ClassifierOperator.h"
/**
* @brief Configurator for the classifier plugin.
*
* @ingroup classifier
*/
class ClassifierConfigurator : virtual public OperatorConfiguratorTemplate<ClassifierOperator, RegressorSensorBase> {
public:
ClassifierConfigurator();
virtual ~ClassifierConfigurator();
private:
void sensorBase(RegressorSensorBase& s, CFG_VAL config) override;
void operatorAttributes(ClassifierOperator& op, CFG_VAL config) override;
bool unit(UnitTemplate<RegressorSensorBase>& u) override;
};
extern "C" OperatorConfiguratorInterface* create() {
return new ClassifierConfigurator;
}
extern "C" void destroy(OperatorConfiguratorInterface* c) {
delete c;
}
#endif //PROJECT_CLASSIFIERCONFIGURATOR_H
//================================================================================
// Name : ClassifierOperator.cpp
// Author : Alessio Netti
// Contact : info@dcdb.it
// Copyright : Leibniz Supercomputing Centre
// Description :
//================================================================================
//================================================================================
// This file is part of DCDB (DataCenter DataBase)
// Copyright (C) 2019-2019 Leibniz Supercomputing Centre
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
//================================================================================
#include "ClassifierOperator.h"
ClassifierOperator::ClassifierOperator(const std::string& name) : OperatorTemplate(name), RegressorOperator(name) {
_targetDistance = 0;
_includeTarget = false;
}
ClassifierOperator::ClassifierOperator(const ClassifierOperator& other) : OperatorTemplate(other), RegressorOperator(other) {
_targetDistance = 0;
_includeTarget = false;
}
ClassifierOperator::~ClassifierOperator() {}
void ClassifierOperator::printConfig(LOG_LEVEL ll) {
LOG_VAR(ll) << " Window: " << _aggregationWindow;
LOG_VAR(ll) << " Training Sample: " << _trainingSamples;
LOG_VAR(ll) << " Input Path: " << (_modelIn!="" ? _modelIn : std::string("none"));
LOG_VAR(ll) << " Output Path: " << (_modelOut!="" ? _modelOut : std::string("none"));
LOG_VAR(ll) << " Importances: " << (_importances ? "enabled" : "disabled");
OperatorTemplate<RegressorSensorBase>::printConfig(ll);
}
void ClassifierOperator::compute(U_Ptr unit) {
computeFeatureVector(unit);
if (_trainingPending && _streaming) {
if (!_trainingSet)
_trainingSet = new cv::Mat();
if (!_responseSet)
_responseSet = new cv::Mat();
_trainingSet->push_back(*_currentfVector);
// Using an int instead of a float for the responses makes OpenCV interpret the variable as categorical
_currentClass = (int)_currentTarget;
_responseSet->push_back(_currentClass);
if ((uint64_t)_trainingSet->size().height >= _trainingSamples + _targetDistance)
trainRandomForest();
}
if(_rForest.empty() || !(_rForest->isTrained() || (_trainingPending && _streaming)))
throw std::runtime_error("Operator " + _name + ": cannot perform prediction, the model is untrained!");
if(_rForest->isTrained()) {
reading_t predict;
predict.value = (int64_t) _rForest->predict(*_currentfVector);
predict.timestamp = getTimestamp();
unit->getOutputs()[0]->storeReading(predict);
}
}
//================================================================================
// Name : ClassifierOperator.h
// Author : Alessio Netti
// Contact : info@dcdb.it
// Copyright : Leibniz Supercomputing Centre
// Description :
//================================================================================
//================================================================================
// This file is part of DCDB (DataCenter DataBase)
// Copyright (C) 2019-2019 Leibniz Supercomputing Centre
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
//================================================================================
#ifndef PROJECT_CLASSIFIEROPERATOR_H
#define PROJECT_CLASSIFIEROPERATOR_H
#include "RegressorOperator.h"
/**
* @brief Classifier operator plugin.
*
* @ingroup classifier
*/
class ClassifierOperator : virtual public RegressorOperator {
public:
ClassifierOperator(const std::string& name);
ClassifierOperator(const ClassifierOperator& other);
virtual ~ClassifierOperator();
void printConfig(LOG_LEVEL ll) override;
protected:
void compute(U_Ptr unit) override;
int _currentClass;
};
#endif //PROJECT_CLASSIFIEROPERATOR_H
\ No newline at end of file
...@@ -40,11 +40,11 @@ class RegressorConfigurator : virtual public OperatorConfiguratorTemplate<Regres ...@@ -40,11 +40,11 @@ class RegressorConfigurator : virtual public OperatorConfiguratorTemplate<Regres
public: public:
RegressorConfigurator(); RegressorConfigurator();
~RegressorConfigurator(); virtual ~RegressorConfigurator();
private: private:
void sensorBase(RegressorSensorBase& s, CFG_VAL config) override; void sensorBase(RegressorSensorBase& s, CFG_VAL config) override;
void operatorAttributes(RegressorOperator& op, CFG_VAL config) override; virtual void operatorAttributes(RegressorOperator& op, CFG_VAL config) override;
bool unit(UnitTemplate<RegressorSensorBase>& u) override; bool unit(UnitTemplate<RegressorSensorBase>& u) override;
}; };
......
...@@ -35,6 +35,7 @@ RegressorOperator::RegressorOperator(const std::string& name) : OperatorTemplate ...@@ -35,6 +35,7 @@ RegressorOperator::RegressorOperator(const std::string& name) : OperatorTemplate
_trainingSamples = 256; _trainingSamples = 256;
_trainingPending = true; _trainingPending = true;
_importances = false; _importances = false;
_includeTarget = true;
_trainingSet = nullptr; _trainingSet = nullptr;
_responseSet = nullptr; _responseSet = nullptr;
_currentfVector = nullptr; _currentfVector = nullptr;
...@@ -47,6 +48,7 @@ RegressorOperator::RegressorOperator(const RegressorOperator& other) : OperatorT ...@@ -47,6 +48,7 @@ RegressorOperator::RegressorOperator(const RegressorOperator& other) : OperatorT
_targetDistance = other._targetDistance; _targetDistance = other._targetDistance;
_trainingSamples = other._trainingSamples; _trainingSamples = other._trainingSamples;
_importances = other._importances; _importances = other._importances;
_includeTarget = true;
_trainingPending = true; _trainingPending = true;
_trainingSet = nullptr;