📄 redundancy.hpp
字号:
/*
This file is part of Orange.
Orange 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.
Orange 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 Orange; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Authors: Janez Demsar, Blaz Zupan, 1996--2002
Contact: janez.demsar@fri.uni-lj.si
*/
#ifndef __REDUNDANCY_HPP
#define __REDUNDANCY_HPP
WRAPPER(Discretization)
WRAPPER(MeasureAttribute)
WRAPPER(FeatureInducer)
class ORANGE_API TRemoveRedundant : public TOrange {
public:
__REGISTER_ABSTRACT_CLASS
bool keepValues; //P keep an attribute if number values is only smaller, not one
TRemoveRedundant(bool akeep=false);
virtual PDomain operator()(PExampleGenerator gen, PVarList suspicious=PVarList(), PExampleGenerator *nonRedundantResult=NULL, int aweightID=0)=0;
};
class ORANGE_API TRemoveRedundantByInduction : public TRemoveRedundant {
public:
__REGISTER_CLASS
PFeatureInducer featureReducer; //P feature construction algorithm
PMeasureAttribute measure; //P measure for initial ordering of attributes
PDiscretization discretization; //P discretization method
TRemoveRedundantByInduction(bool akeepValues=false);
virtual PDomain operator()(PExampleGenerator gen, PVarList suspicious=PVarList(), PExampleGenerator *nonRedundantResult=NULL, int aweightID=0);
};
class ORANGE_API TRemoveRedundantByQuality : public TRemoveRedundant {
public:
__REGISTER_CLASS
bool remeasure; //P reapply the measure after removal
float minQuality; //P minimal acceptable quality
int removeBut; //P the desired number of attributes
PMeasureAttribute measure; //P attribute quality measure
TRemoveRedundantByQuality(bool aremeasure=false);
virtual PDomain operator()(PExampleGenerator gen, PVarList suspicious=PVarList(), PExampleGenerator *nonRedundantResult=NULL, int aweightID=0);
};
class ORANGE_API TRemoveRedundantOneValue : public TRemoveRedundant {
public:
__REGISTER_CLASS
bool onData; //P observe the actual number of value on the data (not on attribute definitions)
TRemoveRedundantOneValue(bool anOnData=true);
virtual PDomain operator()(PExampleGenerator gen, PVarList suspicious=PVarList(), PExampleGenerator *nonRedundantResult=NULL, int aweightID=0);
};
/*
class ORANGE_API TRemoveNonexistentValues : public TRemoveRedundant {
public:
_ _ R E G I S T E R _ C L A S S
virtual PDomain operator()(PExampleGenerator gen, PVarList suspicious=PVarList(), PExampleGenerator *nonRedundantResult=NULL, int aweightID=0);
};
*/
class ORANGE_API TRemoveUnusedValues : public TOrange {
public:
__REGISTER_CLASS
TRemoveUnusedValues(bool = false);
bool removeOneValued; //P if true (default is false), one valued attributes are also removed
virtual PVariable operator()(PVariable, PExampleGenerator, const int &);
PDomain operator ()(PExampleGenerator gen, const int &weightID, bool checkClass = false, bool checkMetas = true);
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -