forked from blei-lab/lda-c
-
Notifications
You must be signed in to change notification settings - Fork 0
/
lda-estimate.h
50 lines (38 loc) · 932 Bytes
/
lda-estimate.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#ifndef LDA_ESTIMATE_H
#define LDA_ESTIMATE_H
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <float.h>
#include <string.h>
#include <time.h>
#include "lda.h"
#include "lda-data.h"
#include "lda-inference.h"
#include "lda-model.h"
#include "lda-alpha.h"
#include "utils.h"
#include "cokus.h"
int LAG = 5;
float EM_CONVERGED;
int EM_MAX_ITER;
int ESTIMATE_ALPHA;
double INITIAL_ALPHA;
int NTOPICS;
double doc_e_step(document* doc,
double* gamma,
double** phi,
lda_model* model,
lda_suffstats* ss);
void save_gamma(char* filename,
double** gamma,
int num_docs,
int num_topics);
void run_em(char* start,
char* directory,
corpus* corpus);
void read_settings(char* filename);
void infer(char* model_root,
char* save,
corpus* corpus);
#endif