Boundary partitioning problem is one of the core issues of data analysis. In this paper, homology theory is used to solve the crystal data boundary classification problems. By using homology theory, a cellular homology boundary algorithm, a regular cellular homology boundary algorithm and cohomology boundary learning algorithms are presented and applied to the crystal structure prediction and classification. Because the crystallographic data meet the basic properties of the symmetry group, the paper refers to the homology algebra methods from machine learning point of view to research data in the boundary classification problem. To construct classification model from different angles, the paper first starts with a relatively homology boundary expanded as a local homology and orientated homology, and then goes into the cohomology boundary algorithm and the cellular cohomology boundary algorithm. Finally, this paper extends the Focus factor theorems to regular cellular cohomology, and then the relative manifold. Experimental results show the efficiency of cohomology boundary learning algorithm.