Package chemaxon.clustering
Class JarvisPatrick
java.lang.Object
chemaxon.clustering.Common
chemaxon.clustering.NearestNeighbors
chemaxon.clustering.JarvisPatrick
Performs variable-length Jarvis-Patrick clustering based on binary
fingerprints (bits strings) and/or other data stored in a database table
or a file. It can also be used for calculating diversity measures, like
average and minimum dissimilarity of a compound library.
This class can be used from command-line or from the API.
See the documentation for details.
This class can be used from command-line or from the API.
See the documentation for details.
An example for running JarvisPatrick:
ConnectionHandler ch; String selectString; ... JarvisPatrick jp=new JarvisPatrick(); jp.setInput(ch, selectString ); jp.setOutput(System.out); jp.setDimensions(0); jp.setFpSize(512); jp.setStatNeeded(true); jp.setOnlyStat(false); jp.setStatStream(System.out); jp.setIdGeneration(true); jp.setThreshold(0.1f); jp.setCentralShown(true); jp.setMinCommonRatio(0.1f); jp.setSingletonNegative(true); jp.run();
- Since:
- JChem 1.6.2
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfloat
Gets the minimum ratio of common neighbors of two compounds.boolean
Indicates whether central objects are displayed.boolean
Indicates whether singeltons get negative cluster id-s.static void
Deprecated, for removal: This API element is subject to removal in a future version.This main method will be removed, CLI interfaces should not be used directly from Java code.void
run()
Starts processing.void
setCentralShown
(boolean b) Specifies if cluster centers should be diplayed.void
setMinCommonRatio
(float ratio) Sets the minimum ratio of common neighbors of two compounds.void
setSingletonNegative
(boolean b) Specifies whether singletons get negative cluste id-s.Methods inherited from class chemaxon.clustering.NearestNeighbors
getThreshold, setInput, setInput, setInput, setInput, setThreshold
Methods inherited from class chemaxon.clustering.Common
getDimensions, getElapsedTime, getFpSize, getIdGeneration, getStartTime, getStatStream, getWeights, isOnlyStat, isStatNeeded, setDimensions, setFpSize, setIdGeneration, setOnlyStat, setOutput, setOutput, setOutput, setOutput, setStatNeeded, setStatStream, setWeights
-
Constructor Details
-
JarvisPatrick
public JarvisPatrick()
-
-
Method Details
-
setMinCommonRatio
public void setMinCommonRatio(float ratio) Sets the minimum ratio of common neighbors of two compounds.- Parameters:
ratio
- the ratio to be set- Since:
- JChem 1.6.2
-
getMinCommonRatio
public float getMinCommonRatio()Gets the minimum ratio of common neighbors of two compounds.- Returns:
- the ratio
- Since:
- JChem 1.6.2
-
setSingletonNegative
public void setSingletonNegative(boolean b) Specifies whether singletons get negative cluste id-s.- Parameters:
b
- If set totrue
, singeltons get negative cluster id-s.- Since:
- JChem 1.6.2
-
isSingletonNegative
public boolean isSingletonNegative()Indicates whether singeltons get negative cluster id-s.- Returns:
true
, if singeltons get negative cluster id-s.- Since:
- JChem 1.6.2
-
setCentralShown
public void setCentralShown(boolean b) Specifies if cluster centers should be diplayed.- Parameters:
b
- if set totrue
, central objects are calculated and shown in output.- Since:
- JChem 1.6.2
-
isCentralShown
public boolean isCentralShown()Indicates whether central objects are displayed.- Returns:
true
if central objects are calculated and shown in output.- Since:
- JChem 1.6.2
-
run
Starts processing.- Overrides:
run
in classNearestNeighbors
- Throws:
ClusteringException
IOException
SQLException
InvalidLicenseKeyException
- Since:
- JChem 1.6.2
-
main
@Deprecated(forRemoval=true) @SubjectToRemoval(date=JAN_01_2025) public static void main(String[] args) Deprecated, for removal: This API element is subject to removal in a future version.This main method will be removed, CLI interfaces should not be used directly from Java code.The command line version entry point. Parameter parsing, initialization then start.
-