This is an implementation of a Divisive Bisecting Clustering algorithm.
This is the IDL implementation by Dr. Christiaan Boersma ([email protected]) and used in the publications:
--- Boersma, C., Bregman, J., Allamandola, L.J., "The Charge State of Polycyclic Aromatic Hydrocarbons Across Reflection Nebulae: PAH Charge Balance and Calibration", 2016, ApJ, 832, 51 https://doi.org/10.3847/0004-637X/832/1/51 ---
--- Boersma, C., Bregman, J., Allamandola, L.J., "Properties of Polycyclic Aromatic Hydrocarbons in the Northwest Photon Dominated Region of NGC 7023. II. Traditional PAH Analysis Using k-means as a Visualization Tool", 2014, ApJ, 795, 110 https://doi.org/10.1088/0004-637X/795/2/110 ---
When using this code, please refer to:
--- Boersma, C., Bregman, J., Allamandola, L.J., "The Charge State of Polycyclic Aromatic Hydrocarbons Across Reflection Nebulae: PAH Charge Balance and Calibration", 2016, ApJ, 832, 51 https://doi.org/10.3847/0004-637X/832/1/51 ---
Note that the sklearn package offers a similar, though not identical, Python implementation of a Bisecting K-Means algorithm in its cluster module (sklearn.cluster.BisectingKMeans).
- data: the data to cluster (samples x features).
- img2: bisection_max: maximum number of bisections. The expected number of bins is 2 x bisection_max.
- min_samples: minimum number of samples needed to be considered a bin.
- bin_labels: the label for each sample it belongs to (samples).
Given 2 test data formatted as samples x features
bin_labels = BISECTINGCLUSTERING(data, 2, 10)
A spectral cube (n, m, w). For example
bin_labels = REFORM( $
BISECTINGCLUSTERING( $
REFORM(cube, n * m, w), 2, 10), n, m)
- Christiaan Boersma - Initial work - PAHdb
This project is licensed under the BSD 3-Clause License - see the LICENSE file for details
- The NASA Ames PAH IR Spectroscopic Database Team
- The Astrophysics & Astrochemistry Laboratory at NASA Ames Research Center - www.astrochemistry.org