Git Product home page Git Product logo

ctrnet-tool's Issues

关于特征处理

你好,请问一下特征不用经过处理直接扔进去模型训练就可以吗?离散特征和连续特征需不需要不同的处理

TypeError: argument of type 'HParams' is not iterable

第一次开源https://www.kaggle.com/guoday/nffm-baseline-0-690-on-lb
的时候能正常使用
最近开源https://www.kaggle.com/guoday/xdeepfm-baseline之后,
重新运行代码,运行报错了,
python 3.6
tensorflow-gpu 1.4.0,

Traceback (most recent call last):
File "gd_nffm.py", line 167, in
dev_data=(train.iloc[dev_index][features], train.iloc[dev_index]['HasDetections']))
File "/home/yuqing/tsf/kaggle/mmp/models/nffm.py", line 106, in train
if idx*hparams.batch_size>=len(train_data[0]) or ('steps' in hparams and hparams.steps==idx):
TypeError: argument of type 'HParams' is not iterable

关于FFM

hi,dear大佬,
由于FFM数据格式的确难以理解,请问有没有试过movielens-1M或类似的数据集进行FFM模型测试?因为每行数据都是field:feature:value这种,实在不知道怎么将movielens数据进行转换,user或movie特征该怎么转换呢?模型又是怎么输入和输出呢?
多谢

请问训练集和验证集的logloss都在降低,但是auc为啥也越来越低了啊,偏差还挺大

poch 0 step 100 lr 0.001 logloss 0.365111 gN 0.56, Wed Jul 3 17:12:50 2019
epoch 0 step 200 lr 0.001 logloss 0.191605 gN 0.28, Wed Jul 3 17:13:58 2019
epoch 0 step 300 lr 0.001 logloss 0.182971 gN 0.25, Wed Jul 3 17:15:06 2019
epoch 0 step 400 lr 0.001 logloss 0.175328 gN 0.23, Wed Jul 3 17:16:19 2019
epoch 0 step 500 lr 0.001 logloss 0.167133 gN 0.21, Wed Jul 3 17:17:36 2019

Epcho-time 355.16s Eval AUC 0.982286. Best AUC 0.982286.

epoch 0 step 600 lr 0.001 logloss 0.173233 gN 0.20, Wed Jul 3 17:19:29 2019
epoch 0 step 700 lr 0.001 logloss 0.169078 gN 0.19, Wed Jul 3 17:20:41 2019
epoch 0 step 800 lr 0.001 logloss 0.166135 gN 0.18, Wed Jul 3 17:21:52 2019
epoch 0 step 900 lr 0.001 logloss 0.161865 gN 0.17, Wed Jul 3 17:23:02 2019
epoch 0 step 1000 lr 0.001 logloss 0.158251 gN 0.17, Wed Jul 3 17:24:11 2019

Epcho-time 750.18s Eval AUC 0.464652. Best AUC 0.982286.

epoch 0 step 1100 lr 0.001 logloss 0.161384 gN 0.17, Wed Jul 3 17:25:25 2019
epoch 0 step 1200 lr 0.001 logloss 0.158918 gN 0.16, Wed Jul 3 17:26:41 2019
epoch 0 step 1300 lr 0.001 logloss 0.157845 gN 0.15, Wed Jul 3 17:28:13 2019
epoch 0 step 1400 lr 0.001 logloss 0.154907 gN 0.15, Wed Jul 3 17:29:35 2019
epoch 0 step 1500 lr 0.001 logloss 0.157655 gN 0.15, Wed Jul 3 17:30:52 2019

base_model 正则化损失_cross_l_loss计算 是否有问题

脚本 baseline_model 第76,77行

def _cross_l_loss(self, hparams):
cross_l_loss = tf.zeros([1], dtype=tf.float32)
for param in self.cross_params:
cross_l_loss = tf.add(cross_l_loss, tf.multiply(hparams.cross_l1, tf.norm(param, ord=1)))
cross_l_loss = tf.add(cross_l_loss, tf.multiply(hparams.cross_l2, tf.norm(param, ord=1)))
return cross_l_loss

加了两次L1损失,而第二个参数是hparams.cross_l2

关于模型预测的infer接口

是不是可以只传入一个参数,比如 preds=model.infer(dev_data=(test[features])) 我看代码示例dev_data需要传入label? 还是说dev_data,必须传入label像这样 preds=model.infer(dev_data(test[features],test['HasDetections']))

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.