# GaussianMixtures.jl - Equivalent of sklearn GaussianMixture.predict

**URL:** <https://discourse.julialang.org/t/gaussianmixtures-jl-equivalent-of-sklearn-gaussianmixture-predict/85480>\
**Category:** Statistics\
**Tags:** statistics\
**Created:** [August 8, 2022, 2:30pm UTC](https://discourse.julialang.org/t/gaussianmixtures-jl-equivalent-of-sklearn-gaussianmixture-predict/85480 "2022-08-08T14:30:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![vikram-s-narayan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/vikram-s-narayan/32/32862_2.png) [@vikram-s-narayan](https://discourse.julialang.org/u/vikram-s-narayan)\
**Post date:** [August 8, 2022, 2:30pm UTC](https://discourse.julialang.org/t/gaussianmixtures-jl-equivalent-of-sklearn-gaussianmixture-predict/85480/1 "2022-08-08T14:30:49Z")

</div>

I’m trying to recreate the equivalent of SKLearn’s documentation example with [GaussianMixtures.jl.](https://github.com/davidavdav/GaussianMixtures.jl)

The SKLearn example is below:

```julia
import numpy as np
from sklearn.mixture import GaussianMixture
X = np.array([[1, 2], [1, 4], [1, 0], [10, 2], [10, 4], [10, 0]])
gm = GaussianMixture(n_components=2, random_state=0).fit(X)
gm.predict([[0, 0], [12, 3]]) # prints "array([1, 0])"

```

In Julia, when I do:

```julia
using GaussianMixtures
X = [1.0 2; 1 4; 1 0; 10 2; 10 4; 10 0]
gm = GMM(2, X)

```

I see a bunch of warnings - _“Warning: 8 pathological elements normalized”_

I’m also not sure how to get the prediction for new points (i.e. I’m looking for the equivalent of gm.predict from the sklearn code above).

Thanks!
