Created
November 2, 2021 20:38
-
-
Save cj2001/0e7405f5aafee4d3b4cfd2d0fed85fc3 to your computer and use it in GitHub Desktop.
CORA create objective function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def objectiveSKLearn(): | |
def objective(params): | |
dim = params['embeddingDimension'] | |
thirdWeight = params['thirdWeight'] | |
fourthWeight = params['fourthWeight'] | |
normalizationStrength = params['normalizationStrength'] | |
# Create embeddings | |
query = """CALL gds.fastRP.write( | |
'cora', | |
{ | |
embeddingDimension: %d, | |
iterationWeights: [0.0, 0.0, %f, %f], | |
normalizationStrength: %f, | |
randomSeed: 42, | |
writeProperty: 'fastrp_embedding' | |
} | |
) | |
""" % (dim, thirdWeight, fourthWeight, normalizationStrength) | |
conn.query(query) | |
return modeler(params) | |
return objective |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment