public class PrototypeDataset extends CompositionDataset
Information about each site must be specified with a file in the following format:
<# of atoms on Site1> [-omit] [-equiv <site #s...>]
<# of atoms on Site2> [-omit] [-equiv <site #s...>]
Here sites (aka sublattices) can be occupied by a single kind of atom, and are treated as symmetrically distinct unless otherwise specified. Information about each site is used to calculate statistics unless otherwise indicated by an "-omit" flag. It is possible to mark equivalent sites using the "-equiv" flag.
Data is read into this object using the #importText(java.lang.String) command. The required format of data files is very similar to that of a CompositionDataset:
Identity [<property1 Name>] [<property2 Name>] [...]
<A site Element><B site Element><...> <property1 value> [...]
{<Composition of Site A>}{<Composition of Site B} <property1 value> [...]
[and so on]
It is important that you can define the identity of an crystal by either specifying the element present on each site, or by specifying the composition of the elements occupying that site. The latter option allows this class to handle mixing on a certain atomic site. Note that this does not consider the ordering (or lack there of) on that sublattice.
In addition to attributes based solely on the composition (see CompositionDataset#generateAttributes(java.lang.String[], boolean, java.lang.String)),
this class generates other statistics, as described in #generateAttributes(java.lang.String[], boolean, java.lang.String)
Usage: <Structure description filename>
Modifier and Type | Field and Description |
---|---|
protected PrototypeSiteInformation |
SiteInfo
Stores information about each site
|
DataDirectory, ElementalProperties, ElementNames, OxidationStates, PropertyData, SortingOrder
AttributeName, Entries, Expanders, Generators
Constructor and Description |
---|
PrototypeDataset() |
Modifier and Type | Method and Description |
---|---|
PrototypeEntry |
addEntry(java.lang.String input)
A new entry by parsing an input string.
|
void |
calculateAttributes()
Compute attributes that are specific to this class.
|
PrototypeDataset |
emptyClone()
Creates a new instance with the same class and attribute names, but
without any entries.
|
protected void |
generatePairSiteAttributes()
Generate attributes related to the differences between a pair of sites
|
protected void |
generateSingleSiteAttributes()
Generate attributes based on the mean elemental property for each site group.
|
PrototypeEntry |
getEntry(int index)
Retrieve a single entry from the dataset
|
PrototypeSiteInformation |
getSiteInfo()
Get information about each site in this prototype structure
|
void |
importText(java.lang.String filename,
java.lang.Object[] options)
Read in an dataset from file.
|
int |
NSites() |
java.lang.String |
printUsage()
Print out required format for options.
|
void |
readStructureInformation(java.lang.String filename)
Read information about a prototype crystal structure from file.
|
void |
setOptions(java.util.List<java.lang.Object> Options)
Set any options for this object.
|
void |
setSiteInfo(PrototypeSiteInformation SiteInfo)
Define information about the prototypes contained by this dataset.
|
addElementalProperty, compositionCanFormIonic, getElementalProperties, getOxidationStates, getPropertyLookupTable, getSortingOrder, printEntryDescription, readOxidationStates, removeElementalProperty, runAttributeCommand, runCommand, runPropertyCommand, saveCommand, setDataDirectory, useCompositionAsAttributes
addEntries, addEntries, addEntry, addProperty, addProperty, clearPropertyData, combine, definePropertyNames, getClassNames, getMeasuredPropertyArray, getMeasuredPropertyArray, getPredictedPropertyArray, getPredictedPropertyArray, getPropertyClassCount, getPropertyClasses, getPropertyClasses, getPropertyIndex, getPropertyName, getPropertyNames, getTargetPropertyIndex, getTargetPropertyName, hasProperty, importEntryProperties, importPropertyNames, NClasses, NProperties, setClassNames, setPropertyClasses, setTargetProperty, setTargetProperty, toString, usingPropertyAsClass
about, addAttribueExpander, addAttribueGenerator, addAttribute, addAttributes, clearAttributeExpanders, clearAttributeGenerators, clearAttributes, clearData, clone, combine, combine, containsEntry, deleteMeasuredClasses, finalizeGeneration, generateAttributes, getAttributeArray, getAttributeExpanders, getAttributeGenerators, getAttributeIndex, getAttributeName, getAttributeNames, getCitations, getClassName, getClassProbabilityArray, getDistribution, getDistributionCount, getEntries, getEntriesWriteAccess, getEntryArray, getMeasuredClassArray, getPredictedClassArray, getRandomSubset, getRandomSubset, getSingleAttributeArray, getSubset, getTrainingExamples, loadState, matchEntries, NAttributes, NEntries, partition, partition, printAttributeDescription, printCommand, printDescription, printDistribution, printEntries, randomSplit, randomSplit, removeDuplicates, restoreAttributes, runAttributeExpanders, runAttributeExpansionCommand, runAttributeGeneratorCommand, runAttributeGenerators, saveState, setAttributeNames, setClassProbabilities, setMeasuredClasses, setPredictedClasses, splitForThreading, splitIntoFolds, subtract, transferToWeka
protected PrototypeSiteInformation SiteInfo
public void setOptions(java.util.List<java.lang.Object> Options) throws java.lang.Exception
Options
setOptions
in interface Options
setOptions
in class Dataset
Options
- Array of options as Objects - can be null
java.lang.Exception
- if problem with inputspublic java.lang.String printUsage()
Options
printUsage
in interface Options
printUsage
in class Dataset
public PrototypeDataset emptyClone()
Dataset
emptyClone
in class CompositionDataset
public void readStructureInformation(java.lang.String filename) throws java.lang.Exception
filename
- File containing structure information.java.lang.Exception
- If file fails to parsepublic void setSiteInfo(PrototypeSiteInformation SiteInfo)
NOTE: This will clear all existing data
SiteInfo
- Object describing the number of atoms on each site, etc.public PrototypeSiteInformation getSiteInfo()
public void importText(java.lang.String filename, java.lang.Object[] options) throws java.lang.Exception
CompositionDataset
importText
in class CompositionDataset
filename
- Path of file to be importedoptions
- Any options used to control importjava.lang.Exception
- If text import failspublic int NSites()
public void calculateAttributes()
Dataset
calculateAttributes
in class CompositionDataset
protected void generateSingleSiteAttributes()
protected void generatePairSiteAttributes()
public PrototypeEntry getEntry(int index)
Dataset
getEntry
in class CompositionDataset
index
- Index of entrypublic PrototypeEntry addEntry(java.lang.String input) throws java.lang.Exception
Dataset
addEntry
in class CompositionDataset
input
- String describing the entryjava.lang.Exception
- If conversion fails