Skip to content

Commit

Permalink
Made a few improvements to the 'noinit' LDA scripts.
Browse files Browse the repository at this point in the history
  • Loading branch information
pcarbo committed Aug 19, 2024
1 parent 62dd72a commit 2f7c259
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 201 deletions.
2 changes: 1 addition & 1 deletion scripts/run_lda.sbatch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

#SBATCH --partition=mstephens
#SBATCH --partition=broadwl
#SBATCH --account=pi-mstephens
#SBATCH --cpus-per-task=4
#SBATCH --mem=32G
Expand Down
4 changes: 2 additions & 2 deletions scripts/run_lda_noinit.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ countsfile <- out$counts
k <- out$k
outfile <- tail(unlist(strsplit(countsfile,"/")),n = 1)
outfile <- substr(outfile,1,nchar(outfile) - 6)
outfile <- paste0("lda-",outfile,"-k=",k,".rds")
outfile <- paste0("lda-",outfile,"-noinit-k=",k,".rds")
rm(parser,out)

# Initialize the sequence of pseudorandom numbers.
Expand All @@ -50,7 +50,7 @@ lda <- LDA(counts,k,
control = list(alpha = 1,
estimate.alpha = FALSE,
verbose = 1,
em = list(iter.max = 10,tol = 0),
em = list(iter.max = 100,tol = 0),
var = list(iter.max = 20,tol = 0),
keep = 1))
t1 <- proc.time()
Expand Down
2 changes: 1 addition & 1 deletion scripts/run_lda_noinit.sbatch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

#SBATCH --partition=mstephens
#SBATCH --partition=broadwl
#SBATCH --account=pi-mstephens
#SBATCH --cpus-per-task=4
#SBATCH --mem=8G
Expand Down
21 changes: 21 additions & 0 deletions scripts/run_lda_noinit_all.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash

# The shell commands below will submit Slurm jobs to run LDA for all
# data sets, and for different choices of K.
MAIN_SCRIPT=run_lda_noinit.sbatch

# Run LDA on the newsgroups data.
#
# data k
sbatch ${MAIN_SCRIPT} newsgroups 2
sbatch ${MAIN_SCRIPT} newsgroups 3
sbatch ${MAIN_SCRIPT} newsgroups 4
sbatch ${MAIN_SCRIPT} newsgroups 5
sbatch ${MAIN_SCRIPT} newsgroups 5
sbatch ${MAIN_SCRIPT} newsgroups 6
sbatch ${MAIN_SCRIPT} newsgroups 7
sbatch ${MAIN_SCRIPT} newsgroups 8
sbatch ${MAIN_SCRIPT} newsgroups 9
sbatch ${MAIN_SCRIPT} newsgroups 10
sbatch ${MAIN_SCRIPT} newsgroups 11
sbatch ${MAIN_SCRIPT} newsgroups 12
197 changes: 0 additions & 197 deletions scripts/run_lda_noinit_lda.sh

This file was deleted.

0 comments on commit 2f7c259

Please sign in to comment.