You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the documentation for Static transformers the example for the Averager uses @from_network but when I run that example it indicates that the way the code deprecated. Is the code in that example deprecated?
I'm just starting to look at MLJ and I'm interested in making a network that averages an array of continuous regression models. Alternatively is it possible to use stack but with a metalearner that just is average instead of a linear model?
X =source()
y =source()
ridge = (@load RidgeRegressor pkg=MultivariateStats)()
knn = (@load KNNRegressor)()
averager =Averager(0.5)
hotM =machine(OneHotEncoder(), X)
W =transform(hotM, X) # one-hot encode the input
ridgeM =machine(ridge, W, y)
y1 =predict(ridgeM, W)
knnM =machine(knn, W, y)
y2 =predict(knnM, W)
averagerM=machine(averager)
yhat =transform(averagerM, y1, y2)
learning_mach =machine(Deterministic(), X, y; predict=yhat)
@from_network learning_mach struct DoubleRegressor
regressor1=ridge
regressor2=knn
averager=averager
end
┌ Warning: Learning network machines are deprecated. For the recommended way of exporting learning networks as new stand-alone model types, see the "Learning Networks" section of the MLJ manual.
The text was updated successfully, but these errors were encountered:
In the documentation for Static transformers the example for the Averager uses @from_network but when I run that example it indicates that the way the code deprecated. Is the code in that example deprecated?
I'm just starting to look at MLJ and I'm interested in making a network that averages an array of continuous regression models. Alternatively is it possible to use
stack
but with a metalearner that just is average instead of a linear model?The text was updated successfully, but these errors were encountered: