public class Test6 extends Object implements StandardCBRApplication
The case base (iris_data_jCOLIBRI.txt) contains information about iris:
#Columns are: Sepal Length, Sepal Width, Petal Length, Petal Width, Type of Iris, Case 1,5.1,3.5,1.4,0.2,Iris-setosa Case 2,4.9,3,1.4,0.2,Iris-setosa Case 3,4.7,3.2,1.3,0.2,Iris-setosa ...These cases are mapped into the following structure: *
Case | +- Description | | | +- id * (1) | +- sepalLength (2) | +- sepalWidth (3) | +- petalLength (4) | +- petalWidth (5) | +- Solution | +- type * (6)The attributes with * are the ids of the compound objects and the numbers between parenthesis are the corresponding columns in the text file.
The mapping is configured by the plaintextconfig.xml file following the schema defined in PlainTextConnector:
<TextFileConfiguration> <FilePath>es/ucm/fdi/gaia/jcolibri/test/test6/iris_data_jCOLIBRI.txt</FilePath> <Delimiters>,</Delimiters> <DescriptionClassName>es.ucm.fdi.gaia.jcolibri.test.test6.IrisDescription</DescriptionClassName> <DescriptionMappings> <Map>sepalLength</Map> <Map>sepalWidth</Map> <Map>petalLength</Map> <Map>petalWidth</Map> </DescriptionMappings> <SolutionClassName>es.ucm.fdi.gaia.jcolibri.test.test6.IrisSolution</SolutionClassName> <SolutionMappings> <Map>type</Map> </SolutionMappings> </TextFileConfiguration>First, we define the path containing the data and the characters used as delimiters (comma in this example).
jcolibri.connector.PlainTextConnector
Constructor and Description |
---|
Test6() |
Modifier and Type | Method and Description |
---|---|
void |
configure() |
void |
cycle(CBRQuery query) |
static void |
main(String[] args) |
void |
postCycle() |
CBRCaseBase |
preCycle() |
public Test6()
public void configure() throws ExecutionException
configure
in interface StandardCBRApplication
ExecutionException
public CBRCaseBase preCycle() throws ExecutionException
preCycle
in interface StandardCBRApplication
ExecutionException
public void cycle(CBRQuery query) throws ExecutionException
cycle
in interface StandardCBRApplication
ExecutionException
public void postCycle() throws ExecutionException
postCycle
in interface StandardCBRApplication
ExecutionException
Copyright © 2018 Group of Artificial Intelligence Applications (GAIA). All rights reserved.