Skip to content

Running Error #12

@guozhizou

Description

@guozhizou

Running src/LDA-RLFM/R/model/examples.R, I got following exception:

(B) Fit a model

dyn.load("c_funcs.so");
source("R/c_funcs.R");
source("R/utils.R");
source("R/model/MCEM_MStep.R");
source("R/model/fit.MCEM.R");

set.seed(2);
ans = fit.MCEM(

  • nIter=5,         # Number of EM iterations
    
  • nSamples=100,    # Number of samples drawn in each E-step: could be a vector of size nIter.
    
  • nBurnIn=10,      # Number of burn-in draws before take samples for the E-step: could be a vector of size nIter.
    
  • factor=data.train$factor,   # Initial factor values
    
  • obs=data.train$obs,         # Observed rating
    
  • feature=data.train$feature, # Feature values
    
  • param=data.train$param,     # Initial parameter values
    
  • corpus=data.train$corpus,   # The text corpus
    
  • try=list(lambda=c(0.5,1,2,4,8), eta=c(0.5, 1, 2, 4)), # Values of lambda and eta that you want to try
    
  • out.level=1,                # out.level=1: Save the factor & parameter values to out.dir/est.highestCDL and out.dir/est.last
    
  • out.dir="/tmp/test/lda-rlfm", # out.level=2: Save the factor & parameter values of each iteration i to out.dir/est.i
    
  • out.append=FALSE,
    
  • debug=1,     # Set to 0 to disable internal sanity checking; Set to 100 for most detailed sanity checking
    
  • verbose=1,   # Set to 0 to disable console output; Set to 100 to print everything to the console
    
  • verbose.M=1, # Verbose setting for the M-step
    
  • use.C=TRUE,  # Whether to use the C implementation (R implementation does not have full functionalities)
    
  • lm=T         # Whether to use lm to fit linear regression (otherwise bayesglm will be used, which will be slow)
    
  • );

WARNING: Some terms do not belong to any items in the corpus.

*** caught segfault ***
address 0x0, cause 'unknown'

Traceback:
1: .C("fillInTopicCounts", output$cnt_item_topic, output$cnt_topic_term, output$cnt_topic, output$z_avg, corpus_topic, corpus$item, corpus$term, corpus$weight, as.integer(nItems), as.integer(nrow(corpus)), as.integer(nTopics), as.integer(nTerms), as.integer(nCorpusWeights), as.integer(debug), DUP = FALSE)
2: getTopicCounts(corpus, factor$corpus_topic, nItems, nTopics, size$nTerms)
3: fit.MCEM(nIter = 5, nSamples = 100, nBurnIn = 10, factor = data.train$factor, obs = data.train$obs, feature = data.train$feature, param = data.train$param, corpus = data.train$corpus, try = list(lambda = c(0.5, 1, 2, 4, 8), eta = c(0.5, 1, 2, 4)), out.level = 1, out.dir = "/tmp/test/lda-rlfm", out.append = FALSE, debug = 1, verbose = 1, verbose.M = 1, use.C = TRUE, lm = T)
An irrecoverable exception occurred. R is aborting now ...

Thanks for any help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions