In this paper, we present an application of probabilistic graphical models such as Bayesian Networks (BNs) for capturing the spatio-temporal factors in cognitive networks. We propose to use a BN that makes use of historical network information to learn the network behavior across spatio-temporal-spectral dimensions and predicts best configuration for each Access Point (AP) in a Wireless LAN (WLAN) system. We further present the application of BNs for traffic prediction as well as channel selection in a cognitive WLAN scenario. Our results prove that the space and time are critical factors that can impact the performance of the network configuration. We noticed improvement in traffic prediction accuracy and channel selection accuracy, respectively, of 35% and 40%, when using space and time information. © 2010 IEEE.