You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pymc_experimental/model_builder.py
+29-11Lines changed: 29 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -131,9 +131,15 @@ def create_sample_input():
131
131
>>> 'chains': 1,
132
132
>>> 'target_accept': 0.95,
133
133
>>> }
134
-
>>> return data, model_config, sampler_config
134
+
Returns
135
+
-------
136
+
data : dict
137
+
The data we want to train the model on
138
+
model_config : dict
139
+
A set of parameters for predictor distributions that allow to save and recreate the model
140
+
sampler_config : dict
141
+
A set of default settings for sampler config, customization of contents of sampler_config allows introducing new settings to the sampler
135
142
"""
136
-
137
143
raiseNotImplementedError
138
144
139
145
@abstractmethod
@@ -148,11 +154,17 @@ def build_model(
148
154
149
155
Required Parameters
150
156
----------
151
-
model_data - preformated data that is going to be used in the model.
152
-
For efficiency reasons it should contain only the necesary data columns, not entire available
153
-
dataset since it's going to be encoded into data used to recreate the model.
154
-
model_config - dictionary where keys are strings representing names of parameters of the model, values are
155
-
dictionaries of parameters needed for creating model parameters (see example in create_model_input)
157
+
model_data : dict
158
+
Preformated data that is going to be used in the model. For efficiency reasons it should contain only the necesary data columns,
159
+
not entire available dataset since it's going to be encoded into data used to recreate the model.
160
+
model_config : dict
161
+
Dictionary where keys are strings representing names of parameters of the model, values are dictionaries of parameters
162
+
needed for creating model parameters
163
+
164
+
See Also
165
+
--------
166
+
create_model_input : Creates all required input for the model builder based on the data given. Shows the examples of data structures on which the specific
data : Dictionary of string and either of numpy array, pandas dataframe or pandas Series
248
-
It is the data we need to train the model on.
258
+
data : dict
259
+
Dictionary of string and either of numpy array, pandas dataframe or pandas Series. It is the data we need to train the model on.
260
+
progressbar : bool
261
+
Specifies whether the fit progressbar should be displayed
262
+
random_seed : RandomState
263
+
Provides sampler with initial random seed for obtaining reproducible samples
264
+
**kwargs : Any
265
+
Custom sampler settings can be provided in form of keyword arguments. The recommended way is to add custom settings to sampler_config provided by
266
+
create_sample_input, because arguments provided in the form of kwargs will not be saved into the model, therefore will not be available after loading the model
0 commit comments