iamtrask / Sonar

DEPRECATED - Decentralized Machine Learning Server (hosted on Blockchain)
Apache License 2.0
141 stars 49 forks source link

updated incentive #39

Closed bendangnuksung closed 6 years ago

bendangnuksung commented 6 years ago

Correction in incentive

bendangnuksung commented 6 years ago

changes made: 1.(contract/ModelRepository.sol) incentive calculation is not accurate because it is calculating the incentive without considering 'Model.targetError'. Its assumes the targetError =0. Added incentiveCalculations() which considers the 'targetValue' to derive correct incentive. 2.(test/modelrepository.js) edited: targetValue, where targetValue < initialValue

  1. (test/TestModelRepository) added: unit test for incentive calculations
bendangnuksung commented 6 years ago

Changes made on files mentioned above. Please check it. Thank you.