Skip to content

Instantly share code, notes, and snippets.

@lexrus
Created June 29, 2018 13:27
Show Gist options
  • Save lexrus/9457eff95c5684701af107d7819b2f4b to your computer and use it in GitHub Desktop.
Save lexrus/9457eff95c5684701af107d7819b2f4b to your computer and use it in GitHub Desktop.
CreateML 双色球
import Cocoa
import CreateML
let 双色球神算子 = try MLTextClassifier(trainingData: [
"中奖啦": [
"09 11 14 20 27 30 09",
"02 09 14 15 16 23 10",
"11 16 19 22 25 30 08",
"02 05 06 13 16 19 03",
"04 09 15 16 19 27 10",
"06 13 17 19 23 31 12",
"08 10 17 20 27 30 01",
"01 04 09 12 15 18 05",
"09 16 17 19 22 26 10",
"01 04 06 14 28 33 01"
],
"下次再来": [
"01 02 03 04 05 06 07",
"02 03 04 05 06 07 08",
"03 04 05 06 07 08 09",
"04 05 06 07 08 09 10",
"05 06 07 08 09 10 11",
"06 07 08 09 10 11 12",
"07 08 09 10 11 12 13",
"08 09 10 11 12 13 14",
"09 10 11 12 13 14 15",
"10 11 12 13 14 15 16"
]
])
try 双色球神算子.prediction(from: "03 05 12 14 23 28 05")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment