Comments (4)
I'm not a maintainer of this package, but here's an update to the example in the readme that works for me:
using MLJBase, RDatasets, MLJModels
PLSRegressor = @load PLSRegressor pkg=PartialLeastSquaresRegressor
# loading data and selecting some features
data = dataset("datasets", "longley")[:, 2:5]
# unpacking the target
y, X = unpack(data, ==(:GNP))
# loading the model
regressor = PLSRegressor(n_factors=2)
# building a pipeline with scaling on data
pipe = Standardizer |> regressor
model = TransformedTargetModel(pipe, transformer=Standardizer())
# a simple hould out
(Xtrain, Xtest), (ytrain, ytest) = partition((X, y), 0.7, rng=123, multi=true)
mach = machine(model, Xtest, ytest)
fit!(mach)
yhat = predict(mach, Xtest)
mae(yhat, ytest) |> mean
Note you need PartialLeastSquaresRegressor in your environment.
from partialleastsquaresregressor.jl.
Readme updated.
from partialleastsquaresregressor.jl.
Thanks @ablaom .
Now it is ok @JeffFessler ?
I am a little away from package maintenance due to other work tasks.
from partialleastsquaresregressor.jl.
Yes, that version ran fine for me. Thanks @ablaom!
I guess I'll leave the issue open and someone can close it after the readme gets updated...
from partialleastsquaresregressor.jl.
Related Issues (18)
- PLS2 regressor worse than baseline for unifrom random data HOT 7
- Possible improvement analysing scikit implementation
- Package announcement? HOT 6
- Diagnostics
- Improve prediction time
- Add SIMPLS
- Add Documentation HOT 1
- kpls.jl trainer contains unused (but populated) matrix
- Extract Loading and Score plot HOT 2
- Output of fitted_params(mach) and report(mach) is a bit confusing HOT 2
- Question about model.P attribute
- Regressors failing for some kinds of data HOT 1
- Error tagging new release
- ERROR: Unsatisfiable requirements detected for package PLSRegressor [fba1ee03]:
- Info about upcoming removal of packages in the General registry
- Port to MLJ.jl HOT 10
- check_constant_cols doesn't work on Adjoint HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from partialleastsquaresregressor.jl.