Created
October 8, 2017 23:39
-
-
Save dcshapiro/4aad96aaa24d39513eb862d5ea97ed42 to your computer and use it in GitHub Desktop.
Extract Event Features from event
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 getEventFeatures(event, map, graph): | |
#extract numerical fields into numpy array | |
#extract categorical fields | |
#binarize categorical fields using the categorical feature map | |
#extract image data into fixed size vector using CNN(s) | |
#extract text data into fixed-length word2vec vector (e.g. sentence vector, paragraph vector, doc2vec) | |
#extract relationship data from the knowledge graph | |
#concatenate the extracted features above into a fixed-length feature vector x | |
#example: x=np.concatenate((x, image_data), axis=1) | |
return x |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment