Ignore:
Timestamp:
Feb 18, 2008, 5:37:50 AM (14 years ago)
Author:
Peter
Message:

fixes #313 - SVM constructor is void and passing kernel and target in train function instead

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/classifier/SVM.h

    r1087 r1100  
    5757  public:
    5858    ///
    59     /// Constructor taking the kernel and the target vector as
    60     /// input.
    61     ///
    62     /// @note if the @a target or @a kernel
    63     /// is destroyed the behaviour is undefined.
    64     ///
    65     SVM(const KernelLookup& kernel, const Target& target);
     59    /// \brief Constructor
     60    ///
     61    SVM(void);
    6662
    6763    ///
     
    7369
    7470    ///
    75     /// If DataLookup2D is not a KernelLookup a bad_cast exception is thrown.
    76     ///
    77     SVM* make_classifier(const DataLookup2D&, const Target&) const;
     71    ///
     72    ///
     73    SVM* make_classifier(void) const;
    7874
    7975    ///
     
    145141    ///
    146142    double predict(const DataLookupWeighted1D& input) const;
    147 
    148     ///
    149     /// @brief Function sets \f$ \alpha=0 \f$ and makes SVM untrained.
    150     ///
    151     void reset(void);
    152143
    153144    ///
     
    187178       @return true if succesful
    188179    */
    189     void train();
     180    void train(const KernelLookup& kernel, const Target& target);
    190181
    191182       
     
    243234    unsigned long int max_epochs_;
    244235    utility::vector output_;
    245     bool owner_;
    246236    SVindex sample_;
    247237    Target target_;
    248     bool trained_;
    249238    double tolerance_;
     239    bool trained_;
    250240
    251241  };
Note: See TracChangeset for help on using the changeset viewer.