Create Hall of fame manually #443
DenisSvirin
started this conversation in
General
Replies: 1 comment 3 replies
-
This will be easier once this PR is finished: #429 since it will store the In Julia, the way I would do it is using SymbolicRegression
e = Node(val=3.2)
x1 = Node(feature=1)
xsi = Node(val=1.224)
one = Node(val=1)
two = Node(val=2)
mtwo = Node(val=-2)
r_cut = Node(val=2.556)
q = Node(val=2.27)
A = Node(val=0.0855)
p = Node(val=-10.960)
options = Options(binary_operators=[+, -, *, /], unary_operators=[cos, exp])
# ^ Default options will automatically create the associated operators for use on `Node` directly
dataset = Dataset(X, y)
# Create data:
tree1 = exp(e + x1)
tree2 = cos(A + exp(p * x1))
# Format to PopMember:
member1 = PopMember(dataset, tree1, options)
member2 = PopMember(dataset, tree2, options)
# Create empty hall of fame:
hof = HallOfFame(options, Float32, Float32)
for member in (member1, member2)
hof.members[member.complexity] = member
hof.exists[member.complexity] = true
end then the |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Can you, please, provide an example of how to create Hall of fame manually ?
I ve created an expression before assigning it to
self.raw_julia_state_
:(May be there more efficient way to do it)
But im struggling to put it in hof.
I planned to create hof and pass it here as
self.raw_julia_state_
: sr.pyBeta Was this translation helpful? Give feedback.
All reactions