I am using LIBSVM.jl to train a SVM classification model. Apparently the model in my code below trains successfully. However, after running it a few times it crashes (after about 10 repetitions). It shows a segmentation fault message. Please, how could I fix it?
using Random;using LIBSVM Random.seed!(1) nSamples = 200;nFeatures = 150 x = rand(nFeatures,nSamples) y = ceil.(Int,10*x[end,:]) for repeat = 1:500 C = repeat + 0.0 model = svmtrain(x, y; kernel=LIBSVM.Kernel.Linear, cost=C); y_hat, decision_values = svmpredict(model, x); @info(" $repeat: C = $C correclty classified $(sum(y_hat.==y))") end
I am using LIBSVM v0.4.0, Atom v0.12.15, and macos. Many thanks!