// file: $isip/class/math/vector/VectorFloat/VectorFloat.h // version: $Id: VectorFloat.h,v 1.26 2000/11/18 21:22:59 zheng Exp $ // // make sure definitions are only made once // #ifndef ISIP_FUZZY_CLASSIFIER #define ISIP_FUZZY_CLASSIFIER // isip include files // #ifndef ISIP_VECTORFLOAT #include #endif #ifndef ISIP_VECTORINTEGRAL #include #endif // VectorFloat: this is a vector of Float objects, which inherits // the MVector template class. // class FuzzyClassifier { //--------------------------------------------------------------------------- // // public constants // //--------------------------------------------------------------------------- public: // define the class name // static const String CLASS_NAME; //---------------------------------------- // // default values and arguments // //---------------------------------------- // define the default value(s) of the class data // static const float DEF_VALUE = Float::DEF_VALUE; static const long DEF_LENGTH = 0; static const long UNCLUSTERED = -1; static const long CLUSTERED = -2; static const long FIRST_MEAN = 1; static const long SMOOTH_MEAN = 2; //---------------------------------------- // // error codes // //---------------------------------------- static const long ERR = 22800; //--------------------------------------------------------------------------- // // protected data // //--------------------------------------------------------------------------- public: // data set belonging to class l // VectorFloat ***vec_d; // classes correcponding to data set // VectorLong class_d; // number of classes // Long num_class_d; // number of data for each class // VectorLong num_vec_d; // maximum number of vectors for normalization // VectorFloat vec_max_d; // dimension of input data // Long dimension_d; // recorded cluster // VectorFloat **record_center_d; // center point for this cluster VectorFloat record_radius_d; // radius for this cluster VectorLong record_class_d; // class for this cluster VectorLong record_num_cluster_d; // number of data for this cluster VectorLong **record_cluster_d; // data belonging to this cluster VectorFloat record_cluster_weight_d; Long k_d; // k-mean //--------------------------------------------------------------------------- // // required public methods // //--------------------------------------------------------------------------- public: // method: destructor // ~FuzzyClassifier() {} // method: default constructor // FuzzyClassifier() {} // method: debug boolean debug(); //--------------------------------------------------------------------------- // // class-specific public methods // //--------------------------------------------------------------------------- public: // normalize the input data // boolean normalize(); // training // boolean train(); // k-mean algorithm // boolean kmean(VectorFloat **vec, VectorLong &mask, Long c, long mode, float& j_cost); // decoder // Long decode(VectorFloat vec); // k-mean rule Long decode1(VectorFloat vec); // NN rule Long decode2(VectorFloat vec); // cost rule Long decode3(VectorFloat vec); // fuzzy rule Long decode4(VectorFloat vec); // k-NN Long decode5(VectorFloat vec); // maximum rule Long knn(VectorFloat vec); // maximum rule boolean FuzzyClassifier::remove_junk(); //--------------------------------------------------------------------------- // // private methods // //--------------------------------------------------------------------------- private: }; // end of include file // #endif