Uploaded Test files
This commit is contained in:
parent
f584ad9d97
commit
2e81cb7d99
16627 changed files with 2065359 additions and 102444 deletions
23
venv/Lib/site-packages/sklearn/mixture/tests/test_mixture.py
Normal file
23
venv/Lib/site-packages/sklearn/mixture/tests/test_mixture.py
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
# Author: Guillaume Lemaitre <g.lemaitre58@gmail.com>
|
||||
# License: BSD 3 clause
|
||||
|
||||
import pytest
|
||||
import numpy as np
|
||||
|
||||
from sklearn.mixture import GaussianMixture
|
||||
from sklearn.mixture import BayesianGaussianMixture
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"estimator",
|
||||
[GaussianMixture(),
|
||||
BayesianGaussianMixture()]
|
||||
)
|
||||
def test_gaussian_mixture_n_iter(estimator):
|
||||
# check that n_iter is the number of iteration performed.
|
||||
rng = np.random.RandomState(0)
|
||||
X = rng.rand(10, 5)
|
||||
max_iter = 1
|
||||
estimator.set_params(max_iter=max_iter)
|
||||
estimator.fit(X)
|
||||
assert estimator.n_iter_ == max_iter
|
||||
Loading…
Add table
Add a link
Reference in a new issue