Class SolverMCSVM_CS


  • class SolverMCSVM_CS
    extends java.lang.Object
    Copyright (c) 2007-2014 The LIBLINEAR Project. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither name of copyright holders nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. A coordinate descent algorithm for multi-class support vector machines by Crammer and Singer
     min_{\alpha} 0.5 \sum_m ||w_m(\alpha)||^2 + \sum_i \sum_m e^m_i alpha^m_i
     s.t. \alpha^m_i 
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private double[] B  
      private double[] C  
      private double eps  
      private double[] G  
      private int l  
      private int max_iter  
      private int nr_class  
      private Problem prob  
      private int w_size  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private boolean be_shrunk​(int i, int m, int yi, double alpha_i, double minG)  
      private int GETI​(int i)  
      void solve​(double[] w)  
      private void solve_sub_problem​(double A_i, int yi, double C_yi, int active_i, double[] alpha_new)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • B

        private final double[] B
      • C

        private final double[] C
      • eps

        private final double eps
      • G

        private final double[] G
      • max_iter

        private final int max_iter
      • w_size

        private final int w_size
      • l

        private final int l
      • nr_class

        private final int nr_class
    • Constructor Detail

      • SolverMCSVM_CS

        public SolverMCSVM_CS​(Problem prob,
                              int nr_class,
                              double[] C)
      • SolverMCSVM_CS

        public SolverMCSVM_CS​(Problem prob,
                              int nr_class,
                              double[] C,
                              double eps)
      • SolverMCSVM_CS

        public SolverMCSVM_CS​(Problem prob,
                              int nr_class,
                              double[] weighted_C,
                              double eps,
                              int max_iter)
    • Method Detail

      • GETI

        private int GETI​(int i)
      • be_shrunk

        private boolean be_shrunk​(int i,
                                  int m,
                                  int yi,
                                  double alpha_i,
                                  double minG)
      • solve

        public void solve​(double[] w)
      • solve_sub_problem

        private void solve_sub_problem​(double A_i,
                                       int yi,
                                       double C_yi,
                                       int active_i,
                                       double[] alpha_new)