Changeset 966
- Timestamp:
- Oct 11, 2007, 7:01:01 PM (16 years ago)
- Location:
- trunk/yat
- Files:
-
- 2 added
- 21 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/yat/classifier/DataLookup1D.h
r882 r966 50 50 public: 51 51 52 /// 'Read Only' iterator 52 53 typedef utility::Iterator<const double, const classifier::DataLookup1D> 53 54 const_iterator; … … 98 99 99 100 /** 101 \return 'Read Only' iterator to first element. 100 102 */ 101 103 const_iterator begin() const; 102 104 103 105 /** 106 \return 'Read Only' iterator to end of DataLookup1D. 104 107 */ 105 108 const_iterator end() const; -
trunk/yat/classifier/DataLookupWeighted1D.h
r890 r966 47 47 public: 48 48 49 /// 'Read Only' Iterator 49 50 typedef utility::IteratorWeighted<const double, const classifier::DataLookupWeighted1D> 50 51 const_iterator; … … 77 78 78 79 /** 80 \return 'Read Only' iterator to beginning of DataLookupWeighted1D. 79 81 */ 80 82 const_iterator begin() const; … … 86 88 87 89 /** 90 \return 'Read Only' iterator to end of DataLookupWeighted1D. 88 91 */ 89 92 const_iterator end() const; -
trunk/yat/classifier/MatrixLookup.h
r916 r966 75 75 /// 76 76 /// Constructor creating a lookup into the entire @a matrix. 77 /// \param matrix underlying matrix 77 78 /// @param own if true MatrixLookup owns its underlying @a matrix 78 79 /// -
trunk/yat/classifier/SVM.h
r964 r966 87 87 /// large C means the training will be focused on getting samples 88 88 /// correctly classified, with risk for overfitting and poor 89 /// generalisation. A too small C will result in a training where89 /// generalisation. A too small C will result in a training in which 90 90 /// misclassifications are not penalized. C is weighted with 91 91 /// respect to the size, so \f$ n_+C_+ = n_-C_- \f$, meaning a … … 106 106 long int max_epochs(void) const; 107 107 108 /* 108 /** 109 109 \brief set maximal number of epochs in training 110 110 */ -
trunk/yat/classifier/SVindex.h
r865 r966 37 37 namespace classifier { 38 38 39 #ifndef DOXYGEN_SHOULD_SKIP_THIS 40 /// @internal Class keeping track of which samples are support vectors and39 /// 40 /// Internal Class keeping track of which samples are support vectors and 41 41 /// not. The first nof_sv elements in the vector are indices of the 42 42 /// support vectors … … 46 46 47 47 public: 48 // Default Contructor48 ///Default Contructor 49 49 SVindex(); 50 50 51 // 51 /// Constructor 52 52 SVindex(const size_t); 53 53 54 // @return index_first54 /// @return index_first 55 55 size_t index_first(void) const; 56 56 57 // @return index_second57 /// @return index_second 58 58 size_t index_second(void) const; 59 59 60 // synch the object against alpha60 /// synch the object against alpha 61 61 void init(const utility::vector& alpha, const double); 62 62 63 // @return nof support vectors63 /// @return nof support vectors 64 64 size_t nof_sv(void) const; 65 65 66 // making first to an nsv. If already sv, nothing happens.66 /// making first to an nsv. If already sv, nothing happens. 67 67 void nsv_first(void); 68 68 69 // making second to an nsv. If already sv, nothing happens.69 /// making second to an nsv. If already sv, nothing happens. 70 70 void nsv_second(void); 71 71 72 // randomizes the nsv part of vector and sets index_first to73 // nof_sv_ (the first nsv)72 /// randomizes the nsv part of vector and sets index_first to 73 /// nof_sv_ (the first nsv) 74 74 void shuffle(void); 75 75 76 // @return nof samples76 /// @return nof samples 77 77 size_t size(void) const; 78 78 79 // making first to a sv. If already sv, nothing happens.79 /// making first to a sv. If already sv, nothing happens. 80 80 void sv_first(void); 81 81 82 // making second to a sv. If already sv, nothing happens.82 /// making second to a sv. If already sv, nothing happens. 83 83 void sv_second(void); 84 84 85 // 86 void update_first(const size_t );85 /// set index_first to \a i 86 void update_first(const size_t i); 87 87 88 // 89 void update_second(const size_t );88 /// set index_second to \a i 89 void update_second(const size_t i); 90 90 91 // @return value_first91 /// @return value_first 92 92 size_t value_first(void) const; 93 93 94 // @return const refvalue_second94 /// @return value_second 95 95 size_t value_second(void) const; 96 96 97 /// \return index \a i (if i<nof_sv() index is sv) 97 98 size_t operator()(size_t i) const; 98 99 … … 106 107 107 108 }; 108 #endif /* DOXYGEN_SHOULD_SKIP_THIS */109 109 110 110 }}} // of namespace classifier, yat, and theplu -
trunk/yat/classifier/Sampler.h
r865 r966 47 47 /// 48 48 /// @param target used to balance partitions 49 /// @param N umber of partitions49 /// @param N Number of partitions 50 50 /// 51 51 Sampler(const Target& target, size_t N); -
trunk/yat/random/random.h
r865 r966 321 321 underlying RNG. 322 322 323 \throw GSL_error if \a n is larger than the range of the323 \throw GSL_error if \a n is larger than the range of the 324 324 underlying generator. 325 325 */ -
trunk/yat/statistics/AUC.h
r865 r966 51 51 public: 52 52 /// 53 /// 54 /// 53 /// \brief Defaul Constructor 54 /// \param absolute if true max(AUC, 1-AUC) is used 55 /// 55 56 AUC(bool absolute=true); 56 57 -
trunk/yat/statistics/SAMScore.h
r865 r966 57 57 /// 58 58 /// @param s0 \f$ s_0 \f$ is a fudge factor 59 /// @param absolute if true max(score, -score) is used 59 60 /// 60 61 SAMScore(const double s0, bool absolute=true); -
trunk/yat/statistics/Score.h
r865 r966 118 118 /// is wanted. 119 119 /// 120 /// @a value and @weight are copied to utility::vector and the120 /// \a value and \a weight are copied to utility::vector and the 121 121 /// corresponding operator is called. If speed is important this 122 122 /// operator should be implemented in inherited class to avoid -
trunk/yat/statistics/VectorFunction.h
r865 r966 36 36 struct VectorFunction 37 37 { 38 /** 39 \brief Destructor 40 */ 38 41 virtual ~VectorFunction(); 42 43 /** 44 \brief abstract interface 45 */ 39 46 virtual double operator()(const std::vector<double>&) const=0; 40 47 }; … … 89 96 }; 90 97 91 98 /** 99 Functor that picks Nth smalles element in a vector. 100 */ 92 101 class Nth_Element : public VectorFunction 93 102 { -
trunk/yat/statistics/euclidean_vector_distance.h
r937 r966 23 23 : public vector_distance_tag 24 24 { 25 /// \brief tag for euclidean distance 25 26 typedef euclidean_vector_distance_tag distance; 26 27 }; -
trunk/yat/statistics/pearson_vector_distance.h
r937 r966 22 22 : public vector_distance_tag 23 23 { 24 /// \brief tag for pearson distance 24 25 typedef pearson_vector_distance_tag distance; 25 26 }; -
trunk/yat/statistics/tScore.h
r865 r966 80 80 2 } \f$ 81 81 82 \param target Target defining the two groups 83 \param value Vector with data points on which calculation is based 82 84 @param dof double pointer in which approximation of degrees of 83 85 freedom is returned: pos.n()+neg.n()-2. See AveragerWeighted. … … 100 102 } \f$. See AveragerWeighted for details. 101 103 104 \param target Target defining the two groups 105 \param value Vector with values/weights on which calculation is based 102 106 @param dof double pointer in which approximation of degrees of 103 107 freedom is returned: pos.n()+neg.n()-2. See AveragerWeighted. … … 154 158 + n_y - 2 } \f$. See AveragerWeighted for details. 155 159 160 \param target Target defining the two groups 161 \param value Vector with data values on which calculation is based 162 \param weight Vector with weight associated to \a value 156 163 @param dof double pointer in which approximation of degrees of 157 164 freedom is returned: pos.n()+neg.n()-2. See AveragerWeighted. -
trunk/yat/statistics/vector_distance.h
r958 r966 18 18 /// For each measure to calculate distances between containers 19 19 /// with random access iterators one should provide a struct 20 /// whichinherits from vector_distance_tag and provides a "label" for20 /// that inherits from vector_distance_tag and provides a "label" for 21 21 /// the distance measure. 22 22 /// 23 23 struct vector_distance_tag { 24 /// tag defining distance measure 24 25 typedef vector_distance_tag distance; 25 26 }; … … 36 37 template <class T> 37 38 struct vector_distance_traits { 39 /// \return distance type 38 40 typedef typename T::distance distance; 39 41 }; -
trunk/yat/utility/Iterator.h
r936 r966 157 157 \brief Equality operator 158 158 159 \return True if \a lhs and \ rhs are pointing to same element159 \return True if \a lhs and \a rhs are pointing to same element 160 160 */ 161 161 friend bool operator==(const Iterator<return_type, Container>& lhs, … … 166 166 \brief Non-equality operator 167 167 168 \return False if \a lhs and \ rhs are pointing to same element168 \return False if \a lhs and \a rhs are pointing to same element 169 169 */ 170 170 friend bool operator!=(const Iterator<return_type, Container>& lhs, -
trunk/yat/utility/TypeInfo.h
r872 r966 47 47 @brief Constructor 48 48 */ 49 // For convenience we allow implicit conversion from type_info to 50 // TypeInfo. 49 51 TypeInfo(const std::type_info&); 50 52 51 53 /** 54 \return stored type_info 52 55 */ 53 56 const std::type_info& get(void) const; -
trunk/yat/utility/iterator_traits.h
r958 r966 31 31 namespace utility { 32 32 33 /* 33 /** 34 34 Struct to be used to make compile-time decision that Iterator is 35 35 unweighted, which is the default. … … 39 39 }; 40 40 41 /* 41 /** 42 42 Struct to be used to make compile-time decision that Iterator is 43 43 weighted. Some algorithms come in also in a weighted version in … … 49 49 }; 50 50 51 // All iterators should default to unweighted type ...51 /// All iterators should default to unweighted type ... 52 52 template <class T> 53 53 struct weighted_iterator_traits { … … 55 55 }; 56 56 57 // but specialized to return weighted type for some things57 /// but specialized to return weighted type for some things 58 58 // 59 59 // if you add a new weighted iterator, add a new specialization like … … 66 66 67 67 68 /* 68 /** 69 69 Metafunction that works on a pair weighted-unweighted types and 70 70 return weighted_type. The metafunction is specialized for … … 76 76 }; 77 77 78 /* 78 /** 79 79 Specialization that sets type to be unweighted when both arguments 80 80 are unweighted … … 85 85 }; 86 86 87 /* 87 /** 88 88 struct used to determine if a pair of iterators should be treated 89 89 as weighted. If both iterators are unweighted, type is set to … … 97 97 }; 98 98 99 /* 99 /** 100 100 Same as weighted_iterator_traits2 but for 3 arguments. 101 101 */ … … 107 107 }; 108 108 109 // check (at compile time) that iterator is unweighted.109 /// check (at compile time) that iterator is unweighted. 110 110 inline void check_iterator_is_unweighted(unweighted_type x){} 111 112 /** 113 check (at compile time) that iterator \a iter is unweighted. This 114 function is strictly not needed, but exists only for convenience. 115 */ 111 116 template <class Iter> 112 117 void check_iterator_is_unweighted(Iter iter) … … 116 121 117 122 118 /* 123 /** 119 124 Function to be used to make compile-time decision how to return 120 125 data from an iterator separating two cases: weighted and … … 130 135 weighted_iterator_traits<Iter>::type()); } 131 136 137 /** 138 \return data for weighted iterator 139 */ 132 140 template <class Iter> 133 141 double iterator_traits_data(Iter i, weighted_type) 134 142 { return i.data(); } 135 143 144 /** 145 \return data for unweighted data 146 */ 136 147 template <class Iter> 137 148 double iterator_traits_data(Iter i, unweighted_type) 138 149 { return *i; } 139 150 140 /* 151 /** 141 152 Function to be used to make compile-time decision how to return 142 153 data from an iterator separating two cases: weighted and … … 153 164 weighted_iterator_traits<Iter>::type()); } 154 165 166 /** 167 \return weight for weighted iterator 168 */ 155 169 template <class Iter> 156 170 double iterator_traits_weight(Iter i, weighted_type) 157 171 { return i.weight(); } 158 172 173 /** 174 \return weight for unweighted iterator 175 */ 159 176 template <class Iter> 160 177 double iterator_traits_weight(Iter i, unweighted_type) -
trunk/yat/utility/utility.h
r917 r966 50 50 /** 51 51 @return true if string \a s fulfills regular expression \verbatim 52 ^\w* \endverbatim \a other \verba im \w*$ \endverbatim (case52 ^\w* \endverbatim \a other \verbatim \w*$ \endverbatim (case 53 53 insensitive) 54 54 */ -
trunk/yat/utility/vector.h
r899 r966 88 88 public: 89 89 90 /// \brief vector::iterator 90 91 typedef Iterator<double&, vector> iterator; 92 /// \brief vector::const_iterator 91 93 typedef Iterator<const double, const vector> const_iterator; 92 94 … … 219 221 220 222 /** 223 \return mutable iterator to start of vector 221 224 */ 222 225 iterator begin(void); 223 226 224 227 /** 228 \return read-only iterator to start of vector 225 229 */ 226 230 const_iterator begin(void) const; … … 243 247 244 248 /** 249 \return mutable iterator to end of vector 245 250 */ 246 251 iterator end(void); 247 252 248 253 /** 254 \return read-only iterator to end of vector 249 255 */ 250 256 const_iterator end(void) const; -
trunk/yat/utility/yat_assert.h
r936 r966 30 30 namespace utility { 31 31 32 /** 33 \brief yat_assert is similar to assert in std. 34 35 If YAT_DEBUG is enabled and \a assertion is false, and exception 36 X is thrown using constructor X(\a msg ). 37 */ 32 38 template<class X> inline void yat_assert(bool assertion, std::string msg="") 33 39 #ifdef YAT_DEBUG
Note: See TracChangeset
for help on using the changeset viewer.