An entanglement witness (EW) is a Hermitian operator that can distinguish an entangled state from all separable states. We developed and implemented a numerical method based on machine learning to create multipartite EW. Using a Support Vector Machine (SVM) algorithm, we construct EW's based on local orthogonal observables in the form of a hyperplane that separates the separable region from the entangled state for two, three, and four qubits Bell-diagonal mixed states which can be generalized to a multipartite mixed state. One of the important features of this method is that the EW s are optimal and are completely tangent to the separable region. Also, we generate non-decomposable EW's that can detect positive partial transpose entangled states (PPTES).