Skip to content

Commit

Permalink
MLJ is optional
Browse files Browse the repository at this point in the history
  • Loading branch information
aquaresima committed Dec 11, 2024
1 parent 6b807f9 commit 29cc89f
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
2 changes: 2 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ NPZ = "15e1cf62-19b3-5cfa-8e77-841668bca605"
Parameters = "d96e819e-fc66-5662-9728-84c9c7592b0a"
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Requires = "ae029012-a4dd-5104-9daa-d747884805df"
RollingFunctions = "b0e4dd01-7b14-53d8-9b45-175a3e362653"
Serialization = "9e88b42a-f829-5b0c-bbe9-9e923198166b"
SpikingNeuralNetworks = "9d8b7fda-1049-58bc-9481-071a9f369938"
Expand All @@ -38,3 +39,4 @@ MLJ = "0.20.7"
MLJLIBSVMInterface = "0.2.1"
MLJLinearModels = "0.10.0"
NPZ = "0.4.3"
Requires = "1.3.0"
10 changes: 8 additions & 2 deletions src/SNNUtils.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
module SNNUtils

using Requires
using SpikingNeuralNetworks
SNN.@load_units
using DrWatson
Expand All @@ -22,7 +23,12 @@ using Statistics
include("stimuli/base.jl")
include("models/models.jl")
include("analysis/performance.jl")
include("analysis/classifiers.jl")

function __init__()
# @require Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" include("plot.jl")
@require MLJ = "add582a8-e3ab-11e8-2d5e-e98b27df1bc7" include("analysis/classifiers.jl")
end

end


end # module
7 changes: 2 additions & 5 deletions src/analysis/classifiers.jl
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@

using MLJ
using LIBSVM
using StatsBase
using Statistics
using MLJ
using CategoricalArrays

"""
SVCtrain(Xs, ys; seed=123, p=0.6)
Expand Down
1 change: 0 additions & 1 deletion src/stimuli/sequence/sequence_generators.jl
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,6 @@ function step_input_sequence(;
param = PSParam(rate=attack_decay,
variables=variables)
push!(stim, s =>Dict{Symbol,Any}())
@show stim
for t in targets
push!(stim[s], t => SNN.PoissonStimulus(E, :he, t, μ=proj_strength, param=param, name="w_$s", p_post=p_post))
if !words
Expand Down

0 comments on commit 29cc89f

Please sign in to comment.