Fit Curve in a set of Points (PointCloud)

Hello
My goal is to adjust a polyline in a selection of points to draw a tube. I tried it with the tool from LunchBox with Machine Learning. But I cannot achieve that the curve runs cleanly within the points.
Does anyone have a good idea how to do that? In the end I want to be able to apply it to 3D points.

Thanks for the help

An example file is attached
Example_LinearRegression.gh (17.3 KB)

Not sure the problem is well defined. Can you provide an example (maybe just draw on a screenshot) with a curve, that represents the desired result? Or something that resembles it?

Example_LinearRegression Edited v0.gh (15.1 KB)
Nautilus, Clipper.
Not sure if this is a good idea.

1 Like