ML piplines : attributes use / can we save elements in the attibutes of a list ?

Hi R studio comunity !

I have one question about ML R pipeline methods :

When you perform some machine learning pipelines, is it common to save some elements in the attributes of a list ?

Let say you perform a glmnet lasso, and then you need to save your alpha value in order to reuse it later in another glmnet lasso or whatever function.

So what I did is to save it in the attributes of my glmnet_fit : attributes(glm_fit)$alpha <- alpha.

I recall it latter with attributes(glm_fit)$alpha .

My question is : DO you think is a good practice to save in attributes?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.