Cognitive radio appears as a promising technology to allocate wireless spectrum between licensed and unlicensed users in an efficient way. When unlicensed users opportunistically utilize spectrum holes, prediction models that infer the availability of spectrum holes can help to improve the spectrum extraction rate and reduce the collision rate. In this paper, a spectrum occupancy prediction model based on Partial Periodic Pattern Mining (PPPM) is introduced. The mining aims at identifying frequent spectrum occupancy patterns that are hidden in the spectrum usage of a channel. The mined frequent patterns are then used to predict future channel states (i.e., busy or idle). Based on the prediction, unlicensed users are able to utilize spectrum holes aggressively without introducing significant interference to licensed users. PPPM outperforms traditional Frequent Pattern Mining (FPM) by considering real patterns that do not repeat perfectly due to noise, sensing errors, and irregular behaviors. Using real-world Wi-Fi and personal communication service (PCS) activities, we show a significant reduction on miss rate in channel state prediction. With the proposed prediction mechanism, the performance of Dynamic Spectrum Access (DSA) is substantially improved. Further, we extend the three-state PPPM to an N-state PPPM to predict the duration of high/low utilization in a channel. The frequent patterns of channel utilization duration are critical in optimizing channel switch strategies. The high prediction accuracy is validated with data collected in the paging bands.