Models
The models in SAMBA are two expansions of a toy model, where the full toy model is given by
The two expansions are limits taken at \(g = 0\) and \(g = \infty\):
and
with coefficients given as:
and
We also include models for the uncertainties of each expansion, given in the uninformative limit, for the small-\(g\) expansion, as
if \(N_s\) is even, and
if \(N_s\) is odd. For the large-\(g\) limit,
We also devise expressions for the informative limit, for the small-\(g\) expansion, as
if \(N_s\) is even, and
if \(N_s\) is odd. For the large-\(g\) limit,
Models(loworder, highorder)
Example
Models(loworder=np.array([2]), highorder=np.array([5]))
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
loworder
|
(ndarray, int, float)
|
The value of N_s to be used to truncate the small-g expansion. Can be an array of multiple values or one. |
required |
highorder
|
(ndarray, int, float)
|
The value of N_l to be used to truncate the large-g expansion. Can be an array of multiple values or one. |
required |
Returns:
| Type | Description |
|---|---|
|
None. |
Source code in samba/models.py
high_g(g)
A function to calculate the large-g convergent Taylor expansion for a given range in the coupling constant, g.
Example
Models.high_g(g=np.linspace(1e-6,1.0,100))
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
g
|
linspace
|
The linspace of the coupling constant for this calculation. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
output |
ndarray
|
The array of values of the expansion at large-g at each point in g_true space, for each value of highorder (highest power the expansion reaches). |
Source code in samba/models.py
low_g(g)
A function to calculate the small-g divergent asymptotic expansion for a given range in the coupling constant, g.
Example
Models.low_g(g=np.linspace(0.0, 0.5, 20))
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
g
|
linspace
|
The linspace of the coupling constant for this calculation. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
output |
ndarray
|
The array of values of the expansion in small-g at each point in g_true space, for each value of loworder (highest power the expansion reaches). |
Source code in samba/models.py
plot_models(g, only_true=False)
A plotting function to produce a figure of the model expansions calculated in Models.low_g and Models.high_g, and including the true model calculated using Mixing.true_model.
Example
Mixing.plot_models(g=np.linspace(0.0, 0.5, 100))
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
g
|
linspace
|
The linspace in on which the models will be plotted here. |
required |
Returns:
| Type | Description |
|---|---|
|
None. |
Source code in samba/models.py
209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 | |
residuals()
A calculation and plot of the residuals of the model expansions vs the true model values at each point in g. g is set internally for this plot, as the plot must be shown in loglog format to see the power law of the residuals.
Example
Mixing.residuals()
Returns:
| Type | Description |
|---|---|
|
None. |
Source code in samba/models.py
true_model(g)
The true model of the zero-dimensional phi^4 theory partition function using an input linspace.
Example
Models.true_model(g=np.linspace(0.0, 0.5, 100))
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
g
|
linspace
|
The linspace for g desired to calculate the true model. This can be the g_true linspace, g_data linspace, or another linspace of the user's choosing. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
model |
ndarray
|
The model calculated at each point in g space. |
Source code in samba/models.py
Uncertainties(error_model='informative')
Example
Uncertainties()
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
error_model
|
str
|
The name of the error model to use in the calculation. Options are 'uninformative' and 'informative'. Default is 'informative'. |
'informative'
|
Returns:
| Type | Description |
|---|---|
|
None. |
Source code in samba/models.py
variance_high(g, highorder)
A function to calculate the variance corresponding to the large-g expansion model.
Example
Bivariate.variance_low(g=np.linspace(1e-6, 0.5, 100), highorder=23)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
g
|
linspace
|
The linspace over which this calculation is performed. |
required |
highorder
|
int
|
The order to which we know our expansion model. This must be a single value. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
var2 |
ndarray
|
The array of variance values corresponding to each value in the linspace of g. |
Source code in samba/models.py
variance_low(g, loworder)
A function to calculate the variance corresponding to the small-g expansion model.
Example
Bivariate.variance_low(g=np.linspace(1e-6, 0.5, 100), loworder=5)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
g
|
linspace
|
The linspace over which this calculation is performed. |
required |
loworder
|
int
|
The order to which we know our expansion model. Must be passed one at a time if more than one model is to be calculated. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
var1 |
ndarray
|
The array of variance values corresponding to each value in the linspace of g. |
Source code in samba/models.py
393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 | |