# Partial Least Squares

**URL:** https://discourse.julialang.org/t/partial-least-squares/133742
**Category:** Statistics
**Tags:** question
**Created:** [November 7, 2025, 6:43pm UTC](https://discourse.julialang.org/t/partial-least-squares/133742 "2025-11-07T18:43:52Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![eweiss](https://avatars.discourse-cdn.com/v4/letter/e/b487fb/32.png) [@eweiss](https://discourse.julialang.org/u/eweiss)
#### Post date: [November 7, 2025, 6:43pm UTC](https://discourse.julialang.org/t/partial-least-squares/133742/1 "2025-11-07T18:43:52Z")

</div>

I want to experiment with partial least squares regressions. My research points to lalvim’s PartialLeastSquaresRegressor as the only package with PLSR, but when I run Example 1, PLSRegressor() isn’t found. If there is another package with something to do PSLR, I haven’t found it.

Any suggestions?

---

<div class="post-metadata">

### Author: ![eldee](https://avatars.discourse-cdn.com/v4/letter/e/b5a626/32.png) [@eldee](https://discourse.julialang.org/u/eldee)
#### Post date: [November 11, 2025, 9:05am UTC](https://discourse.julialang.org/t/partial-least-squares/133742/2 "2025-11-11T09:05:58Z")

</div>

I’m not very familiar with the MLJ ecosystem, but in [its documentation](https://juliaai.github.io/MLJ.jl/stable/list_of_supported_models/#model_list) (September 2025) PartialLeastSquaresRegressor.jl’s `PLSRegressor` and `KPLSRegressor` are listed, so they should presumably work. I guess you should open an issue with MLJ.jl (though pessimistically this might just result in the package being taken off the list 🙂 ).

In any case, ‘loading’ `PLSRegressor` via  
`PLSRegressor = PartialLeastSquaresRegressor.PLSRegressor`  
seems to work, i.e. the rest of Example 1 then runs for me.

---

<div class="post-metadata">

### Author: ![eweiss](https://avatars.discourse-cdn.com/v4/letter/e/b487fb/32.png) [@eweiss](https://discourse.julialang.org/u/eweiss)
#### Post date: [November 11, 2025, 10:08pm UTC](https://discourse.julialang.org/t/partial-least-squares/133742/3 "2025-11-11T22:08:40Z")

</div>

> [@eweiss](#):
>
> PartialLeastSquaresRegressor

Thanks. At first your solution didn’t work. Then I removed MLJ and related modules and added them back in. Example 1 and 2 work with your modification to loading PLSRegressor and KPLSRegressor.
