From 2c3fc77ba6465d42568a0f5788a9931d7045f955 Mon Sep 17 00:00:00 2001 From: Samuel Sloniker Date: Sun, 16 Apr 2023 15:48:19 -0700 Subject: [PATCH] Finish classification explanations A couple things I missed in 7f68dc6fc6961495cc5d4ca9b80708adfbc95181 --- gptc/model.py | 5 ++++- models/compiled.gptc | Bin 52441 -> 52441 bytes 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/gptc/model.py b/gptc/model.py index 845c3f6..54695f4 100644 --- a/gptc/model.py +++ b/gptc/model.py @@ -95,7 +95,10 @@ class Model: else: explanation[word] = { "weight": weight, - "probabilities": word_probs, + "probabilities": { + name: word_probs[index] + for index, name in enumerate(self.names) + }, "count": 1, } diff --git a/models/compiled.gptc b/models/compiled.gptc index 93502d82d556d323cec9d2099f3b5edbc341cd53..b9416781dd67789b09e2b42fb819ad9de7c2b6d1 100644 GIT binary patch delta 24 gcmcaPllkUMW?uJz5NCzl{FKxjg)*~^yl2h;0CV{Xc>n+a delta 24 gcmcaPllkUMW?uJz5NCzl{FKxjg)-BPyl2h;0CV&ScmMzZ