Skip to content

Commit

Permalink
Online Sampling Approach
Browse files Browse the repository at this point in the history
This PR is meant to apply a more efficient sampling process which will hopefully increase the speed of inference significantly by reducing allocations.
  • Loading branch information
kylebd99 committed Nov 14, 2023
1 parent 8f373ee commit 6048a04
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
6 changes: 2 additions & 4 deletions Experiments/Scripts/comparison_exps.jl
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@

using Profile
include("../Experiments.jl")

#datasets = [aids, yeast, hprd, dblp, youtube, wordnet]
datasets = [lubm80, aids, human]
datasets = [lubm80, aids, human, dblp]

experiment_params = Vector{ExperimentParams}()
for dataset in datasets
push!(experiment_params, ExperimentParams(dataset=dataset))
push!(experiment_params, ExperimentParams(dataset=dataset, num_colors=256))
# push!(experiment_params, ExperimentParams(dataset=dataset, num_colors=256))
end

#build_experiments(experiment_params)
Expand Down
3 changes: 1 addition & 2 deletions Source/QuasiStableCardinalityEstimator.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Equivalently, they perform a groupby on all other nodes of the query graph. The goal of this is to prevent
# an exponential growth in the number of paths through the lifted color graph. However, we can only remove query nodes whose
# edges have already been processed.
function sum_over_node!(partial_paths::Vector{Tuple{Vector{Color}, Vector{Float64}}}, current_query_nodes, node_to_remove)
@inline function sum_over_node(partial_paths::Matrix{Color}, partial_weights::Matrix{Float64}, current_query_nodes::Vector{Int}, node_to_remove::Int)
nodeIdx = 1
for node in current_query_nodes
if node == node_to_remove
Expand Down Expand Up @@ -150,7 +150,6 @@ function get_all_simple_path_bools(start::Int, finish::Int, max_length::Int,
return path_bools
end


# gets the directed path from the start to finish node
function get_matching_graph(start::Int, finish::Int, query::QueryGraph)
# convert the graph to be undirected
Expand Down

0 comments on commit 6048a04

Please sign in to comment.