Machine learning algorithms have been extensively employed in multiple domains, presenting an opportunity to enable privacy. However, their effectiveness is dependent on enormous data volumes and high computational resources, usually available online. It entails personal and private data like mobile telephone numbers, identification numbers, and medical histories. Developing efficient and economical techniques to protect this private data is critical. In this context, the current research suggests a novel way to accomplish this, combining modified differential privacy with a more complicated machine learning (ML) model. It is possible to assess the privacy-specific characteristics of single or multiple-level models using the suggested method, as demonstrated by this work. It then employs the gradient values from the stochastic gradient descent algorithm to determine the scale of Gaussian noise, thereby preserving sensitive information within the data. The experimental results show that by fine-tuning the parameters of the modified differential privacy model based on the varied degrees of private information in the data, our suggested model outperforms existing methods in terms of accuracy, efficiency and privacy.