MilesCranmer commited on
Commit
5eeffc0
1 Parent(s): 37f71ff

Fix syntax highlighting

Browse files
Files changed (1) hide show
  1. README.md +7 -7
README.md CHANGED
@@ -35,13 +35,13 @@ const binops = [plus, mult]
35
  const unaops = [sin, cos, exp];
36
  ```
37
  E.g., you can add the function for powers with:
38
- ```
39
  pow(x::Float32, y::Float32)::Float32 = sign(x)*abs(x)^y
40
  const binops = [plus, mult, pow]
41
  ```
42
 
43
  You can change the dataset here:
44
- ```
45
  const X = convert(Array{Float32, 2}, randn(100, 5)*2)
46
  # Here is the function we want to learn (x2^2 + cos(x3))
47
  const y = convert(Array{Float32, 1}, ((cx,)->cx^2).(X[:, 2]) + cos.(X[:, 3]))
@@ -55,19 +55,19 @@ rate over time: at the end (temperature 0), it will only select solutions
55
  better than existing solutions.
56
 
57
  The following parameter, parsimony, is how much to punish complex solutions:
58
- `
59
  const parsimony = 0.01
60
- `
61
 
62
  Finally, the following
63
  determins how much to scale temperature by (T between 0 and 1).
64
- `
65
  const alpha = 10.0
66
- `
67
  Larger alpha means more exploration.
68
 
69
  One can also adjust the relative probabilities of each mutation here:
70
- ```
71
  weights = [8, 1, 1, 1, 2]
72
  ```
73
  (for: 1. perturb constant, 2. mutate operator,
 
35
  const unaops = [sin, cos, exp];
36
  ```
37
  E.g., you can add the function for powers with:
38
+ ```julia
39
  pow(x::Float32, y::Float32)::Float32 = sign(x)*abs(x)^y
40
  const binops = [plus, mult, pow]
41
  ```
42
 
43
  You can change the dataset here:
44
+ ```julia
45
  const X = convert(Array{Float32, 2}, randn(100, 5)*2)
46
  # Here is the function we want to learn (x2^2 + cos(x3))
47
  const y = convert(Array{Float32, 1}, ((cx,)->cx^2).(X[:, 2]) + cos.(X[:, 3]))
 
55
  better than existing solutions.
56
 
57
  The following parameter, parsimony, is how much to punish complex solutions:
58
+ ```julia
59
  const parsimony = 0.01
60
+ ```
61
 
62
  Finally, the following
63
  determins how much to scale temperature by (T between 0 and 1).
64
+ ```julia
65
  const alpha = 10.0
66
+ ```
67
  Larger alpha means more exploration.
68
 
69
  One can also adjust the relative probabilities of each mutation here:
70
+ ```julia
71
  weights = [8, 1, 1, 1, 2]
72
  ```
73
  (for: 1. perturb constant, 2. mutate operator,