Work on generating random candidates

This commit is contained in:
Jacob Windle 2019-08-14 10:15:24 -04:00
parent b7d638f196
commit 50bff5cabf

View File

@ -11,7 +11,6 @@ for i = 1:length(header)
header[i] = tmp
end
header = dropdims(reshape(header, :, 1), dims=2)
df = DataFrames.DataFrame()
# Finally, construct our dataframe
@ -33,4 +32,13 @@ function search(candidates)
parents = candidates[1:3]
end
search(generateCandidatePool())
function randRow()
# Generate a random row index
abs(rand(Int) % size(df, 1))
end
function randomCandidate(n)
# Select n random rows from the dataset.
rows = [randRow() for i = 1:n]
df[rows, :]
end