@@ -17,22 +17,28 @@ def add_classification_events(factory, events, labels, signal_label=None,
1717 Parameters
1818 ----------
1919 factory : TMVA::Factory
20- A TMVA::Factory instance with variables already booked in
21- exactly the same order as the columns in ``events``.
20+ A TMVA::Factory instance with variables already booked in exactly the
21+ same order as the columns in ``events``.
2222 events : numpy array of shape [n_events, n_variables]
23- A two-dimensional NumPy array containing the rows of events
24- and columns of variables.
23+ A two-dimensional NumPy array containing the rows of events and columns
24+ of variables. The order of the columns must match the order in which
25+ you called ``AddVariable()`` for each variable.
2526 labels : numpy array of shape [n_events]
26- The class labels (signal or background) corresponding to each event
27- in ``events``.
27+ The class labels (signal or background) corresponding to each event in
28+ ``events``.
2829 signal_label : float or int, optional (default=None)
2930 The value in ``labels`` for signal events, if ``labels`` contains only
3031 two classes. If None, the highest value in ``labels`` is used.
3132 weights : numpy array of shape [n_events], optional
3233 Event weights.
3334 test : bool, optional (default=False)
34- If True, then the events will be added as test events, otherwise
35- they are added as training events by default.
35+ If True, then the events will be added as test events, otherwise they
36+ are added as training events by default.
37+
38+ Notes
39+ -----
40+ A TMVA::Factory requires you to add both training and test events even if
41+ you don't intend to call ``TestAllMethods()``.
3642
3743 """
3844 if not isinstance (factory , TMVA .Factory ):
@@ -78,18 +84,26 @@ def add_regression_events(factory, events, targets, weights=None, test=False):
7884 Parameters
7985 ----------
8086 factory : TMVA::Factory
81- A TMVA::Factory instance with variables already booked in
82- exactly the same order as the columns in ``events``.
87+ A TMVA::Factory instance with variables already booked in exactly the
88+ same order as the columns in ``events``.
8389 events : numpy array of shape [n_events, n_variables]
84- A two-dimensional NumPy array containing the rows of events
85- and columns of variables.
90+ A two-dimensional NumPy array containing the rows of events and columns
91+ of variables. The order of the columns must match the order in which
92+ you called ``AddVariable()`` for each variable.
8693 targets : numpy array of shape [n_events] or [n_events, n_targets]
87- The target value(s) for each event in ``events``.
94+ The target value(s) for each event in ``events``. For multiple target
95+ values, ``targets`` must be a two-dimensional array with a column for
96+ each target in the same order in which you called ``AddTarget()``.
8897 weights : numpy array of shape [n_events], optional
8998 Event weights.
9099 test : bool, optional (default=False)
91- If True, then the events will be added as test events, otherwise
92- they are added as training events by default.
100+ If True, then the events will be added as test events, otherwise they
101+ are added as training events by default.
102+
103+ Notes
104+ -----
105+ A TMVA::Factory requires you to add both training and test events even if
106+ you don't intend to call ``TestAllMethods()``.
93107
94108 """
95109 if not isinstance (factory , TMVA .Factory ):
0 commit comments