/*
  Copyright(C) 2007-2012 National Institute of Information and Communications Technology
*/

/*
  svmtools
  Multiclass classification module
*/


#ifndef _SVM_MC_H_
#define _SVM_MC_H_


#include "svm_common.h"
#include "svm_smo.h"


#define SVM_MC_METHOD_OVR 0
#define SVM_MC_METHOD_PAIRWISE 1
#define SVM_MC_METHOD_SBT 2


typedef struct Svm_mc_mdl {
  int method;	/* Multi-classの方法 */
  int class;	/* クラスの数 */
  int *rank;	/* 確率の高い順番にクラス番号を格納 */
  int *vote;	/* 分類時の投票数 */
  SVM_MDL **mdl;	/* SVMのモデルの配列 */
} SVM_MC_MDL;


int svm_mc_makemdl(int method, int class, SVM_TPRM *tprm, SVM_EXM *mcexm, FILE *fp);
SVM_MC_MDL *svm_mc_readmdl(FILE *fp);
int svm_mc_decision(SVM_MC_MDL *mcmdl, SVM_SV *x);
int svm_mc_writemdl(SVM_MC_MDL *mcmdl, FILE *fp);


#endif
