# Make-least-squares-point-smoother from simple-polynomial/fit does not work

**URL:** <https://racket.discourse.group/t/make-least-squares-point-smoother-from-simple-polynomial-fit-does-not-work/559>\
**Category:** Questions & Answers\
**Created:** [January 12, 2022, 2:34am UTC](https://racket.discourse.group/t/make-least-squares-point-smoother-from-simple-polynomial-fit-does-not-work/559 "2022-01-12T02:34:37Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![JoePass](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/joepass/32/311_2.png) [@JoePass](https://racket.discourse.group/u/JoePass)\
**Post date:** [January 12, 2022, 2:34am UTC](https://racket.discourse.group/t/make-least-squares-point-smoother-from-simple-polynomial-fit-does-not-work/559/1 "2022-01-12T02:34:37Z")

</div>

I try to use polynomial smoothing of data [Simple Polynomials of One Variable](https://docs.racket-lang.org/simple-poly-manual/index.html). I use exactly the same example as in this site but for my data: `(define datasp (points->spline-evaluator data)) (define datasm (points->spline-evaluator ((make-least-squares-point-smoother 7 4 0) data)` . The first spline works well but second gives error: `make-least-squares-point-smoother: unbound identifier in: make-least-squares-point-smoother` . The `data` has 100 entries. I considered different values instead of 7 4 0 and have the same error. Why the example does not work?

---

<div class="post-metadata">

**Author:** ![soegaard](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/soegaard/32/19_2.png) [@soegaard](https://racket.discourse.group/u/soegaard)\
**Post date:** [January 13, 2022, 11:22am UTC](https://racket.discourse.group/t/make-least-squares-point-smoother-from-simple-polynomial-fit-does-not-work/559/2 "2022-01-13T11:22:52Z")

</div>

Can you paste an example we can try?

---

<div class="post-metadata">

**Author:** ![soegaard](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/soegaard/32/19_2.png) [@soegaard](https://racket.discourse.group/u/soegaard)\
**Post date:** [January 13, 2022, 3:34pm UTC](https://racket.discourse.group/t/make-least-squares-point-smoother-from-simple-polynomial-fit-does-not-work/559/3 "2022-01-13T15:34:10Z")

</div>

@JoePass

I think Deren meant to export the function `make-least-squares-point-smoother` from `simple-polynomial/fit` but forgot to do so.

Instead you can write:

```
(require simple-polynomial/private/poly-smooth)

```

Also, send Deren a bug report. His repo is here:

[https://bitbucket.org/derend/simple-polynomial/src/master/simple-polynomial/private/poly-smooth.rkt](https://bitbucket.org/derend/simple-polynomial/src/master/simple-polynomial/private/poly-smooth.rkt)

/Jens Axel

---

<div class="post-metadata">

**Author:** ![JoePass](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/joepass/32/311_2.png) [@JoePass](https://racket.discourse.group/u/JoePass)\
**Post date:** [January 13, 2022, 9:03pm UTC](https://racket.discourse.group/t/make-least-squares-point-smoother-from-simple-polynomial-fit-does-not-work/559/4 "2022-01-13T21:03:33Z")

</div>

Thank you. Now it works well. Sorry, but I do not know how to make bug report in the repo. I did not make it at once.

---

<div class="post-metadata">

**Author:** ![soegaard](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/soegaard/32/19_2.png) [@soegaard](https://racket.discourse.group/u/soegaard)\
**Post date:** [January 13, 2022, 9:49pm UTC](https://racket.discourse.group/t/make-least-squares-point-smoother-from-simple-polynomial-fit-does-not-work/559/5 "2022-01-13T21:49:44Z")

</div>

I looked around - and I couldn't figure it out either. I have a hunch that's feature the repo owner needs to pay for.

I suggest sending him a mail instead (I'll send his mail in a private message).
