Skip to content

Penalized B-spline dies while building  #132

@yrzhanov

Description

@yrzhanov

Hello,
The library compiles on Windows 10 VS 2019 fine, example compiles and runs correctly. However, when I try to use it in my code the program dies when P-spline is being built. I use the following code:
DataTable samples;
DenseVector x(1);
// Data is added to data table:
for all i:
x(0) = dataX[i];
samples.addSample(x, (double)dataY[i]);

BSpline pspline = BSpline::Builder(samples)
	.degree(3)
	.smoothing(BSpline::Smoothing::PSPLINE)
	.alpha(0.03)
	.build();

Where the data is:
X Y
0 5375.00 -1.7169
1 5425.00 -1.8601
2 5426.00 -1.5700
3 5475.00 -1.1063
4 5525.00 -1.6225
5 5526.00 -1.5294
6 5575.00 -1.0975
7 5576.00 -0.9168
8 5625.00 -1.6232
9 5626.00 -1.1228
10 5675.00 -1.6983
11 5676.00 -0.9332
12 5725.00 -1.3473
13 5775.00 -1.9296
14 5776.00 -1.2617
15 5825.00 -0.9127
16 5875.00 -1.1056
17 5876.00 -1.0418
18 5925.00 -1.0078
19 5975.00 -1.0539
20 5976.00 -0.7310
21 6025.00 -1.0621
22 6026.00 -0.7609
23 6075.00 -0.7966
24 6125.00 -0.8065
25 6175.00 -1.3996
CrashStack

The call stack is shown on the attached PNG.
Could you please advise how to find the problem?

Thank you,
Yuri Rzhanov

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