Spaces:
Sleeping
Sleeping
MilesCranmer
commited on
Commit
•
eb2dca9
1
Parent(s):
9cd38a5
Move other imports to files that use them
Browse files- julia/LossFunctions.jl +2 -0
- julia/RegularizedEvolution.jl +3 -1
- julia/sr.jl +0 -1
julia/LossFunctions.jl
CHANGED
@@ -1,3 +1,5 @@
|
|
|
|
|
|
1 |
# Sum of square error between two arrays
|
2 |
function SSE(x::Array{Float32}, y::Array{Float32})::Float32
|
3 |
diff = (x - y)
|
|
|
1 |
+
import Random: randperm
|
2 |
+
|
3 |
# Sum of square error between two arrays
|
4 |
function SSE(x::Array{Float32}, y::Array{Float32})::Float32
|
5 |
diff = (x - y)
|
julia/RegularizedEvolution.jl
CHANGED
@@ -1,3 +1,5 @@
|
|
|
|
|
|
1 |
# Pass through the population several times, replacing the oldest
|
2 |
# with the fittest of a small subsample
|
3 |
function regEvolCycle(pop::Population, T::Float32, curmaxsize::Integer,
|
@@ -41,4 +43,4 @@ function regEvolCycle(pop::Population, T::Float32, curmaxsize::Integer,
|
|
41 |
end
|
42 |
|
43 |
return pop
|
44 |
-
end
|
|
|
1 |
+
import Random: shuffle!
|
2 |
+
|
3 |
# Pass through the population several times, replacing the oldest
|
4 |
# with the fittest of a small subsample
|
5 |
function regEvolCycle(pop::Population, T::Float32, curmaxsize::Integer,
|
|
|
43 |
end
|
44 |
|
45 |
return pop
|
46 |
+
end
|
julia/sr.jl
CHANGED
@@ -1,5 +1,4 @@
|
|
1 |
import Printf: @printf
|
2 |
-
import Random: shuffle!, randperm
|
3 |
|
4 |
function fullRun(niterations::Integer;
|
5 |
npop::Integer=300,
|
|
|
1 |
import Printf: @printf
|
|
|
2 |
|
3 |
function fullRun(niterations::Integer;
|
4 |
npop::Integer=300,
|