Skip to content

Commit 4ee2651

Browse files
author
Soeren Sonnenburg
committed
seed the rng to the heisenbug and make the kernel more diagonally
dominant to make it p.d.
1 parent 5a73240 commit 4ee2651

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

examples/undocumented/ruby_modular/classifier_custom_kernel_modular.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,12 @@
88
def classifier_custom_kernel_modular(c=1,dim=7)
99

1010
Modshogun::Math.init_random(c)
11+
NArray.srand(17)
1112

1213
lab = (2*NArray.float(dim).random! - 1).sign
1314
pp lab
1415
data= NMatrix.float(dim, dim).random!
15-
symdata=data*data.transpose + NMatrix.float(dim,dim).unit
16+
symdata=data*data.transpose + 10*NMatrix.float(dim,dim).unit
1617

1718
kernel=Modshogun::CustomKernel.new
1819
kernel.set_full_kernel_matrix_from_full(data)

0 commit comments

Comments
 (0)