question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Why are categorical data all set 1?

See original GitHub issue

If do so,what`s the meaning of categorical data?

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:5

github_iconTop GitHub Comments

5reactions
Lirunhuacommented, Dec 31, 2019

因为这里有 numerical feature, 所以对于整个输入的 vector, 不能直接 tf.nn.embedding_lookup 就完事了, 因为对于 numerical feature 没法做到真正的 embedding. 因此, 这里的做法是, 拿到 tf.nn.embedding_lookup 之后, 和输入的 vector 直接相乘一下. 对于 categorical feature, 我们当然是希望保持 embedding 对应索引的那个 vector. 所以就直接置为 1 了, 这个主要是代码的 trick 吧.

0reactions
Lirunhuacommented, Dec 31, 2019

If do so,what`s the meaning of categorical data?

please note this line(DeepFM.py, around line 88) self.y_first_order = tf.reduce_sum(tf.multiply(self.y_first_order, feat_value), 2) # None * F

It’s not for categorical feature, it’s for numercal feature

Read more comments on GitHub >

github_iconTop Results From Across the Web

Categorical data — pandas 1.5.2 documentation
All values of categorical data are either in categories or np.nan . Order is defined by the order of categories , not lexical...
Read more >
Categorical Data: Definition + [Examples, Variables & Analysis]
Categorical data can take on numerical values (such as “1” indicating Yes and “2” indicating No), but those numbers don't have mathematical meaning....
Read more >
Categorical vs. Quantitative Data: The Difference Plus Why ...
Data matching compares two sets of data collections.​​ Although categorical data is qualitative, it can also be calculated in numerical values. ...
Read more >
Categorical Data
Categorical variables represent types of data which may be divided into groups. Examples of categorical variables are race, sex, age group, and educational ......
Read more >
Strategies for working with discrete, categorical data
Dealing with numeric data is often easier than categorical data given that we do not have to deal with additional complexities of the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found