I'm using the Julia package LowRankModels 
(https://github.com/madeleineudell/LowRankModels.jl/tree/dataframe-ux) and 
coming across a malloc error when making a single innocuous change to my 
code. 

For instance in the following sample code, changing a single parameter (the 
rank k)  from 10 to 40 makes the model go from running smoothly to 
producing a malloc error. 

Would really appreciate any pointers towards what might be going on /any 
tips to debug this error. Thanks!

Branch of LowRankModels: dataframe-ux

Link to 
Data: https://dl.dropboxusercontent.com/u/24399038/GSS2014cleanestCV10.csv

Julia code that reproduces the error:

######################

using DataFrames
# branch of LowRankModels found at 
https://github.com/NandanaSengupta/LowRankModels.jl/tree/dataframe-ux
using LowRankModels

### loading data table
df = readtable("GSS2014cleanestCV10.csv");
# eliminate first (id) column
df1 = df[:, 2:size(df)[2] ];


# vector of datatypes -- 3 types of columns: real, categorical and ordinal
datatypes = Array(Symbol, size(df1)[2])
datatypes[1:23] = :real
datatypes[24:54] = :ord
datatypes[55:size(df1)[2]] = :cat



################## run GLRM AND cross_validate with rank k = 10 
##############
######## Runs without any error

glrm_10 = GLRM(df1, 10, datatypes)

srand(10)
t1, t2, t3, t4 = cross_validate(glrm_10, nfolds = 5, params = Params(), 
init = init_svd!);


################## run GLRM AND cross_validate with rank k = 40 
##############
######## malloc error on cross_validate

glrm_40 = GLRM(df1, 40, datatypes) #, prob_scale = false)

srand(40)
t1, t2, t3, t4 = cross_validate(glrm_40, nfolds = 5, params = Params(), 
init = init_svd!);


Reply via email to