Work on generating random candidates
This commit is contained in:
parent
b7d638f196
commit
50bff5cabf
@ -11,7 +11,6 @@ for i = 1:length(header)
|
|||||||
header[i] = tmp
|
header[i] = tmp
|
||||||
end
|
end
|
||||||
header = dropdims(reshape(header, :, 1), dims=2)
|
header = dropdims(reshape(header, :, 1), dims=2)
|
||||||
|
|
||||||
df = DataFrames.DataFrame()
|
df = DataFrames.DataFrame()
|
||||||
|
|
||||||
# Finally, construct our dataframe
|
# Finally, construct our dataframe
|
||||||
@ -33,4 +32,13 @@ function search(candidates)
|
|||||||
parents = candidates[1:3]
|
parents = candidates[1:3]
|
||||||
end
|
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
|
Loading…
Reference in New Issue
Block a user