# \#mlj

**URL:** https://discourse.julialang.org/tag/mlj/307.md

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

---

## [MLJ/MljFlux standardisation of variables in each cross-validation fold](https://discourse.julialang.org/t/mlj-mljflux-standardisation-of-variables-in-each-cross-validation-fold/136093)

<div class="topic-metadata">

**Author:** [@Pablo\_G-D](https://discourse.julialang.org/u/Pablo_G-D)\
**Replies:** 4\
**Last updated:** [March 10, 2026, 3:54pm UTC](https://discourse.julialang.org/t/mlj-mljflux-standardisation-of-variables-in-each-cross-validation-fold/136093 "2026-03-10T15:54:57Z")

</div>

Hi all, I am learning Julia, and so far I have implemented a few Bayesian models using Turing and other packages. I found it quite fast and reliable. I am now building a neural network model for a land-use/land-cover t…

---

## [Quantile Random Forest in Julia?](https://discourse.julialang.org/t/quantile-random-forest-in-julia/133383)

<div class="topic-metadata">

**Author:** [@allixender](https://discourse.julialang.org/u/allixender)\
**Replies:** 1\
**Last updated:** [November 12, 2025, 4:42am UTC](https://discourse.julialang.org/t/quantile-random-forest-in-julia/133383 "2025-11-12T04:42:11Z")

</div>

Hi there, I have played a bit with DecisionTree.jl and MJL.jl. Now I would like to get some uncertainty quantification for my RandomForest regressions. I have seen that Quantile Random Forest is an increasingly accepte…

---

## [DimensionMismatch with MLJ](https://discourse.julialang.org/t/dimensionmismatch-with-mlj/125905)

<div class="topic-metadata">

**Author:** [@LucasMSpereira](https://discourse.julialang.org/u/LucasMSpereira)\
**Replies:** 0\
**Last updated:** [February 14, 2025, 1:17pm UTC](https://discourse.julialang.org/t/dimensionmismatch-with-mlj/125905 "2025-02-14T13:17:16Z")

</div>

I’m trying to use MultitargetLinearRegressor in MLJ.jl. This is the mwe: using MLJ, DataFrames multiLinReg = @load MultitargetLinearRegressor pkg = MultivariateStats # data inputs = DataFrame(rand(136, 11), :auto) prepa…

---

## [Can MLJ \`Stack\` already trained models?](https://discourse.julialang.org/t/can-mlj-stack-already-trained-models/124506)

<div class="topic-metadata">

**Author:** [@jling](https://discourse.julialang.org/u/jling)\
**Replies:** 5\
**Last updated:** [January 10, 2025, 4:48am UTC](https://discourse.julialang.org/t/can-mlj-stack-already-trained-models/124506 "2025-01-10T04:48:48Z")

</div>

The doc at Model Stacking · MLJ shows how to stack models, but the base models are trained at the same time. Is there a way to use already-trained models and only train the metalearner?

---

## [DataFrames and MLJ](https://discourse.julialang.org/t/dataframes-and-mlj/122847)

<div class="topic-metadata">

**Author:** [@Jose\_Ghislain\_Quenum](https://discourse.julialang.org/u/Jose_Ghislain_Quenum)\
**Replies:** 4\
**Last updated:** [November 24, 2024, 7:04pm UTC](https://discourse.julialang.org/t/dataframes-and-mlj/122847 "2024-11-24T19:04:31Z")

</div>

Hi all, I am experiencing a weird behavior from Pluto. I have a dataset that contains more than 1M observations, although the size is about 75M. I’ve been able to cleanup the dataset and address the missing values. Howe…

---

## [Out of VRAM (CUDA) when training MLJ + XGBoost.jl](https://discourse.julialang.org/t/out-of-vram-cuda-when-training-mlj-xgboost-jl/122966)

<div class="topic-metadata">

**Author:** [@jling](https://discourse.julialang.org/u/jling)\
**Replies:** 0\
**Last updated:** [November 22, 2024, 3:41pm UTC](https://discourse.julialang.org/t/out-of-vram-cuda-when-training-mlj-xgboost-jl/122966 "2024-11-22T15:41:53Z")

</div>

Currently hitting out of memory when training AND inferecing. When it only fails on inference, it looks like this: XGBoostError: (caller: XGBoosterPredictFromDMatrix) \[14:54:49\] /workspace/srcdir/xgboost/src/c\_api/../d…

---

## [Crash when tuning SVC with multithreading in MLJ.jl](https://discourse.julialang.org/t/crash-when-tuning-svc-with-multithreading-in-mlj-jl/122908)

<div class="topic-metadata">

**Author:** [@Yuan-Ru-Lin](https://discourse.julialang.org/u/Yuan-Ru-Lin)\
**Replies:** 4\
**Last updated:** [November 21, 2024, 10:11pm UTC](https://discourse.julialang.org/t/crash-when-tuning-svc-with-multithreading-in-mlj-jl/122908 "2024-11-21T22:11:41Z")

</div>

I have been trying to tune a set of hyper-parameters of a SVC. The SVC is from LIBSVM.jl. It works when I use only one thread, but crashes indeterministically with multiple threads. Not only did it may or may not crash,…

---

## [MLJ for XGBoost - extracting feature gain](https://discourse.julialang.org/t/mlj-for-xgboost-extracting-feature-gain/93518)

<div class="topic-metadata">

**Author:** [@Ivan](https://discourse.julialang.org/u/Ivan)\
**Replies:** 4\
**Last updated:** [September 22, 2024, 5:13am UTC](https://discourse.julialang.org/t/mlj-for-xgboost-extracting-feature-gain/93518 "2024-09-22T05:13:23Z")

</div>

I have used MLJ for XGBoost in the past, and was able to explore the feature importances doing the following: using MLJ, DataFrames @load XGBoostRegressor pkg=XGBoost X = DataFrame(rand((0, 1), (200, 5)), :auto) y = ran…

---

## [Recover weights of logistic regression using MLJ.jl](https://discourse.julialang.org/t/recover-weights-of-logistic-regression-using-mlj-jl/119331)

<div class="topic-metadata">

**Author:** [@PeX](https://discourse.julialang.org/u/PeX)\
**Replies:** 0\
**Last updated:** [September 12, 2024, 2:55pm UTC](https://discourse.julialang.org/t/recover-weights-of-logistic-regression-using-mlj-jl/119331 "2024-09-12T14:55:07Z")

</div>

Hi all, I’m trying to see if I can recover the weights of the logistic regression from data I’m generating synthetically, but for some reason there is large error in the optimized weights when using MLJ.jl. To create t…

---

## [Learning curve for validation dataset](https://discourse.julialang.org/t/learning-curve-for-validation-dataset/118529)

<div class="topic-metadata">

**Author:** [@niltsz](https://discourse.julialang.org/u/niltsz)\
**Replies:** 1\
**Last updated:** [August 26, 2024, 8:17am UTC](https://discourse.julialang.org/t/learning-curve-for-validation-dataset/118529 "2024-08-26T08:17:31Z")

</div>

I want to train a ML model with MLJ, for example an XGBoost Regressor with L2 Loss. I split my dataset into three parts, train/val/test, and during training I want to train on the train dataset but also plot the loss/ac…

---

## [TypeError: Expected UnionAll, got Type{Machine{...}}](https://discourse.julialang.org/t/typeerror-expected-unionall-got-type-machine/116354)

<div class="topic-metadata">

**Author:** [@niltsz](https://discourse.julialang.org/u/niltsz)\
**Replies:** 6\
**Last updated:** [July 1, 2024, 11:31am UTC](https://discourse.julialang.org/t/typeerror-expected-unionall-got-type-machine/116354 "2024-07-01T11:31:28Z")

</div>

I want to save a trained MLJ machine (EvoTreeRegressor) on the cluster and then open it locally on my computer. On the cluster, I save the machine with MLJ.save("path/on/cluster/machine.jls", mach) and then try to load…

---

## [\[ANN\] MLJFlux.jl 0.5](https://discourse.julialang.org/t/ann-mljflux-jl-0-5/115675)

<div class="topic-metadata">

**Author:** [@ablaom](https://discourse.julialang.org/u/ablaom)\
**Replies:** 0\
**Last updated:** [June 14, 2024, 10:30pm UTC](https://discourse.julialang.org/t/ann-mljflux-jl-0-5/115675 "2024-06-14T22:30:02Z")

</div>

MLJFlux.jl allows users to quickly build, train and optimise Flux.jl neural network models using the high-level, general purpose machine learning framework MLJ.jl. The new 0.5 release assimilates a number of substantial…

---

## [Problem of memory usage with MLJ+LightGBM and grid search](https://discourse.julialang.org/t/problem-of-memory-usage-with-mlj-lightgbm-and-grid-search/112147)

<div class="topic-metadata">

**Author:** [@julien\_goo](https://discourse.julialang.org/u/julien_goo)\
**Replies:** 10\
**Last updated:** [June 1, 2024, 4:51am UTC](https://discourse.julialang.org/t/problem-of-memory-usage-with-mlj-lightgbm-and-grid-search/112147 "2024-06-01T04:51:43Z")

</div>

Hi all, We are building an application of ML using MLJ and LightGBM (for the ML part) to perform some forecasts on complex time series (for a quite critical business need, in production with daily use) We have a blocki…

---

## [How to train MLJ model on DataFrame, but apply on Vector of Arrays?](https://discourse.julialang.org/t/how-to-train-mlj-model-on-dataframe-but-apply-on-vector-of-arrays/114669)

<div class="topic-metadata">

**Author:** [@niltsz](https://discourse.julialang.org/u/niltsz)\
**Replies:** 2\
**Last updated:** [May 25, 2024, 5:44pm UTC](https://discourse.julialang.org/t/how-to-train-mlj-model-on-dataframe-but-apply-on-vector-of-arrays/114669 "2024-05-25T17:44:36Z")

</div>

I train my MLJ Model (EvoTrees.jl) on a Julia DataFrame with the scalars x1, x2, and x3 as features and y as label. However, when doing the inference, I have higher dimensional arrays instead of tabular data. Any suggest…

---

## [How do I save a TunedModel with MLJ? DeterministicTunedModel has no field artifact\_location](https://discourse.julialang.org/t/how-do-i-save-a-tunedmodel-with-mlj-deterministictunedmodel-has-no-field-artifact-location/111307)

<div class="topic-metadata">

**Author:** [@niltsz](https://discourse.julialang.org/u/niltsz)\
**Replies:** 3\
**Last updated:** [March 8, 2024, 8:03am UTC](https://discourse.julialang.org/t/how-do-i-save-a-tunedmodel-with-mlj-deterministictunedmodel-has-no-field-artifact-location/111307 "2024-03-08T08:03:44Z")

</div>

I want to train a self tuning model with MLJ. I set up my model, it trains, but when I want to save the machine, I get the error message that DeterministicTunedModel has no field artifact\_location. Any idea how to solv…

---

## [Changing the size of the \`target\` using MLJ's Learning Networks](https://discourse.julialang.org/t/changing-the-size-of-the-target-using-mljs-learning-networks/111002)

<div class="topic-metadata">

**Author:** [@barakber](https://discourse.julialang.org/u/barakber)\
**Replies:** 6\
**Last updated:** [March 7, 2024, 8:19pm UTC](https://discourse.julialang.org/t/changing-the-size-of-the-target-using-mljs-learning-networks/111002 "2024-03-07T20:19:51Z")

</div>

Hi. I have a Static transformer ( \<: Static ) that changes the size of the input (X). It’s using sliding windows, so that size(X\_tag)\[1\] = size(X)\[1\] - window\_size. I’m trying to figure out what’s the right way to chang…

---

## [MLJ.save() and restoring with machine() don't work](https://discourse.julialang.org/t/mlj-save-and-restoring-with-machine-dont-work/110535)

<div class="topic-metadata">

**Author:** [@Paulo\_Refosco](https://discourse.julialang.org/u/Paulo_Refosco)\
**Replies:** 11\
**Last updated:** [March 7, 2024, 8:06pm UTC](https://discourse.julialang.org/t/mlj-save-and-restoring-with-machine-dont-work/110535 "2024-03-07T20:06:47Z")

</div>

Hello! I made a simple XGBoost model with the pipeline below, fitted it with data and tried to save it and then restore it, but when restoring it (even if in the same notebook) I get error on trying to apply predict. An…

---

## [How do I tune a pipeline in MLJ?](https://discourse.julialang.org/t/how-do-i-tune-a-pipeline-in-mlj/111155)

<div class="topic-metadata">

**Author:** [@ablaom](https://discourse.julialang.org/u/ablaom)\
**Replies:** 1\
**Last updated:** [March 4, 2024, 8:08pm UTC](https://discourse.julialang.org/t/how-do-i-tune-a-pipeline-in-mlj/111155 "2024-03-04T20:08:00Z")

</div>

A slack user has asked the question in the title. More generally, how does one tune hyperparameters that are nested in composed model? One obtains composed models, for example, when applying Stack, EnsembleModel, Iterat…

---

## [What does \`MLJ.evaluate!(mach, ...)\` to \`mach\` parameters](https://discourse.julialang.org/t/what-does-mlj-evaluate-mach-to-mach-parameters/110857)

<div class="topic-metadata">

**Author:** [@schlichtanders](https://discourse.julialang.org/u/schlichtanders)\
**Replies:** 1\
**Last updated:** [February 27, 2024, 6:59pm UTC](https://discourse.julialang.org/t/what-does-mlj-evaluate-mach-to-mach-parameters/110857 "2024-02-27T18:59:45Z")

</div>

The documentation does not say anything about this unfortunately. I am wondering how the parameters of the given machine mach are actually changed? Is it like a respective TunedModel? Can I use the mach further for pre…

---

## [XGBoostClassifier on bigger than RAM database](https://discourse.julialang.org/t/xgboostclassifier-on-bigger-than-ram-database/108358)

<div class="topic-metadata">

**Author:** [@Paulo\_Refosco](https://discourse.julialang.org/u/Paulo_Refosco)\
**Replies:** 2\
**Last updated:** [January 8, 2024, 12:56pm UTC](https://discourse.julialang.org/t/xgboostclassifier-on-bigger-than-ram-database/108358 "2024-01-08T12:56:13Z")

</div>

Hello, I am trying to run XGBoostClassifier on a dataset that doesn’t fit into RAM, so getting OutOfMemoryError(). I’m not soo much proeficient on writing codes but I think solutions could range from mini-batches and/or…

---

## [I am building a simple to use autoencoder model.. anyone interested?](https://discourse.julialang.org/t/i-am-building-a-simple-to-use-autoencoder-model-anyone-interested/108146)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 4\
**Last updated:** [December 29, 2023, 3:33pm UTC](https://discourse.julialang.org/t/i-am-building-a-simple-to-use-autoencoder-model-anyone-interested/108146 "2023-12-29T15:33:44Z")

</div>

Hello, I saw that all autoencoders presented in the various blogs require to actually implement the autoencoder from a DL framework. I am implementing instead one where the user just creates the model m =AutoEncoder(out…

---

## [Unable to evaluate inputs comprising columns of either String or Int type: convert error](https://discourse.julialang.org/t/unable-to-evaluate-inputs-comprising-columns-of-either-string-or-int-type-convert-error/106035)

<div class="topic-metadata">

**Author:** [@wilhansen](https://discourse.julialang.org/u/wilhansen)\
**Replies:** 8\
**Last updated:** [November 16, 2023, 2:30pm UTC](https://discourse.julialang.org/t/unable-to-evaluate-inputs-comprising-columns-of-either-string-or-int-type-convert-error/106035 "2023-11-16T14:30:29Z")

</div>

Hi, I’m trying out MLJ to do decision tree regression where the inputs are categorical that are either string or ints. Below is the schema of the input (origin and destination are h3 hashes). ┌─────────────┬────────────…

---

## [Transform several columns of an MLJ model using one transformer](https://discourse.julialang.org/t/transform-several-columns-of-an-mlj-model-using-one-transformer/105338)

<div class="topic-metadata">

**Author:** [@ParadaCarleton](https://discourse.julialang.org/u/ParadaCarleton)\
**Replies:** 13\
**Last updated:** [November 2, 2023, 1:02am UTC](https://discourse.julialang.org/t/transform-several-columns-of-an-mlj-model-using-one-transformer/105338 "2023-11-02T01:02:39Z")

</div>

Is there an easy way to transform several columns of a table using the same MLJ transformer? So if I have a transformer like UnivariateBoxCoxTransformer, I’d like to apply it only to columns 2, 3, and 4. Alternatively, …

---

## [Fitting a multiple input Flux.jl model with learning networks in MLJ.jl](https://discourse.julialang.org/t/fitting-a-multiple-input-flux-jl-model-with-learning-networks-in-mlj-jl/105597)

<div class="topic-metadata">

**Author:** [@boutor2](https://discourse.julialang.org/u/boutor2)\
**Replies:** 4\
**Last updated:** [November 1, 2023, 3:54am UTC](https://discourse.julialang.org/t/fitting-a-multiple-input-flux-jl-model-with-learning-networks-in-mlj-jl/105597 "2023-11-01T03:54:25Z")

</div>

Hey there, I have tried to use MLJ.jl to fit a Flux model that takes in multiple inputs. While Flux.jl documentation demonstrates how to build such a model, I unfortunately cannot make it work within MLJ. Here is a MWE,…

---

## [\`MLJ.Stack\` performance issues](https://discourse.julialang.org/t/mlj-stack-performance-issues/105085)

<div class="topic-metadata">

**Author:** [@ParadaCarleton](https://discourse.julialang.org/u/ParadaCarleton)\
**Replies:** 4\
**Last updated:** [October 23, 2023, 9:48pm UTC](https://discourse.julialang.org/t/mlj-stack-performance-issues/105085 "2023-10-23T21:48:45Z")

</div>

I’m trying to use a stacked model to predict an outcome, but I’m having an unusual performance issue. I’m not sure whether the problems are related to my own code having a mistake somewhere, or if it’s just to be expecte…

---

## [\[ANN\] Imbalance.jl - A well-documented, multi-interface and comprehensive Julia toolbox for addressing class imbalance](https://discourse.julialang.org/t/ann-imbalance-jl-a-well-documented-multi-interface-and-comprehensive-julia-toolbox-for-addressing-class-imbalance/104825)

<div class="topic-metadata">

**Author:** [@EssamWisam](https://discourse.julialang.org/u/EssamWisam)\
**Replies:** 3\
**Last updated:** [October 12, 2023, 11:20am UTC](https://discourse.julialang.org/t/ann-imbalance-jl-a-well-documented-multi-interface-and-comprehensive-julia-toolbox-for-addressing-class-imbalance/104825 "2023-10-12T11:20:03Z")

</div>

Pleased to announce the Imbalance.jl package, a Julia-based toolkit featuring a wide range of established oversampling and undersampling techniques designed to tackle the class imbalance issue to improve classification m…

---

## [\[ANN\] Two new packages for metrics in statistics and ML](https://discourse.julialang.org/t/ann-two-new-packages-for-metrics-in-statistics-and-ml/104374)

<div class="topic-metadata">

**Author:** [@ablaom](https://discourse.julialang.org/u/ablaom)\
**Replies:** 1\
**Last updated:** [October 5, 2023, 4:47pm UTC](https://discourse.julialang.org/t/ann-two-new-packages-for-metrics-in-statistics-and-ml/104374 "2023-10-05T16:47:09Z")

</div>

I am pleased to announce two new packages for measures (aka metrics) for statistics and machine learning: Build complex measures with StatisticalMeasuresBase.jl Use StatisticalMeasuresBase.jl to quickly build production…

---

## [How to use StatsBase.modes correctly with MLJ?](https://discourse.julialang.org/t/how-to-use-statsbase-modes-correctly-with-mlj/103721)

<div class="topic-metadata">

**Author:** [@roeya](https://discourse.julialang.org/u/roeya)\
**Replies:** 1\
**Last updated:** [September 11, 2023, 2:57am UTC](https://discourse.julialang.org/t/how-to-use-statsbase-modes-correctly-with-mlj/103721 "2023-09-11T02:57:26Z")

</div>

When trying to use StatsBase.modes of result of MLJ model fit I get error - ERROR: MethodError: no method matching iterate(::UnivariateFinite{Multiclass{2}, String, UInt32, Float64}) However if I use StatsBase.mode eve…

---

## [How can I use a linear model with NaN parameters due to missing train data?](https://discourse.julialang.org/t/how-can-i-use-a-linear-model-with-nan-parameters-due-to-missing-train-data/101648)

<div class="topic-metadata">

**Author:** [@bertulli](https://discourse.julialang.org/u/bertulli)\
**Replies:** 0\
**Last updated:** [July 15, 2023, 10:09am UTC](https://discourse.julialang.org/t/how-can-i-use-a-linear-model-with-nan-parameters-due-to-missing-train-data/101648 "2023-07-15T10:09:28Z")

</div>

Hi all! I am trying to build a model to predict electrical powers from a sequence of binary computer instructions. I thought to use a multiple linear regression, as from each instruction there are a lot of variables I c…

---

## [Extracting values from UnivariateFinite](https://discourse.julialang.org/t/extracting-values-from-univariatefinite/62794)

<div class="topic-metadata">

**Author:** [@gideonsimpson](https://discourse.julialang.org/u/gideonsimpson)\
**Replies:** 8\
**Last updated:** [July 7, 2023, 6:51pm UTC](https://discourse.julialang.org/t/extracting-values-from-univariatefinite/62794 "2023-07-07T18:51:22Z")

</div>

So MLJ gave me, as its output, a UnivariateFinite data structure; I have: UnivariateFinite{OrderedFactor{2}}(0=\>0.937, 1=\>0.0626) Is there a way I can extract, as an array, the probabilities from this distribution (oth…

[Next page](https://discourse.julialang.org/tag/mlj/307.md?match_all_tags=true&page=1&tags%5B%5D=mlj)
