Created
September 5, 2019 12:40
-
-
Save kmdupr33/7df983b852854e525d5d00ceae453c50 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun findLearningParameters(videoGameData: Array<Pair<Double, Double>>): Pair<Double, Double> { | |
val learningRate = .0003 | |
var guess = Pair(0.0, 0.0) | |
for (i in 1..10000000) { | |
guess = updateGuess(guess, learningRate, videoGameData) | |
if (i % 1000 == 0) println("Guess: $guess") | |
if (i % 1000 == 0) println("Cost: ${cost(videoGameData, guess)}") | |
} | |
return guess | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment