Last data update: 2014.03.03

medSTC

Package: medSTC
Type: Package
Title: A max-margin supervised Sparse Topical Coding Model
Version: 1.0.0
Date: 2013-01-15
Author: Jun Zhu <junzhu@cs.cmu.edu>, Aykut FIRAT <aykut@mit.edu>
Maintainer: Aykut FIRAT <aykut@crimsonhexagon.com>
Description: This is a C++ implementation of Sparse Topical Coding
(STC), a model of discrete data which is fully described in Zhu
et al. (2011) (http://www.cs.cmu.edu/~junzhu/stc/stc.pdf). It
can be used for multi-class classification and describing
documents with underlying sparse topics.
Depends: R (>= 2.10)
License: file LICENSE
LazyLoad: yes
Packaged: 2013-01-23 20:17:33 UTC; aykut
Repository: CRAN
Date/Publication: 2013-01-24 08:24:00
NeedsCompilation: yes
License_restricts_use: yes

● 0 images, 3 functions, 1 datasets
● Reverse Depends: 0

Install log

* installing to library '/home/ddbj/local/lib64/R/library'
* installing *source* package 'medSTC' ...
** package 'medSTC' successfully unpacked and MD5 sums checked
** libs
g++ -I/home/ddbj/local/lib64/R/include -DNDEBUG -I. -I/usr/local/include    -fpic  -g -O2  -c medstc/cokus.cpp -o medstc/cokus.o
g++ -I/home/ddbj/local/lib64/R/include -DNDEBUG -I. -I/usr/local/include    -fpic  -g -O2  -c medstc/lbfgscpp.cpp -o medstc/lbfgscpp.o
g++ -I/home/ddbj/local/lib64/R/include -DNDEBUG -I. -I/usr/local/include    -fpic  -g -O2  -c medstc/medstc.cpp -o medstc/medstc.o
medstc/medstc.cpp: In member function 'void MedSTC::load_model(char*)':
medstc/medstc.cpp:846:49: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  fscanf(fileptr, "num_topics %d\n", &num_topics);
                                                 ^
medstc/medstc.cpp:847:49: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  fscanf(fileptr, "num_labels %d\n", &num_labels);
                                                 ^
medstc/medstc.cpp:848:47: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  fscanf(fileptr, "num_terms %d\n", &num_terms);
                                               ^
medstc/medstc.cpp:849:45: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  fscanf(fileptr, "num_docs %d\n", &num_docs);
                                             ^
medstc/medstc.cpp:850:31: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  fscanf(fileptr, "C %f\n", &C);
                               ^
medstc/medstc.cpp:851:42: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  fscanf(fileptr, "lambda %f\n", &dLambda);
                                          ^
medstc/medstc.cpp:852:40: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  fscanf(fileptr, "gamma %f\n", &dGamma);
                                        ^
medstc/medstc.cpp:853:36: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  fscanf(fileptr, "rho %f\n", &dRho);
                                    ^
medstc/medstc.cpp:865:42: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  fscanf(fileptr, "%lf\n", &m_dPoisOffset);
                                          ^
medstc/medstc.cpp:868:29: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
    fscanf(fileptr, "%f", &x);
                             ^
medstc/medstc.cpp:877:33: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  fscanf(fileptr, "%lf\n", &m_dB);
                                 ^
medstc/medstc.cpp:880:29: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
    fscanf(fileptr, "%f", &x);
                             ^
medstc/medstc.cpp: In member function 'void MedSTC::readLowDimData(char*, int&)':
medstc/medstc.cpp:1337:33: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   fscanf(fileptr, "%d", &nLabel);
                                 ^
medstc/medstc.cpp:1341:42: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
    fscanf(fileptr, "%d:%lf", &wrd, &dval);
                                          ^
g++ -I/home/ddbj/local/lib64/R/include -DNDEBUG -I. -I/usr/local/include    -fpic  -g -O2  -c medstc/utils.cpp -o medstc/utils.o
g++ -I/home/ddbj/local/lib64/R/include -DNDEBUG -I. -I/usr/local/include    -fpic  -g -O2  -c medstc/corpus.cpp -o medstc/corpus.o
medstc/corpus.cpp: In member function 'void Corpus::read_data(char*, int)':
medstc/corpus.cpp:257:32: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   fscanf(fileptr, "%d", &label);
                                ^
medstc/corpus.cpp:262:47: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
    fscanf(fileptr, "%10d:%10d", &word, &count);
                                               ^
medstc/corpus.cpp: In member function 'void Corpus::read_flickr_data(char*, int)':
medstc/corpus.cpp:301:47: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
    fscanf(fileptr, "%10d:%10d", &word, &count);
                                               ^
g++ -I/home/ddbj/local/lib64/R/include -DNDEBUG -I. -I/usr/local/include    -fpic  -g -O2  -c medstc/main.cpp -o medstc/main.o
medstc/main.cpp: In function 'SEXPREC* medSTCTrain(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP)':
medstc/main.cpp:221:40: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
    model.train("random", dir, c, &param);
                                        ^
g++ -I/home/ddbj/local/lib64/R/include -DNDEBUG -I. -I/usr/local/include    -fpic  -g -O2  -c medstc/params.cpp -o medstc/params.o
medstc/params.cpp: In member function 'void Params::read_settings(char*)':
medstc/params.cpp:46:49: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  fscanf(fileptr, "supervised %d\n", &SUPERVISED);
                                                 ^
medstc/params.cpp:47:48: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  fscanf(fileptr, "primal svm %d\n", &PRIMALSVM);
                                                ^
medstc/params.cpp:48:53: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  fscanf(fileptr, "var max iter %d\n", &VAR_MAX_ITER);
                                                     ^
medstc/params.cpp:49:57: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  fscanf(fileptr, "var convergence %f\n", &VAR_CONVERGED);
                                                         ^
medstc/params.cpp:50:51: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  fscanf(fileptr, "em max iter %d\n", &EM_MAX_ITER);
                                                   ^
medstc/params.cpp:51:55: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  fscanf(fileptr, "em convergence %f\n", &EM_CONVERGED);
                                                       ^
medstc/params.cpp:53:45: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  fscanf(fileptr, "model C %f\n", &INITIAL_C);
                                             ^
medstc/params.cpp:54:47: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  fscanf(fileptr, "delta ell %f\n", &DELTA_ELL);
                                               ^
medstc/params.cpp:55:41: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  fscanf(fileptr, "lambda %f\n", &LAMBDA);
                                         ^
medstc/params.cpp:56:35: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  fscanf(fileptr, "rho %f\n", &RHO);
                                   ^
medstc/params.cpp:57:52: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  fscanf(fileptr, "svm_alg_type %d\n", &SVM_ALGTYPE);
                                                    ^
medstc/params.cpp:59:53: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  fscanf(fileptr, "train_file: %s\n", train_filename);
                                                     ^
medstc/params.cpp:60:51: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  fscanf(fileptr, "test_file: %s\n", test_filename);
                                                   ^
medstc/params.cpp:61:46: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  fscanf(fileptr, "class_num: %d\n", &NLABELS);
                                              ^
g++ -I/home/ddbj/local/lib64/R/include -DNDEBUG -I. -I/usr/local/include    -fpic  -g -O2  -c svm_multiclass/svm_struct_api.cpp -o svm_multiclass/svm_struct_api.o
svm_multiclass/svm_struct_api.cpp: In function 'STRUCTMODEL read_struct_model(char*, STRUCT_LEARN_PARM*)':
svm_multiclass/svm_struct_api.cpp:480:63: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   fscanf(modelfl,"SVM-multiclass Version %s\n",version_buffer);
                                                               ^
svm_multiclass/svm_struct_api.cpp:485:53: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   fscanf(modelfl,"%d%*[^\n]\n", &sparm->num_classes);  
                                                     ^
svm_multiclass/svm_struct_api.cpp:486:54: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   fscanf(modelfl,"%d%*[^\n]\n", &sparm->num_features);  
                                                      ^
svm_multiclass/svm_struct_api.cpp:487:55: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   fscanf(modelfl,"%d%*[^\n]\n", &sparm->loss_function);  
                                                       ^
svm_multiclass/svm_struct_api.cpp:488:66: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   fscanf(modelfl,"%ld%*[^\n]\n", &model->kernel_parm.kernel_type);  
                                                                  ^
svm_multiclass/svm_struct_api.cpp:489:66: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   fscanf(modelfl,"%ld%*[^\n]\n", &model->kernel_parm.poly_degree);
                                                                  ^
svm_multiclass/svm_struct_api.cpp:490:64: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   fscanf(modelfl,"%lf%*[^\n]\n", &model->kernel_parm.rbf_gamma);
                                                                ^
svm_multiclass/svm_struct_api.cpp:491:63: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   fscanf(modelfl,"%lf%*[^\n]\n", &model->kernel_parm.coef_lin);
                                                               ^
svm_multiclass/svm_struct_api.cpp:492:65: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   fscanf(modelfl,"%lf%*[^\n]\n", &model->kernel_parm.coef_const);
                                                                 ^
svm_multiclass/svm_struct_api.cpp:493:62: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   fscanf(modelfl,"%[^#]%*[^\n]\n", model->kernel_parm.custom);
                                                              ^
svm_multiclass/svm_struct_api.cpp:495:51: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   fscanf(modelfl,"%ld%*[^\n]\n", &model->totwords);
                                                   ^
svm_multiclass/svm_struct_api.cpp:496:49: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   fscanf(modelfl,"%ld%*[^\n]\n", &model->totdoc);
                                                 ^
svm_multiclass/svm_struct_api.cpp:497:49: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   fscanf(modelfl,"%ld%*[^\n]\n", &model->sv_num);
                                                 ^
svm_multiclass/svm_struct_api.cpp:498:44: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   fscanf(modelfl,"%lf%*[^\n]\n", &model->b);
                                            ^
svm_multiclass/svm_struct_api.cpp:506:32: warning: ignoring return value of 'char* fgets(char*, int, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
     fgets(line,(int)ll,modelfl);
                                ^
g++ -I/home/ddbj/local/lib64/R/include -DNDEBUG -I. -I/usr/local/include    -fpic  -g -O2  -c svm_multiclass/svm_struct_common.cpp -o svm_multiclass/svm_struct_common.o
g++ -I/home/ddbj/local/lib64/R/include -DNDEBUG -I. -I/usr/local/include    -fpic  -g -O2  -c svm_multiclass/svm_struct_learn.cpp -o svm_multiclass/svm_struct_learn.o
svm_multiclass/svm_struct_learn.cpp: In function 'void svm_learn_struct_joint(SAMPLE, STRUCT_LEARN_PARM*, LEARN_PARM*, KERNEL_PARM*, STRUCTMODEL*, int)':
svm_multiclass/svm_struct_learn.cpp:642:48: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
       print_percent_progress(&progress,n,10,".");
                                                ^
svm_multiclass/svm_struct_learn.cpp: In function 'void svm_learn_struct_joint(SAMPLE, STRUCT_LEARN_PARM*, LEARN_PARM*, KERNEL_PARM*, STRUCTMODEL*, int, double*, const int&)':
svm_multiclass/svm_struct_learn.cpp:1091:48: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
       print_percent_progress(&progress,n,10,".");
                                                ^
svm_multiclass/svm_struct_learn.cpp: In function 'void update_constraint_cache_for_model(CCACHE*, MODEL*)':
svm_multiclass/svm_struct_learn.cpp:1627:53: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
    print_percent_progress(&progress,ccache->n,10,"+");
                                                     ^
g++ -I/home/ddbj/local/lib64/R/include -DNDEBUG -I. -I/usr/local/include    -fpic  -g -O2  -c svmlight/svm_common.cpp -o svmlight/svm_common.o
svmlight/svm_common.cpp: In function 'MODEL* read_model(char*)':
svmlight/svm_common.cpp:1343:58: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   fscanf(modelfl,"SVM-light Version %s\n",version_buffer);
                                                          ^
svmlight/svm_common.cpp:1348:66: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   fscanf(modelfl,"%ld%*[^\n]\n", &model->kernel_parm.kernel_type);  
                                                                  ^
svmlight/svm_common.cpp:1349:66: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   fscanf(modelfl,"%ld%*[^\n]\n", &model->kernel_parm.poly_degree);
                                                                  ^
svmlight/svm_common.cpp:1350:64: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   fscanf(modelfl,"%lf%*[^\n]\n", &model->kernel_parm.rbf_gamma);
                                                                ^
svmlight/svm_common.cpp:1351:63: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   fscanf(modelfl,"%lf%*[^\n]\n", &model->kernel_parm.coef_lin);
                                                               ^
svmlight/svm_common.cpp:1352:65: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   fscanf(modelfl,"%lf%*[^\n]\n", &model->kernel_parm.coef_const);
                                                                 ^
svmlight/svm_common.cpp:1353:62: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   fscanf(modelfl,"%[^#]%*[^\n]\n", model->kernel_parm.custom);
                                                              ^
svmlight/svm_common.cpp:1355:51: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   fscanf(modelfl,"%ld%*[^\n]\n", &model->totwords);
                                                   ^
svmlight/svm_common.cpp:1356:49: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   fscanf(modelfl,"%ld%*[^\n]\n", &model->totdoc);
                                                 ^
svmlight/svm_common.cpp:1357:49: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   fscanf(modelfl,"%ld%*[^\n]\n", &model->sv_num);
                                                 ^
svmlight/svm_common.cpp:1358:44: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   fscanf(modelfl,"%lf%*[^\n]\n", &model->b);
                                            ^
svmlight/svm_common.cpp:1366:32: warning: ignoring return value of 'char* fgets(char*, int, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
     fgets(line,(int)ll,modelfl);
                                ^
g++ -I/home/ddbj/local/lib64/R/include -DNDEBUG -I. -I/usr/local/include    -fpic  -g -O2  -c svmlight/svm_hideo.cpp -o svmlight/svm_hideo.o
g++ -I/home/ddbj/local/lib64/R/include -DNDEBUG -I. -I/usr/local/include    -fpic  -g -O2  -c svmlight/svm_learn.cpp -o svmlight/svm_learn.o
svmlight/svm_learn.cpp: In function 'double estimate_sphere(MODEL*)':
svmlight/svm_learn.cpp:4076:67: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
  nulldoc=create_example(-2,0,0,0.0,create_svector(&nullword,"",1.0)); 
                                                                   ^
svmlight/svm_learn.cpp: In function 'double estimate_r_delta(DOC**, long int, KERNEL_PARM*)':
svmlight/svm_learn.cpp:4099:67: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
  nulldoc=create_example(-2,0,0,0.0,create_svector(&nullword,"",1.0)); 
                                                                   ^
svmlight/svm_learn.cpp: In function 'double estimate_r_delta_average(DOC**, long int, KERNEL_PARM*)':
svmlight/svm_learn.cpp:4124:67: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
  nulldoc=create_example(-2,0,0,0.0,create_svector(&nullword,"",1.0)); 
                                                                   ^
g++ -shared -L/home/ddbj/local/lib64/R/lib -L/usr/local/lib64 -o medSTC.so medstc/cokus.o medstc/lbfgscpp.o medstc/medstc.o medstc/utils.o medstc/corpus.o medstc/main.o medstc/params.o svm_multiclass/svm_struct_api.o svm_multiclass/svm_struct_common.o svm_multiclass/svm_struct_learn.o svmlight/svm_common.o svmlight/svm_hideo.o svmlight/svm_learn.o -lstdc++ -L/home/ddbj/local/lib64/R/lib -lR
medstc/main.o: In function `createDir(char*)':
/tmp/Rtmpi5pOJy/R.INSTALL789fe22ceec/medSTC/src/medstc/main.cpp:115: warning: the use of `mktemp' is dangerous, better use `mkstemp' or `mkdtemp'
installing to /home/ddbj/local/lib64/R/library/medSTC/libs
** R
** data
** demo
** preparing package for lazy loading
** help
*** installing help indices
  converting help for package 'medSTC'
    finding HTML links ... done
    medSTC-package                          html  
    medSTC                                  html  
    newsgroups                              html  
    predict.medSTC                          html  
** building package indices
** testing if installed package can be loaded
* DONE (medSTC)
Making 'packages.html' ... done