Skip to content

multilabel classification XGBoost and hyperparameter tuning

5 messages · Agnes g2g, Bert Gunter, Carlos Ortega

#
Hi all,

I want to do multilabel classification with XGBoost and tune hyperparameters.
With the mlr package this does not seem possible, see https://stackoverflow.com/questions/67640953/feature-names-stored-in-object-and-newdata-are-different-using-mlr-package?noredirect=1#comment119651508_67640953

Any ideas how to solve this?

What other packages support multilabel classification for XGBoost and has the possibility to tune hyperparameters?

Thanks in advance!

Bye,
Agnes
#
1. A web search on "xgboost R" brought up R package "xgboost" which you did
not mention. Did you not first try a web search or did you find that it did
not meet your needs?

2. Have you looked here:  https://cran.r-project.org/web/views/Cluster.html
or here: https://cran.r-project.org/web/views/MachineLearning.html

Cran's "task views" are a useful resource for such "does R have...?"
questions.


Bert Gunter

"The trouble with having an open mind is that people keep coming along and
sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
On Thu, May 27, 2021 at 7:29 AM Agnes g2g <agnesg2g at hotmail.com> wrote:

            

  
  
#
Thank you for your reply.
As far as I can see xgboost package does not provide multilabel classification.
The mlr package uses a wrapper for xgboost, so I have used the package xgboost. But I still have the problem with the hyperparameter tuning.

Did I understand you correctly?
Do you have any other suggestion?

Bye,
Agnes

________________________________
Van: Bert Gunter <bgunter.4567 at gmail.com>
Verzonden: donderdag 27 mei 2021 16:44
Aan: Agnes g2g <agnesg2g at hotmail.com>
CC: r-help at r-project.org <r-help at r-project.org>
Onderwerp: Re: [R] multilabel classification XGBoost and hyperparameter tuning

1. A web search on "xgboost R" brought up R package "xgboost" which you did not mention. Did you not first try a web search or did you find that it did not meet your needs?

2. Have you looked here:  https://cran.r-project.org/web/views/Cluster.html
or here: https://cran.r-project.org/web/views/MachineLearning.html

Cran's "task views" are a useful resource for such "does R have...?" questions.


Bert Gunter

"The trouble with having an open mind is that people keep coming along and sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
On Thu, May 27, 2021 at 7:29 AM Agnes g2g <agnesg2g at hotmail.com<mailto:agnesg2g at hotmail.com>> wrote:
Hi all,

I want to do multilabel classification with XGBoost and tune hyperparameters.
With the mlr package this does not seem possible, see https://stackoverflow.com/questions/67640953/feature-names-stored-in-object-and-newdata-are-different-using-mlr-package?noredirect=1#comment119651508_67640953

Any ideas how to solve this?

What other packages support multilabel classification for XGBoost and has the possibility to tune hyperparameters?

Thanks in advance!

Bye,
Agnes


______________________________________________
R-help at r-project.org<mailto:R-help at r-project.org> mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
#
One other suggestion. Per the posting guide linked below, statistical
issues such as your query on "hyperparameter tuning" are off topic on this
list, as are questions about specific nonstandard packages. You might try
posting on stats.stackexchange.com instead for help on such matters.

Bert Gunter

"The trouble with having an open mind is that people keep coming along and
sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
On Thu, May 27, 2021 at 7:51 AM Agnes g2g <agnesg2g at hotmail.com> wrote:

            

  
  
#
Hello Agnes,

Yes, it is true, "xgboost" is not oriented for a "multi-label"
classification. "xgboost" can handle "multi-class" but not "multi-label".

Bue in "mlr", you can handle "multi-class" problems although not with
"xgboost" a base learner algorithm. You can see here how you can handle
that with "mlr":


   - https://mlr.mlr-org.com/articles/tutorial/multilabel.html


Besides that, you can see if these other alternatives could work for your
problem:

   - "utiml" was one of them but now it's not avaialble on CRAN (
   https://github.com/rivolli/utiml).
   - And this other one "mldr" could help you out:
   https://cran.r-project.org/web/packages/mldr/vignettes/mldr.pdf.

Thanks,
Carlos.
On Thu, May 27, 2021 at 7:30 PM Agnes g2g <agnesg2g at hotmail.com> wrote: