Skip to content

Commit

Permalink
fix precompilation error (#236)
Browse files Browse the repository at this point in the history
  • Loading branch information
CarloLucibello committed Jul 9, 2024
1 parent 342b846 commit beb1b84
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/datasets/graphs/chickenpox.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function chickenpox_datadir(dir = nothing)
return dir
end

function generate_task(data::AbstractArray, num_timesteps_in::Int, num_timesteps_out::Int)
function generate_task_chickenpox(data::AbstractArray, num_timesteps_in::Int, num_timesteps_out::Int)
features = []
targets = []
for i in 1:(size(data,3)-num_timesteps_in-num_timesteps_out)
Expand Down Expand Up @@ -46,7 +46,7 @@ function create_chickenpox_dataset( normalize::Bool, num_timesteps_in::Int, num_
f = (f .- Statistics.mean(f, dims=(2))) ./ Statistics.std(f, dims=(2)) #Z-score normalization
end

x, y = generate_task(f, num_timesteps_in, num_timesteps_out)
x, y = generate_task_chickenpox(f, num_timesteps_in, num_timesteps_out)

g = Graph(; edge_index = (src, dst),
node_data = (features = x, targets = y))
Expand Down
4 changes: 2 additions & 2 deletions src/datasets/graphs/windmillenergy.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function windmillenergy_datadir(size::String, dir = nothing)
return dir
end

function generate_task(data::AbstractArray, num_timesteps_in::Int, num_timesteps_out::Int)
function generate_task_windmillenergy(data::AbstractArray, num_timesteps_in::Int, num_timesteps_out::Int)
features = []
targets = []
for i in 1:(size(data,3)-num_timesteps_in-num_timesteps_out)
Expand All @@ -49,7 +49,7 @@ function create_windmillenergy_dataset(s::String, normalize::Bool, num_timesteps
f = (f .- Statistics.mean(f, dims=(2))) ./ Statistics.std(f, dims=(2)) #Z-score normalization
end

x, y = generate_task(f, num_timesteps_in, num_timesteps_out)
x, y = generate_task_windmillenergy(f, num_timesteps_in, num_timesteps_out)

g = Graph(; edge_index = (src, dst),
edge_data = weights,
Expand Down

0 comments on commit beb1b84

Please sign in to comment.