⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rulebasedclassifier.cpp

📁 粗慥集成算法集合 ,并有详细的文档资料和测试数据处
💻 CPP
字号:
//-------------------------------------------------------------------
// Author........: Aleksander 豩rn
// Date..........: 9608/9609
// Description...:
// Revisions.....:
//===================================================================

#include <stdafx.h> // Precompiled headers.
#include <copyright.h>

#include <kernel/algorithms/rulebasedclassifier.h>
#include <kernel/algorithms/keyword.h>

#include <kernel/structures/decisiontable.h>
#include <kernel/structures/dictionary.h>

#include <kernel/basic/message.h>

#include <common/objectmanager.h>

//-------------------------------------------------------------------
// Methods for class RuleBasedClassifier.
//===================================================================

//-------------------------------------------------------------------
// Constructors/destructor.
//===================================================================

//-------------------------------------------------------------------
// Method........: Constructor
// Author........: Aleksander 豩rn
// Date..........:
// Description...:
// Comments......:
// Revisions.....:
//===================================================================

RuleBasedClassifier::RuleBasedClassifier() {
}

//-------------------------------------------------------------------
// Method........: Destructor
// Author........: Aleksander 豩rn
// Date..........:
// Description...:
// Comments......:
// Revisions.....:
//===================================================================

RuleBasedClassifier::~RuleBasedClassifier() {
}

//-------------------------------------------------------------------
// Methods inherited from Identifier.
//===================================================================

IMPLEMENTIDMETHODS(RuleBasedClassifier, RULEBASEDCLASSIFIER, Classifier)

//-------------------------------------------------------------------
// Methods inherited from Algorithm.
//===================================================================

//-------------------------------------------------------------------
// Method........: GetParameters
// Author........: Aleksander 豩rn
// Date..........:
// Description...:
// Comments......: Abstract, can only be called from subclasses.
// Revisions.....:
//===================================================================

String
RuleBasedClassifier::GetParameters() const {

	String parameters;

	parameters += Keyword::Rules();
	parameters += Keyword::Assignment();

	if (GetRules() != NULL)
		parameters += GetRules()->GetName();
	else
		parameters += "NULL";

	return parameters;

}

//-------------------------------------------------------------------
// Method........: SetParameter
// Author........: Aleksander 豩rn
// Date..........:
// Description...:
// Comments......: Abstract, can only be called from subclasses.
// Revisions.....:
//===================================================================

bool
RuleBasedClassifier::SetParameter(const String &keyword, const String &/*value*/) {

	// Rules cannot be set this way.
	if (keyword == Keyword::Rules())
		return false;

	// Unknown keyword or illegal value.
	return false;

}

//-------------------------------------------------------------------
// Methods inherited from Classifier.
//===================================================================

//-------------------------------------------------------------------
// Method........: IsCompatible
// Author........: Aleksander 豩rn
// Date..........:
// Description...:
// Comments......: Does a very crude check of the applicability of the
//                 rules to inf. vectors extracted from the given
//                 decision table.
//
// Revisions.....: A

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -