IMP  2.4.0
The Integrative Modeling Platform
ProfileClustering.h
Go to the documentation of this file.
1 /**
2  * \file IMP/saxs/ProfileClustering.h
3  * \brief A class for profile clustering
4  *
5  * \authors Dina Schneidman
6  * Copyright 2007-2015 IMP Inventors. All rights reserved.
7  *
8  */
9 
10 #ifndef IMPSAXS_PROFILE_CLUSTERING_H
11 #define IMPSAXS_PROFILE_CLUSTERING_H
12 
13 #include <IMP/saxs/Profile.h>
14 
15 #include <vector>
16 
17 IMPSAXS_BEGIN_NAMESPACE
18 
19 /** Class for profile clustering */
20 class IMPSAXSEXPORT ProfileClustering {
21 public:
23  const IMP::saxs::Profiles& profiles,
24  float chi_percentage = 0.3, float chi_threshold = 0.0);
25 
27  const IMP::saxs::Profiles& profiles,
28  const std::vector<double>& scores,
29  float chi_percentage = 0.3, float chi_threshold = 0.0);
30 
31  const std::vector<IMP::saxs::Profiles>& get_clusters() const {
32  return clusters_;
33  }
34 
36  return clustered_profiles_;
37  }
38 
39 private:
40  void cluster_profiles();
41  void select_representatives();
42 
43 private:
45  const IMP::saxs::Profiles profiles_;
46  const std::vector<double> scores_;
47 
48  std::vector<double> chi_scores_;
49  IMP::saxs::Profiles clustered_profiles_;
50  std::vector<IMP::saxs::Profiles> clusters_;
51  float chi_percentage_;
52  float chi_threshold_;
53 };
54 
55 IMPSAXS_END_NAMESPACE
56 
57 #endif /* IMPSAXS_PROFILE_CLUSTERING_H */
A class for profile storing and computation.
Ints get_representatives(Embedding *d, PartitionalClustering *pc)