|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectchemaxon.descriptors.MDSet
public class MDSet
MDset combines several MolecularDescriptors into
one entity. The purpose of this class is to allow dissimilarity calculations
being performed on various MolecularDescriptors simultaneously.
This improves the predictive power of individual descriptors and is more
efficient than doing it one-by-one.
MDSet objects can be compared against each other by dissimilarity
metrics. The dissimilarity coefficient is obtained as the weighted sum of the
dissimilarity coefficients of the pair-wise comparison of components. Weights
are stored in the MDSetParameters class, aggregated by this
class.
MDSet instances are associated with (and calculated from) molecular
structures. This connection between the orginal Molecule and its
MDSet objects is preserved by the unique identifier of the
molecule which is stored in the MDSet object too.
Besides MolecularDescriptor components, and MDSet
object can take an arbitrary number of external, user defined float values.
Typically, these are calculated by third party software and stored in SDfile
tags or database columns. These values are used in dissimilarity calculations
but they are never modified.
Remark: the term Set is slightly misleading since components constituting
the MDSet are ordered. Tuple or Record would be
more appropriate though probably quite unusual in a cheminformatics
context.
| Field Summary | |
|---|---|
float |
dissim
dissimilarity measured against an other set |
| Constructor Summary | |
|---|---|
MDSet()
Creates an empty MDSet object. |
|
MDSet(int nComponents)
Creates an empty MDSet object capable of stroring a given
number of MolecularDescriptor components. |
|
MDSet(int nComponents,
int nUserData)
Creates an empty MDSet object capable of stroring a given
number of MolecularDescriptor components and the given
number of user defined (external) data. |
|
MDSet(MDSet c)
Copy constructor. |
|
| Method Summary | |
|---|---|
void |
addDescriptor(MolecularDescriptor descriptor)
Appends the next component to the MDSet object. |
java.lang.Object |
clone()
Clones the object. |
void |
generate(Molecule mol)
Generates the MDSet from the given molecular structure. |
MolecularDescriptor |
getDescriptor(int index)
Gets a specified component of the MDSet. |
float |
getDissimilarity(MDSet o)
Calculates the dissimilarity between two MDSet objects. |
int |
getId()
Gets the identifier of the MDSet. |
float |
getLowerBound(java.lang.Object o)
Gives a lower bound estimation for the value of getDissimilarity( final Object o ). |
java.lang.String |
getNaturalId()
Gets the natural identifier of the source Molecule of the
MDSet. |
MDSetParameters |
getParameters()
Gets the current parameter settings. |
float[] |
getUserData()
Deprecated. since 2.3 |
float |
getUserData(int index)
Deprecated. since 2.3 |
static MDSet |
newInstance(java.lang.String[] componentTypes)
Gets a new MDSet instance constituted of the specified
components. |
static MDSet |
newInstance(java.lang.String[] componentTypes,
java.io.File[] params)
Gets a new MDSet instance constituted of the specified
components. |
static MDSet |
newInstance(java.lang.String[] componentTypes,
java.lang.String[] params)
Gets a new MDSet instance constituted of the specified
components. |
void |
setDescriptor(int componentIndex,
MolecularDescriptor md)
Sets a given component of the MDSet. |
void |
setDescriptors(MolecularDescriptor[] descriptors)
Sets all components of the MDSet. |
void |
setId(int id)
Sets the unique internal idenifier of the MDSet object. |
void |
setNaturalId(java.lang.String id)
Sets the natural idenifier of the MDSet object. |
void |
setParameters(MDSetParameters params)
Sets the parameters of the MDSet. |
void |
setSize(int nComponents)
Sets the number of MolecularDescriptor components in the
MDSet. |
void |
setSize(int nComponents,
int nUserData)
Sets the number of MolecularDescriptor components and the
number of user defined (external) data in the MDSet. |
void |
setUserData(float[] userData)
Deprecated. since 2.3 |
void |
setUserData(int dataIndex,
float userData)
Deprecated. since 2.3 |
int |
size()
Gets the number of components constituting the MDSet. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public float dissim
| Constructor Detail |
|---|
public MDSet()
MDSet object. It can be initialized by calling
setSize( int nComponents ) and setParameters(
final MDSetParameters params ).
public MDSet(MDSet c)
c - a MDSet object to be copiedpublic MDSet(int nComponents)
MDSet object capable of stroring a given
number of MolecularDescriptor components. Components should
be added by setDescriptor( final MolecularDescriptor descriptor ) .
nComponents - number of components in the MDSet object
public MDSet(int nComponents,
int nUserData)
MDSet object capable of stroring a given
number of MolecularDescriptor components and the given
number of user defined (external) data. Components should be added by
setDescriptor( final MolecularDescriptor descriptor ) .
nComponents - number of components in the MDSet objectnUserData - number of further floating point values| Method Detail |
|---|
public static MDSet newInstance(java.lang.String[] componentTypes)
MDSet instance constituted of the specified
components. MDSetParameters are set to default.
componentTypes - type names of the components
public static MDSet newInstance(java.lang.String[] componentTypes,
java.lang.String[] params)
MDSet instance constituted of the specified
components. Components are parametrized with the given parameter settings.
componentTypes - type names of the componentsparams - parameter strings
public static MDSet newInstance(java.lang.String[] componentTypes,
java.io.File[] params)
MDSet instance constituted of the specified
components. Components are parametrized from the given parameter files.
componentTypes - type names of the componentsparams - parameter files
public java.lang.Object clone()
clone in class java.lang.ObjectMDSet instance
public void setSize(int nComponents,
int nUserData)
MolecularDescriptor components and the
number of user defined (external) data in the MDSet.
nComponents - number of components in the MDSet objectnUserData - number of further floating point valuespublic void setSize(int nComponents)
MolecularDescriptor components in the
MDSet.
nComponents - number of components in the MDSet objectpublic void setId(int id)
MDSet object.
id - unique identifierpublic int getId()
MDSet.
public void setNaturalId(java.lang.String id)
MDSet object. This
identifier is taken from a Molecule (from an SDfile tag).
id - unique identifierpublic java.lang.String getNaturalId()
Molecule of the
MDSet.
public void setParameters(MDSetParameters params)
MDSet. Note, that this has no
effect on the parameters of individual MolecularDescriptor
components in the MDSet.
public MDSetParameters getParameters()
MDSetpublic void addDescriptor(MolecularDescriptor descriptor)
MDSet object.
descriptor - the next component of the MDSetpublic void setDescriptors(MolecularDescriptor[] descriptors)
MDSet.
descriptors - MDSet components, they are not cloned
public void setDescriptor(int componentIndex,
MolecularDescriptor md)
MDSet.
componentIndex - index of the component to be setmd - the MolecularDescriptor type of the
specified componentpublic int size()
MDSet.
public MolecularDescriptor getDescriptor(int index)
MDSet.
index - component index
public void generate(Molecule mol)
throws MDGeneratorException
MDSet from the given molecular structure.
MDGeneratorException - when failed to generate one of the
componentspublic float getDissimilarity(MDSet o)
MDSet objects.
The dissimilarity value is the weighted sum of the component-wise
dissimilarity values.
o - a MDSet object to which this is
compated
Its type is Object in order to implement the
Clusterable interface.
public float getLowerBound(java.lang.Object o)
getDissimilarity( final Object o ). This method is
implemented due to the services requirements by the Clusterable
interface.
o - MDSet object to which this is
compated
Its type is Object in order to implement the
Clusterable interface.
public void setUserData(float[] userData)
MDSet.
userData - user defined floating point data values
public void setUserData(int dataIndex,
float userData)
MDSet.
dataIndex - index of the data value to be setuserData - user defined floating point data valuepublic float getUserData(int index)
index - data component index
public float[] getUserData()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||