models.Design
A design matrix with an offset and prior weights.
Usage
models.Design()Parameters
columns: list of list of float-
One list per column.
names: list of stroffset: list of floatweights: list of float
Examples
>>> from prospicio.models import Design
>>> d = Design([[1.0, 1.0], [0.0, 2.0]], ["(Intercept)", "x"])
>>> d.n_rows, d.names(2, [‘(Intercept)’, ‘x’])
Attributes
| Name | Description |
|---|---|
| n_rows | Number of rows. |
| names | Column names. |
| offset | Offset per row. |
| weights | Prior weight per row. |
n_rows
Number of rows.
n_rows: int
names
Column names.
names: list[str]
offset
Offset per row.
offset: list[float]
weights
Prior weight per row.
weights: list[float]
Methods
| Name | Description |
|---|---|
| column() |
Column j.
|
| select() |
The rows rows, in that order.
|
column()
Column j.
Usage
column(j)Parameters
j: int
Returns
list of float
select()
The rows rows, in that order.
Usage
select(rows)Parameters
rows: list of int
Returns
Design