Big data growth and the evolution of IoT technology figured prominently in making smart city projects feasible. The risk factors for big data in the smart city include data security, and privacy is considered an important factor. In this paper, machine learning-based holistic privacy decentralized framework (ML-HPDF) has been proposed to enhance public safety and confidentiality of the data accessibility for a statistics consumer. Hence, double authentication private-preserving analysis is integrated with ML-HPDF to guarantee the accessibility of transaction data, data providers' secrecy, and fairness between information providers and information customers. The simulation investigation is undertaken based on safety, efficiency, and confidentiality.