# New machine learning package, Julia implementation of XGBoost 

**URL:** https://discourse.julialang.org/t/new-machine-learning-package-julia-implementation-of-xgboost/8912
**Category:** Machine Learning
**Created:** [February 7, 2018, 10:38pm UTC](https://discourse.julialang.org/t/new-machine-learning-package-julia-implementation-of-xgboost/8912 "2018-02-07T22:38:49Z")
**Posts on this page:** 13
**Page:** 2

<div class="post-metadata">

### Author: ![xiaodai](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/xiaodai/32/15937_2.png) [@xiaodai](https://discourse.julialang.org/u/xiaodai)
#### Post date: [December 28, 2018, 8:41am UTC](https://discourse.julialang.org/t/new-machine-learning-package-julia-implementation-of-xgboost/8912/21 "2018-12-28T08:41:59Z")

</div>

I am implementing a new one. I will push up the code once it’s more ready

---

<div class="post-metadata">

### Author: ![SimonW](https://avatars.discourse-cdn.com/v4/letter/s/34f0e0/32.png) [@SimonW](https://discourse.julialang.org/u/SimonW)
#### Post date: [December 28, 2018, 9:42am UTC](https://discourse.julialang.org/t/new-machine-learning-package-julia-implementation-of-xgboost/8912/22 "2018-12-28T09:42:00Z")

</div>

Have you thought integrating it with [DecisionTree.jl](https://github.com/bensadeghi/DecisionTree.jl) to bundle all tree-like ML algorithms?

---

<div class="post-metadata">

### Author: ![ValdarT](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/valdart/32/24146_2.png) [@ValdarT](https://discourse.julialang.org/u/ValdarT)
#### Post date: [December 28, 2018, 11:26am UTC](https://discourse.julialang.org/t/new-machine-learning-package-julia-implementation-of-xgboost/8912/23 "2018-12-28T11:26:37Z")

</div>

+1 for integrating with `DecisionTree.jl`. For me decision trees are a pretty common tool and it would be really nice to have one well-developed package for it (and things related) in Julia.

---

<div class="post-metadata">

### Author: ![statfactory](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/statfactory/32/3510_2.png) [@statfactory](https://discourse.julialang.org/u/statfactory)
#### Post date: [December 28, 2018, 12:01pm UTC](https://discourse.julialang.org/t/new-machine-learning-package-julia-implementation-of-xgboost/8912/24 "2018-12-28T12:01:43Z")

</div>

I am not sure if my implementation is compatible with DecisionTree package

---

<div class="post-metadata">

### Author: ![ValdarT](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/valdart/32/24146_2.png) [@ValdarT](https://discourse.julialang.org/u/ValdarT)
#### Post date: [December 28, 2018, 1:34pm UTC](https://discourse.julialang.org/t/new-machine-learning-package-julia-implementation-of-xgboost/8912/25 "2018-12-28T13:34:51Z")

</div>

It probably isn’t but there has been [some discussion](https://github.com/bensadeghi/DecisionTree.jl/issues/90) to revamp the internal structure anyways so it’s probably fine if it has benefits and the current API doesn’t need to be changed.

---

<div class="post-metadata">

### Author: ![statfactory](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/statfactory/32/3510_2.png) [@statfactory](https://discourse.julialang.org/u/statfactory)
#### Post date: [April 26, 2019, 3:21am UTC](https://discourse.julialang.org/t/new-machine-learning-package-julia-implementation-of-xgboost/8912/26 "2019-04-26T03:21:07Z")

</div>

JuML is now updated to Julia v1.1.0.

I am now in Sydney and have some time to play with JuML on big data (e.g. Fannie Mae). Anyone interested in an informal hackathon? If you want to learn more about functional style Julia with lazy sequences, folds and applications to big data out of core processing then this is your opportunity:)

Adam

---

<div class="post-metadata">

### Author: ![xiaodai](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/xiaodai/32/15937_2.png) [@xiaodai](https://discourse.julialang.org/u/xiaodai)
#### Post date: [December 2, 2019, 2:47am UTC](https://discourse.julialang.org/t/new-machine-learning-package-julia-implementation-of-xgboost/8912/27 "2019-12-02T02:47:19Z")

</div>

Hope JuML.jl picks up again. But, I got [JLBoost.jl](https://github.com/xiaodaigh/JLBoost.jl) going which is an XGBoost implementation in pure Julia that plays nice with DataFrames.jl and CategoricalArrays.jl

---

<div class="post-metadata">

### Author: ![ValdarT](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/valdart/32/24146_2.png) [@ValdarT](https://discourse.julialang.org/u/ValdarT)
#### Post date: [December 2, 2019, 7:21pm UTC](https://discourse.julialang.org/t/new-machine-learning-package-julia-implementation-of-xgboost/8912/28 "2019-12-02T19:21:51Z")

</div>

Probably worth mentioning [EvoTrees.jl](https://github.com/Evovest/EvoTrees.jl) as well.

---

<div class="post-metadata">

### Author: ![statfactory](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/statfactory/32/3510_2.png) [@statfactory](https://discourse.julialang.org/u/statfactory)
#### Post date: [March 10, 2020, 3:49am UTC](https://discourse.julialang.org/t/new-machine-learning-package-julia-implementation-of-xgboost/8912/29 "2020-03-10T03:49:20Z")

</div>

I was curious if I could reimplement JuML in Python with Numba. It turns out it is easy and the performance is comparable:

> **[GitHub - Statfactory/cortado: High performance ML in pure Python](https://github.com/Statfactory/cortado)**
>
> High performance ML in pure Python. Contribute to Statfactory/cortado development by creating an account on GitHub.

The code bases are practically equivalent and both are running ca 3x faster than C++ single threaded XGBoost.

You can run the Python version in a Kaggle notebook:

> **[cortado vs xgboost](https://www.kaggle.com/neostat/cortado-vs-xgboost)**
>
> Explore and run machine learning code with Kaggle Notebooks | Using data from \[Private Datasource\]

Adam

---

<div class="post-metadata">

### Author: ![jling](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jling/32/212909_2.png) [@jling](https://discourse.julialang.org/u/jling)
#### Post date: [March 10, 2020, 6:09am UTC](https://discourse.julialang.org/t/new-machine-learning-package-julia-implementation-of-xgboost/8912/30 "2020-03-10T06:09:48Z")

</div>

Numpy has 50%+ `C` code, I won’t call pure python but it’s pretty cool.

---

<div class="post-metadata">

### Author: ![Albert\_Zevelev](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/albert_zevelev/32/11844_2.png) [@Albert\_Zevelev](https://discourse.julialang.org/u/Albert_Zevelev)
#### Post date: [March 10, 2020, 6:29am UTC](https://discourse.julialang.org/t/new-machine-learning-package-julia-implementation-of-xgboost/8912/31 "2020-03-10T06:29:47Z")

</div>

How does cortado compare to JuML?

---

<div class="post-metadata">

### Author: ![statfactory](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/statfactory/32/3510_2.png) [@statfactory](https://discourse.julialang.org/u/statfactory)
#### Post date: [March 10, 2020, 6:41am UTC](https://discourse.julialang.org/t/new-machine-learning-package-julia-implementation-of-xgboost/8912/32 "2020-03-10T06:41:31Z")

</div>

I meant package source code is free from any C or C++:slight\_smile:

---

<div class="post-metadata">

### Author: ![statfactory](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/statfactory/32/3510_2.png) [@statfactory](https://discourse.julialang.org/u/statfactory)
#### Post date: [March 10, 2020, 6:47am UTC](https://discourse.julialang.org/t/new-machine-learning-package-julia-implementation-of-xgboost/8912/33 "2020-03-10T06:47:49Z")

</div>

Both packages use the same data “slicing” technology which minimizes memory usage. So in terms of memory allocations/deallocations etc it is very similar.

The interesting part was trying to cherry pick functions for Numba to swallow and see if performance is similar to Julia which does it kind of out of the box.

I observe very consistent run times in cortado. JuML has a big hit at startup (ca 16 sec on my laptop), then it is bit inconsistent on my laptop: faster or slower than cortado.

C++ XGBoost seems much slower which shows that it is not simply language vs language.

[Previous page](https://discourse.julialang.org/t/new-machine-learning-package-julia-implementation-of-xgboost/8912.md?page=1)
