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
src
process.c
Go to the documentation of this file.
1
/**********************************************************/
2
/*! \file
3
\brief This file constains routines for data pre-processing
4
*/
5
/**********************************************************/
6
7
8
#include<slim.h>
9
10
11
/**********************************************************/
12
/*! \brief Pre-process the data
13
*/
14
/**********************************************************/
15
void
preprocess
(
ctrl_t
* ctrl, gk_csr_t * train, gk_csr_t * test){
16
17
gk_csr_CreateIndex(train, GK_CSR_COL);
18
19
/* sort column indices */
20
gk_csr_SortIndices(train, GK_CSR_ROW);
21
if
(test){
22
gk_csr_SortIndices(test, GK_CSR_ROW);
23
24
/* sanity check */
25
if
(ctrl->
dbglvl
> 1)
26
check_train_test
(ctrl, train, test);
27
}
28
29
/* all in column-view of the training matrix */
30
gk_csr_CreateIndex(train, GK_CSR_COL);
31
32
}
33
34
35
Generated on Wed Dec 19 2012 12:35:19 for SLIM by
1.8.2