SLIM
1.0
Sparse Linear Methods (SLIM) for top-n recommender systems
Main Page
Data Structures
Files
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Macros
Pages
examples
test_slim_learn.c
Go to the documentation of this file.
1
/**************************************************************/
2
/*! \file test_slim_learn.c
3
\brief This is to test slim_learn
4
5
\author Xia Ning
6
\version 1.0
7
\date 2011-2012
8
\copyright GNU Public License
9
*/
10
/**************************************************************/
11
12
#include<slim.h>
13
14
/**************************************************************/
15
/*! \brief The main entry for the learning
16
*/
17
/**************************************************************/
18
int
main
(
int
argc,
char
* argv[]){
19
20
srand(0);
21
22
/* parse command line */
23
ctrl_t
* ctrl =
create_ctrl
();
24
parse_cmdline
(ctrl, argc, argv);
25
26
/* I/O */
27
gk_csr_t * train = gk_csr_Read(ctrl->
train_file
, GK_CSR_FMT_CSR, 1, 1);
28
29
30
/* preprocess training data */
31
preprocess
(ctrl, train, NULL);
32
33
/* learning */
34
slim_learn
(ctrl, train);
35
36
37
/* clean up */
38
free_ctrl
(ctrl);
39
gk_csr_Free(&train);
40
41
42
}
Generated on Wed Dec 19 2012 12:35:19 for SLIM by
1.8.2