-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path1d_parameters.jl
56 lines (43 loc) · 1.57 KB
/
1d_parameters.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# Testing the 4-10 particles example with lower iterations from the algorithm.
# Static Parameters
f_c = 20
x_max = 1.0
num_x = 10*f_c
filter_x = ones(2*f_c+1)
# Dynamic Parameters
K = 2
tau = 1.0/(K*1.0)
v_max = 0.5
num_v = 10
# Variability of weights
minWeights = 0.9
maxWeights = 1.1
# Variability of number of particles
min_number_part = 4
max_number_part = 10
# Number of generated examples
num_trials = 1000
# Iterations of minimization algorithm
algIter = 100;
# test case
test_case = () -> TestCases.cloud_1d_full(x_max, v_max, minWeights, maxWeights, K, tau, rand(min_number_part:max_number_part))
# WARNING: changing anything in the test_case will generate troubles if the rejection_sampling algorithm
# in Utils.js is not either updated for it, or disabled.
# Noise parameters
noises_data = linspace(0,0.1,5)
noises_data = noises_data[2:end]
noises_position = linspace(0,0.06,5)
noises_position = noises_position[2:end]
### Location of data folder
dataFolder = "data/1Dsimulations"
# loaded data for rejection sampling of simulations
bins = np.load(dataFolder*"/separationDistribBins_06interval.npy")
density = np.load(dataFolder*"/separationDistribVal_06interval.npy")
println(" WARNING: The rejection sampling algorithm is being used, with interval of interest: [",bins[1]," ",bins[end],"]. To change it check the separationDistribution.jl file.")
### Cases to be tested
noiseless_dynamic = true
noiseless_static = true
noise_dynamic = true
noise_static = true
curvature_static = true
cases = (noiseless_dynamic, noiseless_static, noise_dynamic, noise_static, curvature_static)