Biology Reference
In-Depth Information
> lasso.est = predict(lasso.fit, type = "fit",
+
newx = x, s = frac,
+
mode = "fraction")$fit
> lasso.est
0-1 0-2 1-1 1-2 2-1
7.099782 6.894064 7.166249 7.157744 7.592092
2-2 4-1 4-2 8-1 8-2
7.379432 7.990548 8.078921 8.353137 8.333108
12-1 12-2 13-1 13-2 14-1
8.940241 8.780302 8.816387 8.758480 8.542374
14-2 16-1 16-2 20-1 20-2
8.417818 7.446577 7.329513 6.717392 6.747178
The expression levels for times
20-1
and
20-2
result from filtering the values for
the current time point (e.g.,
t
); all the other expression levels are smoothed estimates
of past time points (e.g., 1
1).
Furthermore, the expression level for gene
265768 at
at time
t
,...,
t
−
1 can be pre-
dicted using the data points we discarded when performing structure learning in
Sect.
3.5.2
.
+
> lasso.pred = predict(lasso.fit, type = "fit",
+
newx = arth12[c("24-1", "24-2"), ],
+
s = frac, mode = "fraction")$fit
> lasso.pred
24-1 24-2
6.822643 6.882054
We can also use
cpquery
and
cpdist
to perform complex conditional prob-
ability queries; in this case, we will use the
penalized
package to fit the LASSO
models because of its integration with
bnlearn
.
> library(penalized)
Consider again the expression level of gene
265768 at
at the current time point
t
. First, we estimate the optimal value of the
L
1
penalty
λ
and we fit the LASSO
model one more time.
> lambda = optL1(response = y, penalized = x)$lambda
> lasso.t = penalized(response = y, penalized = x,
+ lambda1 = lambda)
> coef(lasso.t)
(Intercept) 245094_at
14.0402894 -0.7059011
As we can see from the output, the only parent of gene
265768 at
is gene
245094 at
. The latter seems to inhibit the expression of the former.
Subsequently, we can create the network structure with
modelstring
and pro-
vide the parameters via the
custom.fit
function. The parameter sets of the nodes
are specified by the
dist
argument, which is a list with one element for each node.
Search WWH ::
Custom Search