Did I find the right examples for you? yes no

All Samples(31)  |  Call(21)  |  Derive(1)  |  Import(9)

src/n/i/nipy-0.3.0/nipy/algorithms/segmentation/brain_segmentation.py   nipy(Download)
import numpy as np
 
from .segmentation import (Segmentation,
                           moment_matching,
                           map_from_ppm)
    def _run(self):
        S = Segmentation(self.data, mask=self.mask,
                         mu=self.init_mu, sigma=self.init_sigma,
                         ngb_size=self.ngb_size, beta=self.beta)
        S.run(niters=self.niters)

src/n/i/nipy-0.3.0/nipy/algorithms/segmentation/tests/test_segmentation.py   nipy(Download)
from numpy.testing import assert_array_almost_equal
 
from ..segmentation import Segmentation
from ..brain_segmentation import BrainT1Segmentation
 
def test_segmentation_3d():
    data = np.random.random(DIMS)
    _test_segmentation(Segmentation(data, mu=[0.25, 0.75], sigma=[1, 1]))
 
 
def test_segmentation_3d_with_MRF():
    data = np.random.random(DIMS)
    _test_segmentation(Segmentation(data, mu=[0.25, 0.75],
    if mask[0].size < 1:
        return
    _test_segmentation(Segmentation(data, mu=[0.25, 0.75],
                                    sigma=[1, 1], mask=mask))
 
    if mask[0].size < 1:
        return
    _test_segmentation(Segmentation(data,
                                    mu=[[0.25, 0.25], [0.75, 0.75]],
                                    sigma=[np.eye(2), np.eye(2)],

src/n/i/nipy-0.3.0/nipy/algorithms/segmentation/__init__.py   nipy(Download)
from .brain_segmentation import BrainT1Segmentation
from .segmentation import Segmentation, moment_matching
 
from nipy.testing import Tester
test = Tester().test