axle.pgm.docalculus.ObservationToAction.scala Maven / Gradle / Ivy
The newest version!
package axle.pgm.docalculus
import spire.algebra.Eq
import spire.algebra.Field
object ObservationToAction extends Rule {
def apply[T: Eq, N: Field](q: CausalityProbability[T, N], m: CausalModel[T, N], namer: VariableNamer[T, N]): List[Form] = {
val Y = q.question
val X = q.actions
// q.given.flatMap(z => {
//
// val Z = Set(z)
// val W = q.given - z
//
// val subModel = m.duplicate()
// subModel.removeInputs(subModel.nodesFor(X))
// subModel.removeOutputs(subModel.nodesFor(Z))
//
// val XW = X ++ W
//
// if (subModel.blocks(Y, Z, XW)) {
// Some(CausalityProbability(Y, W, X + z))
// } else {
// None
// }
// }).toList
Nil // TODO
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy