EMAN2
|
KMeansAnalyzer Performs k-means classification on a set of input images (shape/size arbitrary) returned result is a set of classification vectors. More...
#include <analyzer.h>
Public Member Functions | |
KMeansAnalyzer () | |
virtual int | insert_image (EMData *image) |
insert a image to the list of input images More... | |
virtual vector< EMData * > | analyze () |
main function for Analyzer, analyze input images and create output images More... | |
string | get_name () const |
Get the Analyzer's name. More... | |
string | get_desc () const |
Get the Analyzer's description. More... | |
void | set_params (const Dict &new_params) |
Set the Analyzer parameters using a key/value dictionary. More... | |
TypeDict | get_param_types () const |
Get Analyzer parameter information in a dictionary. More... | |
Public Member Functions inherited from EMAN::Analyzer | |
Analyzer () | |
virtual | ~Analyzer () |
virtual int | insert_images_list (vector< EMData * > image_list) |
insert a list of images to the list of input images More... | |
virtual Dict | get_params () const |
Get the Reconstructor's parameters in a key/value dictionary. More... | |
Static Public Member Functions | |
static Analyzer * | NEW () |
Static Public Attributes | |
static const string | NAME = "kmeans" |
Protected Member Functions | |
void | update_centers (int sigmas=0) |
void | reclassify () |
void | reseed () |
void | resort () |
Protected Attributes | |
vector< EMData * > | centers |
int | ncls |
int | nclstot |
int | verbose |
int | minchange |
int | maxiter |
int | mininclass |
int | nchanged |
int | slowseed |
int | calcsigmamean |
int | outlierclass |
Protected Attributes inherited from EMAN::Analyzer | |
Dict | params |
vector< EMData * > | images |
KMeansAnalyzer Performs k-means classification on a set of input images (shape/size arbitrary) returned result is a set of classification vectors.
verbose | Display progress if set, more detail with larger numbers (9 max) |
ncls | number of desired classes |
maxiter | maximum number of iterations |
minchange | Terminate if fewer than minchange members move in an iteration |
mininclass | Minumum number of particles to keep a class as good (not enforced at termination |
slowseed | Instead of seeding all classes at once, it will gradually increase the number of classes by adding new seeds in groups with large standard deviations |
outlierclass | The last class will be reserved for outliers. Any class containing fewer than n particles will be permanently moved to the outlier group. default = disabled |
calcsigmamean | Computes standard deviation of the mean image for each class-average (center), and returns them at the end of the list of centers |
Definition at line 236 of file analyzer.h.
|
inline |
|
virtual |
main function for Analyzer, analyze input images and create output images
Implements EMAN::Analyzer.
Definition at line 174 of file analyzer.cpp.
References calcsigmamean, centers, EMAN::Util::get_irand(), get_xsize(), get_ysize(), get_zsize(), EMAN::Analyzer::images, maxiter, minchange, mininclass, nchanged, ncls, nclstot, outlierclass, EMAN::Analyzer::params, reclassify(), reseed(), resort(), set_attr(), EMAN::Dict::set_default(), slowseed, update_centers(), and verbose.
|
inlinevirtual |
Get the Analyzer's description.
Implements EMAN::Analyzer.
Definition at line 253 of file analyzer.h.
|
inlinevirtual |
Get the Analyzer's name.
Each Analyzer is identified by a unique name.
Implements EMAN::Analyzer.
Definition at line 248 of file analyzer.h.
References NAME.
|
inlinevirtual |
Get Analyzer parameter information in a dictionary.
Each parameter has one record in the dictionary. Each record contains its name, data-type, and description.
Implements EMAN::Analyzer.
Definition at line 265 of file analyzer.h.
References EMAN::EMObject::INT, and EMAN::TypeDict::put().
|
inlinevirtual |
insert a image to the list of input images
image |
Implements EMAN::Analyzer.
Definition at line 241 of file analyzer.h.
References EMAN::Analyzer::images.
|
inlinestatic |
|
protected |
Definition at line 429 of file analyzer.cpp.
References centers, get_attr_default(), EMAN::Analyzer::images, nchanged, ncls, nclstot, outlierclass, and qsqcmp().
Referenced by analyze().
|
protected |
Definition at line 329 of file analyzer.cpp.
References centers, get_attr(), EMAN::Util::get_irand(), has_attr(), EMAN::Analyzer::images, ncls, nclstot, and outlierclass.
Referenced by analyze(), and update_centers().
|
protected |
Definition at line 400 of file analyzer.cpp.
References centers, ncls, nclstot, outlierclass, and qsqcmp().
Referenced by analyze().
|
virtual |
Set the Analyzer parameters using a key/value dictionary.
new_params | A dictionary containing the new parameters. |
Reimplemented from EMAN::Analyzer.
Definition at line 161 of file analyzer.cpp.
References calcsigmamean, EMAN::Dict::has_key(), maxiter, minchange, mininclass, ncls, nclstot, outlierclass, EMAN::Analyzer::params, slowseed, and verbose.
|
protected |
Definition at line 255 of file analyzer.cpp.
References centers, get_attr(), EMAN::Analyzer::images, mininclass, ncls, nclstot, outlierclass, reseed(), sqrt(), and verbose.
Referenced by analyze().
|
protected |
Definition at line 297 of file analyzer.h.
Referenced by analyze(), and set_params().
|
protected |
Definition at line 288 of file analyzer.h.
Referenced by analyze(), reclassify(), reseed(), resort(), and update_centers().
|
protected |
Definition at line 293 of file analyzer.h.
Referenced by analyze(), and set_params().
|
protected |
Definition at line 292 of file analyzer.h.
Referenced by analyze(), and set_params().
|
protected |
Definition at line 294 of file analyzer.h.
Referenced by analyze(), set_params(), and update_centers().
|
static |
Definition at line 280 of file analyzer.h.
Referenced by get_name().
|
protected |
Definition at line 295 of file analyzer.h.
Referenced by analyze(), and reclassify().
|
protected |
Definition at line 289 of file analyzer.h.
Referenced by analyze(), reclassify(), reseed(), resort(), set_params(), and update_centers().
|
protected |
Definition at line 290 of file analyzer.h.
Referenced by analyze(), reclassify(), reseed(), resort(), set_params(), and update_centers().
|
protected |
Definition at line 298 of file analyzer.h.
Referenced by analyze(), reclassify(), reseed(), resort(), set_params(), and update_centers().
|
protected |
Definition at line 296 of file analyzer.h.
Referenced by analyze(), and set_params().
|
protected |
Definition at line 291 of file analyzer.h.
Referenced by analyze(), set_params(), and update_centers().