classifiers/nb.c File Reference

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <assert.h>
#include "nb.h"
#include "../msg.c"
#include "../bio/mkSfx.c"
#include "../bio/new.c"
#include "../bio/ch2Id.c"
#include "../bio/save.c"
#include "../bio/find.c"
#include "../bio/mapP.c"
#include "../bio/del.c"
#include "../bio/sync_name.c"
#include "../hash/nps_vocab.c"
#include "../imat/imat_csr.c"
#include "../nps/fsync.c"

Functions

nb_counts_tnb_counts_new (long nCat, long nFeat)
void nb_counts_del (nb_counts_t *o)
void nb_counts_add (nb_counts_t *o, nps_imat_csr_t *inst)
nb_model_tnb_model_laplace (nb_counts_t *c, double addMarginal, double addConditional)
nb_model_tnb_model_wittenbell (nb_counts_t *c)
long nb_classify (nb_model_t *o, char ignore_marginals, s8_t *restrict ix, double *restrict val, long n, double *result)
void nb_model_del (nb_model_t *o)
int nb_model_save (nb_model_t *o, NPS_VOC_T *featDict, NPS_VOC_T *labDict, NPS_VOC_T *instDict, const char *root, nps_error_t *err)
nb_model_tnb_model_load (nb_model_t **o, NPS_VOC_T **featDict, NPS_VOC_T **labDict, const char *root, char ignore_marginals, nps_error_t *err)

Function Documentation

long nb_classify ( nb_model_t o,
char  ignore_marginals,
s8_t *restrict  ix,
double *restrict  val,
long  n,
double *  result 
)
void nb_counts_add ( nb_counts_t o,
nps_imat_csr_t inst 
)
void nb_counts_del ( nb_counts_t o  ) 
nb_counts_t* nb_counts_new ( long  nCat,
long  nFeat 
)
void nb_model_del ( nb_model_t o  ) 
nb_model_t* nb_model_laplace ( nb_counts_t c,
double  addMarginal,
double  addConditional 
)
nb_model_t* nb_model_load ( nb_model_t **  o,
NPS_VOC_T **  featDict,
NPS_VOC_T **  labDict,
const char *  root,
char  ignore_marginals,
nps_error_t err 
)
int nb_model_save ( nb_model_t o,
NPS_VOC_T *  featDict,
NPS_VOC_T *  labDict,
NPS_VOC_T *  instDict,
const char *  root,
nps_error_t err 
)
nb_model_t* nb_model_wittenbell ( nb_counts_t c  ) 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines
Generated on Sun Sep 11 09:40:46 2011 for NPSML by  doxygen 1.6.3