Skip to content

Commit

Permalink
Remove obsolete learning_rate parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
nanxstats committed Oct 26, 2024
1 parent f104cfe commit bd50338
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 9 deletions.
3 changes: 1 addition & 2 deletions docs/articles/benchmark.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ Define parameter grids:
n_values = [1000, 5000] # Number of documents
m_values = [500, 1000, 5000, 10000] # Vocabulary size
k_values = [10, 50, 100] # Number of topics
learning_rate = 0.01
avg_doc_length = 256 * 256
```

Expand All @@ -72,7 +71,7 @@ benchmark_results = pd.DataFrame()

def benchmark(X, k, device):
start_time = time.time()
model, losses = fit_model(X, k, learning_rate=learning_rate, device=device)
model, losses = fit_model(X, k, device=device)
elapsed_time = time.time() - start_time

return elapsed_time
Expand Down
3 changes: 1 addition & 2 deletions docs/articles/benchmark.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ Define parameter grids:
n_values = [1000, 5000] # Number of documents
m_values = [500, 1000, 5000, 10000] # Vocabulary size
k_values = [10, 50, 100] # Number of topics
learning_rate = 0.01
avg_doc_length = 256 * 256
```

Expand All @@ -73,7 +72,7 @@ benchmark_results = pd.DataFrame()
def benchmark(X, k, device):
start_time = time.time()
model, losses = fit_model(X, k, learning_rate=learning_rate, device=device)
model, losses = fit_model(X, k, device=device)
elapsed_time = time.time() - start_time
return elapsed_time
Expand Down
2 changes: 1 addition & 1 deletion docs/articles/get-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Fit the topic model and plot the loss curve. There will be a progress
bar.

``` python
model, losses = fit_model(X, k, learning_rate=0.01)
model, losses = fit_model(X, k)

plot_loss(losses, output_file="loss.png")
```
Expand Down
2 changes: 1 addition & 1 deletion docs/articles/get-started.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ X, true_L, true_F = generate_synthetic_data(n, m, k, avg_doc_length=256 * 256)
Fit the topic model and plot the loss curve. There will be a progress bar.

```{python}
model, losses = fit_model(X, k, learning_rate=0.01)
model, losses = fit_model(X, k)
plot_loss(losses, output_file="loss.png")
```
Expand Down
3 changes: 1 addition & 2 deletions examples/benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
n_values = [1000, 5000] # Number of documents
m_values = [500, 1000, 5000, 10000] # Vocabulary size
k_values = [10, 50, 100] # Number of topics
learning_rate = 0.01
avg_doc_length = 256 * 256


Expand All @@ -21,7 +20,7 @@

def benchmark(X, k, device):
start_time = time.time()
model, losses = fit_model(X, k, learning_rate=learning_rate, device=device)
model, losses = fit_model(X, k, device=device)
elapsed_time = time.time() - start_time

return elapsed_time
Expand Down
2 changes: 1 addition & 1 deletion examples/get-started.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
X, true_L, true_F = generate_synthetic_data(n, m, k, avg_doc_length=256 * 256)


model, losses = fit_model(X, k, learning_rate=0.01)
model, losses = fit_model(X, k)

plot_loss(losses, output_file="loss.png")

Expand Down

0 comments on commit bd50338

Please sign in to comment.