1%feature("docstring") OT::MixtureClassifier
2"Particular classifier based on a mixture distribution.
3
4Available constructors:
5    MixtureClassifier(*mixtDist*)
6
7Parameters
8----------
9mixtDist : :class:`~openturns.Mixture`
10    A mixture distribution.
11
12See also
13--------
14Classifier, ExpertMixture
15
16Notes
17-----
18This implements a mixture classifier which is a particular classifier based on
19a mixture distribution:
20
21.. math::
22
23    p( \vect{x} ) = \sum_{i=1}^N w_i p_i ( \vect{x} )
24
25The classifier proposes :math:`N` classes. The rule to assign a point
26:math:`\vect{x}` to a class :math:`i` is defined as follows:
27
28.. math::
29
30    i = \argmax_k \log w_k p_k( \vect{x} )
31
32See useful methods :meth:`classify` and :meth:`grade`."
33
34// ---------------------------------------------------------------------
35
36%feature("docstring") OT::MixtureClassifier::classify
37"Classify points according to the classifier.
38
39**Available usages**:
40
41    classify(*inputPoint*)
42
43    classify(*inputSample*)
44
45Parameters
46----------
47inputPoint : sequence of float
48    A point to classify.
49inputSample : 2-d a sequence of float
50    A set of point to classify.
51
52Notes
53-----
54The classifier proposes :math:`N` classes where :math:`N` is the dimension of
55the mixture distribution *mixtDist*. The rule to assign a point :math:`\vect{x}`
56to a class :math:`i` is defined as follows:
57
58.. math::
59
60    i = \argmax_k \log w_k p_k( \vect{x} )
61
62In the first usage, it returns an integer which corresponds to the class where
63*inputPoint* has been assigned.
64
65In the second usage, it returns an :class:`~openturns.Indices` that collects the
66class of each point of *inputSample*."
67
68// ---------------------------------------------------------------------
69
70%feature("docstring") OT::MixtureClassifier::grade
71"Grade points according to the classifier.
72
73**Available usages**:
74
75    grade(*inputPoint, k*)
76
77    grade(*inputSample, classList*)
78
79Parameters
80----------
81inputPoint : sequence of float
82    A point to grade.
83inputSample : 2-d a sequence of float
84    A set of point to grade.
85k : integer
86    The class number.
87classList : sequence of integer
88    The list of class number.
89
90Notes
91-----
92The grade of :math:`\vect{x}` with respect to the class *k* is
93:math:`log w_k p_k ( \vect{x} )`.
94
95In the first usage, it returns a real that grades *inputPoint* with respect to
96the class *k*. The greatest, the best.
97
98In the second usage, it returns an :class:`~openturns.Indices` that collects the
99grades of the :math:`i^{th}` point of *inputSample* with respect to the
100:math:`i^{th}` class of *classList*."
101
102// ---------------------------------------------------------------------
103
104%feature("docstring") OT::MixtureClassifier::getMixture
105"Accessor to the mixture distribution.
106
107Returns
108-------
109mixtDist : :class:`~openturns.Mixture`
110    The mixture distribution."
111
112// ---------------------------------------------------------------------
113
114%feature("docstring") OT::MixtureClassifier::setMixture
115"Accessor to the mixture distribution.
116
117Parameters
118----------
119mixtDist : :class:`~openturns.Mixture`
120    The mixture distribution."
121