Data mining is the whole procedure of analyzing patterns between some objects. Due to its importance in wide range of areas such as business, science and technology, the methods for proceeding this job are developed from early century. Especially, inventing computers enables us to create many efficient tools including Random Forest. Classification is one of the form of data mining. The key objective of classification is the generalization of known structure from given data. We can use the Bayesian Network, a kind of classification, to analyzing the relations between random variables under suitable conditions. Bayesian Network is the graph-shaped modeling relations between random variables. Each variable supported by $\{0,1 \}$ can be expressed by nodes of graph. Their relations also can be described by edges. This method includes a lot of graphical model structure to find correct one such as undirected graph model, directed acyclic graph model and chain model. This modeling among variables can allow us to recognize whole structure easily. Directed acyclic graphical model, especially, contains a bunch of information even though it is hard to determine. To find the true structure, people must do several jobs. Before analyzing given data, we should get information about a whole situation which we can gain. It is sometimes very useful ingredient for deciding structure. There exist two ways to find undirected edges for objective reasons. One is to find undirected graphical model. This can do by a variety of tools such as log-linear modeling. The other is to determine the previous structure of directed acyclic graph model before deciding orientations. We will introduce this by using the package Random Forest. Finally, we should decide the directions of edges. Unfortunately, there is no standard program for doing this. But as we study the characteristic of relations between nodes such as independency, we can determine the orientations. Also we use the knowledge o...