sfa.base module¶
-
class
sfa.base.
Algorithm
(abbr)[source]¶ Bases:
sfa.base.ContainerItem
The base class of Algorithm classes.
Examples
>>> class AnAlgorithm(sfa.base.Algorithm): # Definition of algorithm ... ...
>>> alg = AnAlgorithm() >>> alg.params = params_obj # Parameters of the algorithm >>> alg.data = data_obj # Data to be analyzed by the algorithm >>> alg.initialize() >>> res = alg.compute()
- Attributes
Methods
compute
(self, b)Process the assigned data
compute_batch
(self)Process the assigned data that contains a batch data.
Initialize the basal activity, \(b\).
initialize_network
(self)Initialize the data structures related to network.
copy
initialize
-
compute
(self, b)[source]¶ - Process the assigned data
with the given basal activity, \(b\).
- Parameters
- bnumpy.ndarray
1D array of basal activity.
- Returns
- xnumpy.ndarray
1D-array object of activity at steady-state.
-
compute_batch
(self)[source]¶ Process the assigned data that contains a batch data. The result is stored in
result
member.
-
data
¶ The object of
sfa.base.Data
. Data to be processed based on the algorithm can accessed through this member.
-
params
¶ The object of
sfa.base.ParameterSet
. Parameters of the algorithm can accessed through this member.
-
result
¶ The object of
sfa.base.Result
. The result of computing the batch.
-
class
sfa.base.
Data
[source]¶ Bases:
sfa.base.ContainerItem
- Attributes
- A
abbr
Abbreviation or symbol representing this item.
- df_conds
- df_exp
- df_ptb
- dg
- has_link_perturb
- i2n
- iadj_to_idf
- inputs
- n2i
name
Full name or description of this item.
- names_ptb
- vals_ptb
Methods
initialize
-
A
¶
-
df_conds
¶
-
df_exp
¶
-
df_ptb
¶
-
dg
¶
-
has_link_perturb
¶
-
i2n
¶
-
iadj_to_idf
¶
-
initialize
(self, fpath, fname_network='network.sif', fname_ptb='ptb.tsv', fname_conds='conds.tsv', fname_exp='exp.tsv', inputs={})[source]¶
-
inputs
¶
-
n2i
¶
-
names_ptb
¶
-
vals_ptb
¶
-
class
sfa.base.
Result
[source]¶ Bases:
sfa.utils.FrozenClass
- Attributes
- df_sim
-
df_sim
¶