jfpuget / libfm_in_keras Goto Github PK
View Code? Open in Web Editor NEWThis notebook shows how to implement LibFM in Keras and how it was used in the Talking Data competition on Kaggle.
License: Apache License 2.0
This notebook shows how to implement LibFM in Keras and how it was used in the Talking Data competition on Kaggle.
License: Apache License 2.0
hi,
as we can see from the codes:
i):features = ['os', 'device', 'app']
f_size = [int(data[f].max()) + 1 for f in features]
ii) def get_embed(x_input, x_size, k_latent):
if x_size > 0: #category
embed = Embedding(x_size, k_latent, input_length=1,
embeddings_regularizer=l2(embedding_reg))(x_input)
embed = Flatten()(embed)
else:
embed = Dense(k_latent, kernel_regularizer=l2(embedding_reg))(x_input)
return embed
iii) biases = [get_embed(x, size, 1) for (x, size) in zip(input_x, f_size)]
factors = [get_embed(x, size, k_latent) for (x, size) in zip(input_x, f_size)]
in the demo,there are all the category variable in the data,
can you show us how to handle with continuous variable?or make continuous variable into bins?
looking for your reply!
^_^
Hi,
Many thanks sharing this code.
Having the output file, how is it possible to connect it to the original dataset ? I'm using panda, is there any special command doing it ? Appear to me that the usual "merge on"
command is not working with multiple columns
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.