Optimization of lattice structure using machine learning approach