?? readme
字號:
Version Space ProgramWelcome to the wonderful world of the Version Space C++directory. This program demonstrates refining boundaries in a versionspace given a bunch of examples. It is meant to be a companionto chapter 5 of the "Artificial Intelligence" textbook. Thiscode was written by Jon Monsarrat, jgm@cs.brown.edu.Five sections describe the program:1. The problem2. Building the program3. Making example files4. Running the program5. The solution, and how to read the source code----------------------------------------------------------------------1. The problemThe book goes into quite some detail about the problem, but here it isin a nutshell.We are given a version space consisting of two classes "yes" and "no".We are given several dimensions, each with an attribute and possiblevalues. We have several examples, each with values for all dimensionsand classifications.We would like to know if a simple conjunction could classify examples.This program finds this out by creating boundaries and refining them.It's a little complex.----------------------------------------------------------------------2. Building the programThe source code in this directory is complete and does not depend uponany other source code from the textbook. It only uses standardand libraries which should come any C++ compiler.You can build this program in UNIX by simply typing makeYou may need to edit the Makefile to change the name of the compiler,if you do not have a compiler named "CC".You do not need to recompile the program to change examples. Examplesare stored in files.----------------------------------------------------------------------3. Making example files and running the programAn example file specifies the dimensions (the attributesand their possible values) and all the examples. It is laid out inthis order: 1. the word "dimensions", followed by the number of dimensions 2. Each dimension in order, which includes a. the name of the attribute b. the number of values c. the names of all the values 3. the word "examples", followed by each example, which includes a. The name of this example b. The classifications of the example c. All the values of the example, in the same ordering as the dimensionsThe example files for the version space algorithm are similar to theexample files for the decision tree algorithm. However, for theversion space algorithm we assume that there are only two classes,"yes" and "no". You do not define the classes in the example file.----------------------------------------------------------------------4. Running the programRunning the program is very simple. Just type version filenamewhere "filename" is the name of the example file you want to read in.----------------------------------------------------------------------5. The solution, and how to read the source codeThe C++ program does a reasonable job of matching the Lisp program.However, you are more likely to understand what is going on by readingthe description of the algorithm in English in section 5.3.Most of the function names are the same as in the Lisp code.The classes are: Version -- Read the example file, and run the version space algorithm Boundary -- Either the general or the specific boundary Concept -- A single concept, which is a conjunction of values Example -- An example, which contains values and a class Dimension -- A dimension, which is an attribute and possible valuesThe dimensions and examples are read in from a file, and the initialvalues for the general and specific boundaries are set up. Thenfor each example, both boundaries are refined.There are 6 source files in this directory: Version.C The Version class and the main() function Boundary.C The Boundary class Concept.C The Concept class Dimension.C The Dimension class Example.C The Example class String.C A generic strings library, a copy of the UNIX standardStart in Decision.C with the main() function if you want to read the code.----------------------------------------------------------------------
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -