|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object rdr.core.DomainModel
public class DomainModel
DomainModel object. Defined by a set of Attributes. Also manages the set of cases, and classifications.
Field Summary | |
---|---|
common.datastructures.MyFastVector<Attribute> |
attributes
|
common.datastructures.MyFastVector<Case> |
cases
|
common.datastructures.MyFastVector<Classification> |
classifications
|
java.lang.String |
name
|
java.io.File |
sourceArff
|
Constructor Summary | |
---|---|
DomainModel()
Constructor. |
|
DomainModel(java.io.File file)
Constructor. |
|
DomainModel(java.io.File file,
int numLabels)
Constructor. |
|
DomainModel(java.lang.String name,
weka.core.Instances data,
int numLabels)
Constructor. |
|
DomainModel(java.lang.String modelName,
common.datastructures.MyFastVector<Attribute> attrs)
Constructor. |
|
DomainModel(java.lang.String modelName,
common.datastructures.MyFastVector<Attribute> attrs,
common.datastructures.MyFastVector<Classification> classifications)
Constructor. |
Method Summary | |
---|---|
void |
addClassification(Classification c)
Add a classification to this domain model (if it isn't already there) |
Attribute |
getAttributeFromName(java.lang.String name)
Find an attribute in the domain model based on name |
common.datastructures.MyFastVector<Attribute> |
getAttributes()
gets the attributes which define how a case is made up |
java.lang.String[] |
getAttributesArray()
Return an array of strings representing the attributes, for the drop down box of attributes that will be needed in the knowledge acquisition GUI |
java.lang.Object[][] |
getAttributesTable()
Returns a 2D array of objects that match the format {{att1, type}, {att2, type}, etc.} |
Case |
getCase(int i)
Get a specific case from the domain model. |
common.datastructures.MyFastVector<Case> |
getCases()
|
common.datastructures.MyFastVector<Classification> |
getClassifications()
Get the set of classifications that have been used in this domain model (so far) |
java.lang.String |
getModelName()
|
java.io.File |
getSourceArff()
|
common.datastructures.MyFastVector<Case> |
loadCaseBank()
Load cases from file. |
common.datastructures.MyFastVector<Case> |
loadCaseBankArff(java.io.File file)
Load cases from Arff file. |
common.datastructures.MyFastVector<Case> |
loadCaseBankArff(weka.core.Instances data)
Load cases from Arff dataset. |
DomainModel |
loadDomainModel(java.io.File file)
Load a domain model from file |
DomainModel |
loadDomainModelArff(java.io.File file,
int numLabels)
Load a domain model from file The arff reading version. |
DomainModel |
loadDomainModelArff(weka.core.Instances data,
int numLabels)
Load a domain model from file The arff reading version. |
void |
saveCaseBank()
Save cases to file |
void |
saveDomainModel()
Save the domain model to file |
void |
setAttributes(common.datastructures.MyFastVector<Attribute> attrs)
sets the attributes which define how a case is made up |
void |
setModelName(java.lang.String modelName)
sets the model name |
void |
setSourceArff(java.io.File file)
Sets the source arff file. |
int |
size()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public java.lang.String name
public common.datastructures.MyFastVector<Attribute> attributes
public common.datastructures.MyFastVector<Case> cases
public common.datastructures.MyFastVector<Classification> classifications
public java.io.File sourceArff
Constructor Detail |
---|
public DomainModel()
public DomainModel(java.lang.String modelName, common.datastructures.MyFastVector<Attribute> attrs)
modelName
- the name of the domainattrs
- the set of attributes that define how a case is made uppublic DomainModel(java.lang.String modelName, common.datastructures.MyFastVector<Attribute> attrs, common.datastructures.MyFastVector<Classification> classifications)
modelName
- the name of the domainattrs
- the set of attributes that define how a case is made upclassifications
- the set of classifications that are used in this domain (so far)public DomainModel(java.io.File file)
file
- the domain model file to loadpublic DomainModel(java.io.File file, int numLabels)
file
- the file to loadnumLabels
- the number of labels (classifications) that are included in the filepublic DomainModel(java.lang.String name, weka.core.Instances data, int numLabels)
data
- the data to convertnumLabels
- the number of labels (classifications) that are included in the fileMethod Detail |
---|
public java.lang.String getModelName()
public java.io.File getSourceArff()
public void setSourceArff(java.io.File file)
file
- the file to set as source arffpublic void setModelName(java.lang.String modelName)
modelName
- the name to setpublic common.datastructures.MyFastVector<Attribute> getAttributes()
public void setAttributes(common.datastructures.MyFastVector<Attribute> attrs)
attrs
- the set of attributes to usepublic int size()
public java.lang.String[] getAttributesArray()
public Attribute getAttributeFromName(java.lang.String name)
public DomainModel loadDomainModel(java.io.File file)
file
- the domain model file to load
public DomainModel loadDomainModelArff(java.io.File file, int numLabels)
file
- the domain model file to loadnumLabels
- the number of labels (classifications) the arff includes
public DomainModel loadDomainModelArff(weka.core.Instances data, int numLabels)
file
- the domain model file to loadnumLabels
- the number of labels (classifications) the arff includes
public void saveCaseBank()
public common.datastructures.MyFastVector<Case> loadCaseBank()
public common.datastructures.MyFastVector<Case> loadCaseBankArff(java.io.File file)
file
- the arff file to load
public common.datastructures.MyFastVector<Case> loadCaseBankArff(weka.core.Instances data)
data
- the Instances dataset to convert
public void saveDomainModel()
public common.datastructures.MyFastVector<Case> getCases()
public Case getCase(int i)
i
- the index of the case you want to fetch
public common.datastructures.MyFastVector<Classification> getClassifications()
public void addClassification(Classification c)
c
- the classification to addpublic java.lang.Object[][] getAttributesTable()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |