Fix Wygładzania

This commit is contained in:
Dominik Strzałko 2022-04-11 10:14:46 +02:00
parent 6da349e88f
commit 3882f245bb
4 changed files with 17934 additions and 17934 deletions

Binary file not shown.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -18,7 +18,7 @@ def train_model(data, model,vocab,alpha):
denominator = total_count + alpha * len(vocab) denominator = total_count + alpha * len(vocab)
for w1 in model[w2]: for w1 in model[w2]:
nominator = model[w2][w1] + alpha nominator = model[w2][w1] + alpha
model[w2][w1] /= nominator / denominator model[w2][w1] = nominator / denominator
def predict_data(read_path, save_path, model): def predict_data(read_path, save_path, model):