Abstract

The machine learning algorithms can predict the events based on the trained models and datasets. However, a reliable prediction requires the model to be trusted and tamper-resistant. Blockchain technology provides trusted output with consensus-based transactions and an immutable distributed ledger. The machine learning algorithms can be trained on blockchain smart contracts to produce trusted models for reliable prediction. But most smart contracts in the blockchain do not support floating-point data type, limiting computations for classification, which can affect the prediction accuracy. In this work, we propose a novel method to produce floating-point equivalent probability estimation to classify labels on-chain with a Naive Bayes algorithm. We derive a mathematical model with Taylor series expansion to compute the ratio of the posterior probability of classes to classify labels using integers. Moreover, we implemented our solution in Ethereum blockchain smart-contract with the Solidity programming language, where we achieved a prediction accuracy comparable to the scikit-learn library in Python. Our derived method is platform-agnostic and can be supported in any blockchain network. Furthermore, machine learning and deep-learning algorithms can borrow the derived method.

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.