A Novel Active Safety Algorithm using Improved Neural Network