{
  "id": 12478,
  "title": "Kaggler - Python Package for Kaggler",
  "url": "/competitions/avazu-ctr-prediction/discussion/12478",
  "author_name": "jeong",
  "post_date": "2015-02-11T09:17:14.550000",
  "votes": 51,
  "comment_count": 35,
  "views": 11323,
  "content": "<p>Hi all,</p>\n<p>It was&nbsp;another great competition with tons of learning - special thanks to tinrtgu and fellow Kagglers who shared their insights, and big congratulations to the winners!</p>\n<p>Here I'd like to share what I've put together for online learning as a Python package - named <a href=\"https://github.com/jeongyoonlee/Kaggler\" target=\"_blank\">Kaggler</a>.</p>\n<p>You can install it with pip as follows:</p>\n<p><code>&nbsp; &nbsp; $ pip install -U Kaggler</code></p>\n<p>then, import algorithm classes as follows:</p>\n<p><code>&nbsp; &nbsp; from kaggler.online_model import SGD, FTRL, FM, NN, NN_H2</code></p>\n<p>Currently it supports 4 online learning algorithms - SGD, FTRL, FM (original version, not 3 idiot's yet), NN (1 or 2 ReLU hidden layers).</p>\n<p>It uses the <a href=\"http://www.csie.ntu.edu.tw/~cjlin/liblinear/\" target=\"_blank\">liblinear</a>&nbsp;style sparse input format - It is chosen so that the same input file can be used across&nbsp;other popular tools such as <a href=\"https://github.com/tqchen/xgboost\" target=\"_blank\">XGBoost</a>, <a href=\"https://github.com/JohnLangford/vowpal_wabbit/wiki\" target=\"_blank\">VW</a>&nbsp;(with slight modification),&nbsp;<a href=\"https://github.com/srendle/libfm\" target=\"_blank\">libFM</a>, <a href=\"http://svmlight.joachims.org/\" target=\"_blank\">SVMLight</a>, etc.</p>\n<p>Code and examples are&nbsp;available at&nbsp;<a href=\"https://github.com/jeongyoonlee/Kaggler\" target=\"_blank\">https://github.com/jeongyoonlee/Kaggler</a>, and package documentation is available at&nbsp;<a href=\"http://pythonhosted.org//Kaggler/\" target=\"_blank\">http://pythonhosted.org//Kaggler/</a>.</p>\n<p>I plan to update it as I participate more competitions and learn more - supporting the CSV input format and adding&nbsp;<a href=\"https://github.com/comadan/FM_FTRL\" target=\"_blank\">FM-FTRL by Daniel Yoo</a>&nbsp;will be my next update.</p>\n<p>Hope you guys find this useful, and see you at other competitions! :)</p>",
  "messages": [
    {
      "id": 64009,
      "postDate": "2015-02-11T09:17:14.550Z",
      "content": "<p>Hi all,</p>\n<p>It was&nbsp;another great competition with tons of learning - special thanks to tinrtgu and fellow Kagglers who shared their insights, and big congratulations to the winners!</p>\n<p>Here I'd like to share what I've put together for online learning as a Python package - named <a href=\"https://github.com/jeongyoonlee/Kaggler\" target=\"_blank\">Kaggler</a>.</p>\n<p>You can install it with pip as follows:</p>\n<p><code>&nbsp; &nbsp; $ pip install -U Kaggler</code></p>\n<p>then, import algorithm classes as follows:</p>\n<p><code>&nbsp; &nbsp; from kaggler.online_model import SGD, FTRL, FM, NN, NN_H2</code></p>\n<p>Currently it supports 4 online learning algorithms - SGD, FTRL, FM (original version, not 3 idiot's yet), NN (1 or 2 ReLU hidden layers).</p>\n<p>It uses the <a href=\"http://www.csie.ntu.edu.tw/~cjlin/liblinear/\" target=\"_blank\">liblinear</a>&nbsp;style sparse input format - It is chosen so that the same input file can be used across&nbsp;other popular tools such as <a href=\"https://github.com/tqchen/xgboost\" target=\"_blank\">XGBoost</a>, <a href=\"https://github.com/JohnLangford/vowpal_wabbit/wiki\" target=\"_blank\">VW</a>&nbsp;(with slight modification),&nbsp;<a href=\"https://github.com/srendle/libfm\" target=\"_blank\">libFM</a>, <a href=\"http://svmlight.joachims.org/\" target=\"_blank\">SVMLight</a>, etc.</p>\n<p>Code and examples are&nbsp;available at&nbsp;<a href=\"https://github.com/jeongyoonlee/Kaggler\" target=\"_blank\">https://github.com/jeongyoonlee/Kaggler</a>, and package documentation is available at&nbsp;<a href=\"http://pythonhosted.org//Kaggler/\" target=\"_blank\">http://pythonhosted.org//Kaggler/</a>.</p>\n<p>I plan to update it as I participate more competitions and learn more - supporting the CSV input format and adding&nbsp;<a href=\"https://github.com/comadan/FM_FTRL\" target=\"_blank\">FM-FTRL by Daniel Yoo</a>&nbsp;will be my next update.</p>\n<p>Hope you guys find this useful, and see you at other competitions! :)</p>",
      "votes": 51
    },
    {
      "id": 365296,
      "postDate": "2018-08-02T09:35:14.450Z",
      "content": "<p>Thanks for sharing.\nwhen i use clf.fit(x_train,y_train)\ni get a problem:ValueError: Buffer dtype mismatch, expected 'int' but got 'long'\nis this can only run on 32bit mechine?</p>",
      "rawMarkdown": "Thanks for sharing.\nwhen i use clf.fit(x_train,y_train)\ni get a problem:ValueError: Buffer dtype mismatch, expected 'int' but got 'long'\nis this can only run on 32bit mechine?",
      "votes": 1
    },
    {
      "id": 64090,
      "postDate": "2015-02-12T03:59:50.233Z",
      "content": "<p>Thanks&nbsp;Jeong-Yoon Lee for sharing your code.</p>\n<p>I tried using &quot;pip install Kaggler&quot; and got the following error:</p>\n<p>IOError: [Errno 2] No such file or directory: 'README.md'</p>\n<p>It seems like you forgot to include this file onto the PyPI repository.</p>\n\n\n<p>EDIT: Oops! Someone just beat me to raising the question. I did not notice&nbsp;that when posting...</p>",
      "votes": 1
    },
    {
      "id": 64086,
      "postDate": "2015-02-12T03:26:32.707Z",
      "content": "<p>Thanks for sharing!</p>\n<p>I encounter the installation error when I try &quot;pip install Kaggler&quot;</p>\n<p>IOError: [Errno 2] No such file or directory: 'README.md'</p>\n<p>Any hint to resolve it?</p>",
      "votes": 1
    },
    {
      "id": 64043,
      "postDate": "2015-02-11T15:45:55.973Z",
      "content": "<p>do you have the dev version of&nbsp;libgfortran3?</p>",
      "votes": 1
    },
    {
      "id": 64315,
      "postDate": "2015-02-16T05:26:49.273Z",
      "content": "<p>[quote=CodingNeo;64304]</p>\n<p>@Jeong-Yoon Lee, I fixed the issue which is caused by the wrong value of input parameters. I am trying the factorization machine in this package using the train data of this competition. I did the one hot encoding by hash trick as the input data. The factorization machine give me very bad result. I wonder something I did wrong. So consult you with two following question:</p>\n<ol>\n<li>I simply convert the data by one-hot encoding before sending to FM. Is it correct?</li>\n<li>Can you share the parameter values you used for FM for this problem?</li>\n</ol>\n<p>[/quote]</p>\n<p>I did as follows:</p>\n<p>1. Extracting the weekday and hour-of-day variables from the hour column</p>\n<p>2. One-hot-encoding all columns with the cut-off of 100 (unique values of which&nbsp;frequency are less than 100 are&nbsp;combined into one category)</p>\n<p>3. Random shuffling input stream with the shuffling window of 1,000,000 - which is not part of the FM class yet, but there is a function, shuf_file() in kaggler.io you can take a look.</p>\n<p>4. Parameters used are: FM(n=60000, dim=16, a=0.02) - n was small because after one-hot-encoding the number of features was&nbsp;less than 60K.</p>\n<p>5. Then iterate with training data 10 times.</p>\n<p>This scored 0.3978 and 0.3959 on the public and private leaderboards respectively. &nbsp;It was my only submission using kaggler.online_model.FM.</p>",
      "votes": 2
    },
    {
      "id": 64451,
      "postDate": "2015-02-18T01:23:49.397Z",
      "content": "<p>[quote=Jeong-Yoon Lee;64347]</p>\n<p>[quote=CodingNeo;64343]</p>\n<p>[quote=Jeong-Yoon Lee;64341]</p>\n<p>[quote=CodingNeo;64319]</p>\n<p>Thanks Jeong-Yoon Lee. You share with me a lot of information. One more question to ask you for help. How can I get the probability of the prediction instead of 0/1 prediction? I need the probability to compute the log loss.</p>\n<p>[/quote]</p>\n<p>It always outputs the probability.</p>\n<p>[/quote]</p>\n<p>I got all prediction with the values of 1.00000/0.00000</p>\n<p>[/quote]</p>\n<p>It seems that the learning rate is too high and makes the output of the sigmoid function (1/(1 + exp(-x))) saturated</p>\n<p>[/quote]</p>\n\n<p>Thank you very much! Reducing the learning rate resolves the issue.</p>"
    },
    {
      "id": 64347,
      "postDate": "2015-02-16T15:59:15.597Z",
      "content": "<p>[quote=CodingNeo;64343]</p>\n<p>[quote=Jeong-Yoon Lee;64341]</p>\n<p>[quote=CodingNeo;64319]</p>\n<p>Thanks Jeong-Yoon Lee. You share with me a lot of information. One more question to ask you for help. How can I get the probability of the prediction instead of 0/1 prediction? I need the probability to compute the log loss.</p>\n<p>[/quote]</p>\n<p>It always outputs the probability.</p>\n<p>[/quote]</p>\n<p>I got all prediction with the values of 1.00000/0.00000</p>\n<p>[/quote]</p>\n<p>It seems that the learning rate is too high and makes the output of the sigmoid function (1/(1 + exp(-x))) saturated</p>"
    },
    {
      "id": 64343,
      "postDate": "2015-02-16T15:05:22.110Z",
      "content": "<p>[quote=Jeong-Yoon Lee;64341]</p>\n<p>[quote=CodingNeo;64319]</p>\n<p>Thanks Jeong-Yoon Lee. You share with me a lot of information. One more question to ask you for help. How can I get the probability of the prediction instead of 0/1 prediction? I need the probability to compute the log loss.</p>\n<p>[/quote]</p>\n<p>It always outputs the probability.</p>\n<p>[/quote]</p>\n<p>I got all prediction with the values of 1.00000/0.00000</p>"
    },
    {
      "id": 64342,
      "postDate": "2015-02-16T15:04:43.153Z",
      "content": "<p>I got all 1.00000/0.00000 in prediction with the parameters (100000, 4, 1.0). Why?</p>"
    },
    {
      "id": 64341,
      "postDate": "2015-02-16T14:57:44.287Z",
      "content": "<p>[quote=CodingNeo;64319]</p>\n<p>Thanks Jeong-Yoon Lee. You share with me a lot of information. One more question to ask you for help. How can I get the probability of the prediction instead of 0/1 prediction? I need the probability to compute the log loss.</p>\n<p>[/quote]</p>\n<p>It always outputs the probability.</p>"
    },
    {
      "id": 64332,
      "postDate": "2015-02-16T10:17:37.923Z",
      "content": "<p>[quote=Jeong-Yoon Lee;64270]</p>\n<p>[quote=Jiming Ye;64266]</p>\n<p>&nbsp;I tried to learn how to implement those online algorithm from your code, and I have a question.</p>\n<p>In your FM model and NN, you have put counters in. And you use them&nbsp;like:</p>\n<p>w1[h] -= dl_dy / (sqrt(c) + 1) + l2 * w1[h]</p>\n<p>I haven't seen those things before. Actually when I implemented FM and NN, I didn't use them(Maybe that's the reason my FM model performs badly)</p>\n<p>Can you explain a little bit about these counters? I know this question might be somewhat dumb, but I just cannot figure it out by myself :(</p>\n<p>Thanks!</p>\n<p>[/quote]</p>\n<p>It's again from <a href=\"https://www.kaggle.com/c/criteo-display-ad-challenge/forums/t/10322/beat-the-benchmark-with-less-then-200mb-of-memory\" target=\"_blank\">tinrtgu's code</a>&nbsp;based on Google's FTRL paper at the Criteo competition. &nbsp;Actually 1 / (sqrt(c) + 1) is not what was used in the paper, but - I guess - his approximation of 1 / (sqrt(sum(g * g)) + 1).</p>\n<p>In later updates, I will try 1/(sqrt(sum(g*g)) + 1).</p>\n<p>EDIT:</p>\n<p>1 / sqrt(n) is common in stochastic gradient learning, and it is called per-coordinate learning rate if&nbsp;the i-th weight, w[i]&nbsp;is updated using c[i]&nbsp;only if it's associated with non-zero input x[i].</p>\n<p>To do so, 1 / (sqrt(c[i]) + 1) is straightforward extension of 1 / sqrt(n). &nbsp;However, as in the paper, 1 / (sqrt(sum(g[i] * g[i])) + 1) is a better choice, where g[i] is per-coordinate gradient for the i-th weight.</p>\n<p>[/quote]</p>\n<p>Thank you so much!</p>\n<p>Now I understand :)</p>"
    },
    {
      "id": 64319,
      "postDate": "2015-02-16T06:33:08.107Z",
      "content": "<p>Thanks Jeong-Yoon Lee. You share with me a lot of information. One more question to ask you for help. How can I get the probability of the prediction instead of 0/1 prediction? I need the probability to compute the log loss.</p>"
    },
    {
      "id": 64304,
      "postDate": "2015-02-16T02:36:37.163Z",
      "content": "<p>@Jeong-Yoon Lee, I fixed the issue which is caused by the wrong value of input parameters. I am trying the factorization machine in this package using the train data of this competition. I did the one hot encoding by hash trick as the input data. The factorization machine give me very bad result. I wonder something I did wrong. So consult you with two following question:</p>\n<ol>\n<li>I simply convert the data by one-hot encoding before sending to FM. Is it correct?</li>\n<li>Can you share the parameter values you used for FM for this problem?</li>\n</ol>"
    },
    {
      "id": 64270,
      "postDate": "2015-02-15T14:35:45.517Z",
      "content": "<p>[quote=Jiming Ye;64266]</p>\n<p>&nbsp;I tried to learn how to implement those online algorithm from your code, and I have a question.</p>\n<p>In your FM model and NN, you have put counters in. And you use them&nbsp;like:</p>\n<p>w1[h] -= dl_dy / (sqrt(c) + 1) + l2 * w1[h]</p>\n<p>I haven't seen those things before. Actually when I implemented FM and NN, I didn't use them(Maybe that's the reason my FM model performs badly)</p>\n<p>Can you explain a little bit about these counters? I know this question might be somewhat dumb, but I just cannot figure it out by myself :(</p>\n<p>Thanks!</p>\n<p>[/quote]</p>\n<p>It's again from <a href=\"https://www.kaggle.com/c/criteo-display-ad-challenge/forums/t/10322/beat-the-benchmark-with-less-then-200mb-of-memory\" target=\"_blank\">tinrtgu's code</a>&nbsp;based on Google's FTRL paper at the Criteo competition. &nbsp;Actually 1 / (sqrt(c) + 1) is not what was used in the paper, but - I guess - his approximation of 1 / (sqrt(sum(g * g)) + 1).</p>\n<p>In later updates, I will try 1/(sqrt(sum(g*g)) + 1).</p>\n<p>EDIT:</p>\n<p>1 / sqrt(n) is common in stochastic gradient learning, and it is called per-coordinate learning rate if&nbsp;the i-th weight, w[i]&nbsp;is updated using c[i]&nbsp;only if it's associated with non-zero input x[i].</p>\n<p>To do so, 1 / (sqrt(c[i]) + 1) is straightforward extension of 1 / sqrt(n). &nbsp;However, as in the paper, 1 / (sqrt(sum(g[i] * g[i])) + 1) is a better choice, where g[i] is per-coordinate gradient for the i-th weight.</p>"
    },
    {
      "id": 64269,
      "postDate": "2015-02-15T14:05:55.100Z",
      "content": "<p>[quote=CodingNeo;64214]</p>\n<p>I try to convert the train/test data into sparse format for using this package. But I got an zero division error in fm.read_sparse function. Any hints to resolve this issue?</p>\n<p>[/quote]</p>\n<p>I just tested SGD, FM, FTRL, NN and all worked fine on my side. &nbsp;Can you provide with more details that I can reproduce the error?</p>\n<p>Also, since I've updated the package quite a bit, please try the latest version.</p>"
    },
    {
      "id": 64266,
      "postDate": "2015-02-15T12:37:21.313Z",
      "content": "<p>&nbsp;I tried to learn how to implement those online algorithm from your code, and I have a question.</p>\n<p>In your FM model and NN, you have put counters in. And you use them&nbsp;like:</p>\n<p>w1[h] -= dl_dy / (sqrt(c) + 1) + l2 * w1[h]</p>\n<p>I haven't seen those things before. Actually when I implemented FM and NN, I didn't use them(Maybe that's the reason my FM model performs badly)</p>\n<p>Can you explain a little bit about these counters? I know this question might be somewhat dumb, but I just cannot figure it out by myself :(</p>\n<p>Thanks!</p>"
    },
    {
      "id": 64214,
      "postDate": "2015-02-14T04:25:53.340Z",
      "content": "<p>I try to convert the train/test data into sparse format for using this package. But I got an zero division error in fm.read_sparse function. Any hints to resolve this issue?</p>"
    },
    {
      "id": 64131,
      "postDate": "2015-02-12T17:57:20.103Z",
      "content": "<p>[quote=binga;64099]</p>\n<p>[quote=Charles;64090]</p>\n<p>Thanks&nbsp;Jeong-Yoon Lee for sharing your code.</p>\n<p>I tried using &quot;pip install Kaggler&quot; and got the following error:</p>\n<p>IOError: [Errno 2] No such file or directory: 'README.md'</p>\n<p>It seems like you forgot to include this file onto the PyPI repository.</p>\n<p>EDIT: Oops! Someone just beat me to raising the question. I did not notice&nbsp;that when posting...</p>\n<p>[/quote]</p>\n<p>I got the same error by installing through pip. However, by downloading the source and running</p>\n<p><code>python setup.py install</code></p>\n<p>everything went smooth.</p>\n<p>[/quote]</p>\n<p>Hi @binga. &nbsp;Sorry for the error.</p>\n<p>I noticed that &quot;pip install&quot; without &quot;-U&quot; will fail if there was a previous unsuccessful installation attempt. &nbsp;</p>\n<p>I tried &quot;pip install -U Kaggler&quot; on Mac and Ubuntu, and was able to install the package successfully.</p>\n<p>Can anyone else confirm either successful or unsuccessful installation by using pip?</p>\n<p>Thanks!</p>"
    },
    {
      "id": 64105,
      "postDate": "2015-02-12T10:16:29.433Z",
      "content": "<p>[quote=Charles;64104]</p>\n<p>python setup.py build_ext --inplace</p>\n<p>[/quote]</p>\n<p>Oh, yes. You're right! Same here.</p>"
    },
    {
      "id": 64104,
      "postDate": "2015-02-12T10:11:46.160Z",
      "content": "<p>[quote=binga;64099]</p>\n<p>[quote=Charles;64090]</p>\n<p>Thanks&nbsp;Jeong-Yoon Lee for sharing your code.</p>\n<p>I tried using &quot;pip install Kaggler&quot; and got the following error:</p>\n<p>IOError: [Errno 2] No such file or directory: 'README.md'</p>\n<p>It seems like you forgot to include this file onto the PyPI repository.</p>\n<p>EDIT: Oops! Someone just beat me to raising the question. I did not notice&nbsp;that when posting...</p>\n<p>[/quote]</p>\n<p>I got the same error by installing through pip. However, by downloading the source and running</p>\n<p><code>python setup.py install</code></p>\n<p>everything went smooth.</p>\n<p>[/quote]</p>\n<p>I ended up also downloading the source and building from source. But I think&nbsp;you'd need to first run (as documented on the README page)&nbsp;</p>\n<p><code>python setup.py build_ext --inplace</code></p>\n<p>before running</p>\n<p><code>python setup.py install</code></p>\n<p>for the underlying C code to compile correctly. At least for me, the installation&nbsp;would not work without running the first command...</p>"
    },
    {
      "id": 64099,
      "postDate": "2015-02-12T07:38:25.153Z",
      "content": "<p>[quote=Charles;64090]</p>\n<p>Thanks&nbsp;Jeong-Yoon Lee for sharing your code.</p>\n<p>I tried using &quot;pip install Kaggler&quot; and got the following error:</p>\n<p>IOError: [Errno 2] No such file or directory: 'README.md'</p>\n<p>It seems like you forgot to include this file onto the PyPI repository.</p>\n<p>EDIT: Oops! Someone just beat me to raising the question. I did not notice&nbsp;that when posting...</p>\n<p>[/quote]</p>\n<p>I got the same error by installing through pip. However, by downloading the source and running</p>\n<p><code>python setup.py install</code></p>\n<p>everything went smooth.</p>"
    },
    {
      "id": 64092,
      "postDate": "2015-02-12T05:24:15.263Z",
      "content": "<p>Thanks @CodingNeo and @Charles for the issue report, and sorry for the error.</p>\n<p>I fixed it and uploaded a new version - it must work now. &nbsp;Please try:</p>\n<p>$ pip install -U Kaggler</p>\n\n<p>I just learned a couple of things about Python packaging by sharing it with&nbsp;you guys:</p>\n<ul>\n<li><span style=\"line-height: 1.4\">By default, PyPi doesn't support Markdown README (README.md).</span></li>\n<li><span style=\"line-height: 1.4\">When Cython is used, both pyx and pxd files need to be added to setup.py. &nbsp;</span></li>\n</ul>\n<p>Sharing is learning. So awesome! :D</p>"
    },
    {
      "id": 64085,
      "postDate": "2015-02-12T03:13:54.520Z",
      "content": "<p>[quote=Jiming Ye;64081]</p>\n<p>Thanks for sharing!</p>\n<p>I didn't see any L1 or L2 term in the FM model. I don't know whether this is how original FM works</p>\n<p>[/quote]</p>\n<p>Hi Jiming, Yes, in <a href=\"http://www.inf.uni-konstanz.de/~rendle/pdf/Rendle2010FM.pdf\" target=\"_blank\">the original FM paper by Steffen</a>, there was neither L1 nor L2 term. &nbsp;However since it's trivial, I'll consider adding them to the model soon. :)</p>"
    },
    {
      "id": 64081,
      "postDate": "2015-02-12T01:31:20.580Z",
      "content": "<p>Thanks for sharing!</p>\n<p>I didn't see any L1 or L2 term in the FM model. I don't know whether this is how original FM works</p>"
    },
    {
      "id": 64063,
      "postDate": "2015-02-11T20:07:35.093Z",
      "content": "<p>Thank you for sharing this!!</p>\n<p>It is a great addition to everybody's toolbox.</p>"
    },
    {
      "id": 64046,
      "postDate": "2015-02-11T17:24:05.687Z",
      "content": "<p>[quote=rcarson;64041]</p>\n<p>Thank you for sharing. I tried to build from source code, however I got this error:</p>\n<p>error: Setup script exited with error: library dfftpack has Fortran sources but no Fortran compiler found</p>\n<p>I use ubuntu 14.04 and libgfortran3 is installed. What else Fortran compiler do I need ? thank you.</p>\n<p>[/quote]</p>\n<p>Seems like it's one of SciPy dependencies. &nbsp;Can you build it again after installing SciPy's dependencies?</p>\n<p><code>$&nbsp;sudo apt-get install python-pip python-dev build-essential&nbsp;libatlas-base-dev gfortran</code></p>\n<p>Installing only gfortran might be sufficient.</p>\n<p>Please let me know if you find other dependency issues.</p>"
    },
    {
      "id": 64045,
      "postDate": "2015-02-11T17:13:13.860Z",
      "content": "<p>[quote=Mikhail Trofimov;64020]</p>\n<p>Great!</p>\n<p>@Jeong-Yoon Lee, did you use this code in this contest?&nbsp;</p>\n<p>[/quote]</p>\n<p>Yes. With one-hot-encoding (cutoff at 100) on original + weekday + hour features, FTRL, FM, NN scored around&nbsp;0.395 on public leaderboard.</p>\n<p>Our team's final&nbsp;submission was FTRL + FM + NN + 3 idiots' FM + VW, and it scored 0.390 and 0.388 on the public and private leaderboard respectively.</p>"
    },
    {
      "id": 64041,
      "postDate": "2015-02-11T15:43:05.837Z",
      "content": "<p>Thank you for sharing. I tried to build from source code, however I got this error:</p>\n<p>error: Setup script exited with error: library dfftpack has Fortran sources but no Fortran compiler found</p>\n<p>I use ubuntu 14.04 and libgfortran3 is installed. What else Fortran compiler do I need ? thank you.</p>"
    },
    {
      "id": 64040,
      "postDate": "2015-02-11T15:37:06.080Z",
      "content": "<p>Thanks! for sharing.</p>"
    },
    {
      "id": 64020,
      "postDate": "2015-02-11T12:39:54.497Z",
      "content": "<p>Great!</p>\n<p>@Jeong-Yoon Lee, did you use this code in this contest?&nbsp;</p>"
    },
    {
      "id": 64018,
      "postDate": "2015-02-11T11:32:47.177Z",
      "content": "<p>Thanks for sharing.</p>"
    },
    {
      "id": 3187425,
      "postDate": "2025-04-26T02:23:54.297Z",
      "content": "<p>Thanks a lot, for your sharing!</p>",
      "rawMarkdown": "Thanks a lot, for your sharing!",
      "votes": 2
    },
    {
      "id": 2659723,
      "postDate": "2024-02-20T05:24:44.820Z",
      "content": "<p>Thanks for sharing.</p>",
      "rawMarkdown": "Thanks for sharing."
    },
    {
      "id": 2049811,
      "postDate": "2022-11-30T11:01:19.610Z",
      "content": "<p>Thanks for sharing.</p>",
      "rawMarkdown": "Thanks for sharing."
    },
    {
      "id": 3224128,
      "postDate": "2025-06-14T12:50:43.103Z",
      "rawMarkdown": "",
      "votes": 4,
      "isDeleted": true
    }
  ],
  "comments": [
    {
      "id": 365296,
      "author_name": "qwerty",
      "author_url": "",
      "post_date": "2018-08-02T09:35:14.450000",
      "content": "<p>Thanks for sharing.\nwhen i use clf.fit(x_train,y_train)\ni get a problem:ValueError: Buffer dtype mismatch, expected 'int' but got 'long'\nis this can only run on 32bit mechine?</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 64090,
      "author_name": "Charles",
      "author_url": "",
      "post_date": "2015-02-12T03:59:50.233000",
      "content": "<p>Thanks&nbsp;Jeong-Yoon Lee for sharing your code.</p>\n<p>I tried using &quot;pip install Kaggler&quot; and got the following error:</p>\n<p>IOError: [Errno 2] No such file or directory: 'README.md'</p>\n<p>It seems like you forgot to include this file onto the PyPI repository.</p>\n\n\n<p>EDIT: Oops! Someone just beat me to raising the question. I did not notice&nbsp;that when posting...</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 64086,
      "author_name": "CodingNeo",
      "author_url": "",
      "post_date": "2015-02-12T03:26:32.707000",
      "content": "<p>Thanks for sharing!</p>\n<p>I encounter the installation error when I try &quot;pip install Kaggler&quot;</p>\n<p>IOError: [Errno 2] No such file or directory: 'README.md'</p>\n<p>Any hint to resolve it?</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 64043,
      "author_name": "Abhishek Thakur",
      "author_url": "",
      "post_date": "2015-02-11T15:45:55.973000",
      "content": "<p>do you have the dev version of&nbsp;libgfortran3?</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 64315,
      "author_name": "jeong",
      "author_url": "",
      "post_date": "2015-02-16T05:26:49.273000",
      "content": "<p>[quote=CodingNeo;64304]</p>\n<p>@Jeong-Yoon Lee, I fixed the issue which is caused by the wrong value of input parameters. I am trying the factorization machine in this package using the train data of this competition. I did the one hot encoding by hash trick as the input data. The factorization machine give me very bad result. I wonder something I did wrong. So consult you with two following question:</p>\n<ol>\n<li>I simply convert the data by one-hot encoding before sending to FM. Is it correct?</li>\n<li>Can you share the parameter values you used for FM for this problem?</li>\n</ol>\n<p>[/quote]</p>\n<p>I did as follows:</p>\n<p>1. Extracting the weekday and hour-of-day variables from the hour column</p>\n<p>2. One-hot-encoding all columns with the cut-off of 100 (unique values of which&nbsp;frequency are less than 100 are&nbsp;combined into one category)</p>\n<p>3. Random shuffling input stream with the shuffling window of 1,000,000 - which is not part of the FM class yet, but there is a function, shuf_file() in kaggler.io you can take a look.</p>\n<p>4. Parameters used are: FM(n=60000, dim=16, a=0.02) - n was small because after one-hot-encoding the number of features was&nbsp;less than 60K.</p>\n<p>5. Then iterate with training data 10 times.</p>\n<p>This scored 0.3978 and 0.3959 on the public and private leaderboards respectively. &nbsp;It was my only submission using kaggler.online_model.FM.</p>",
      "votes": 2,
      "replies": []
    },
    {
      "id": 64451,
      "author_name": "CodingNeo",
      "author_url": "",
      "post_date": "2015-02-18T01:23:49.397000",
      "content": "<p>[quote=Jeong-Yoon Lee;64347]</p>\n<p>[quote=CodingNeo;64343]</p>\n<p>[quote=Jeong-Yoon Lee;64341]</p>\n<p>[quote=CodingNeo;64319]</p>\n<p>Thanks Jeong-Yoon Lee. You share with me a lot of information. One more question to ask you for help. How can I get the probability of the prediction instead of 0/1 prediction? I need the probability to compute the log loss.</p>\n<p>[/quote]</p>\n<p>It always outputs the probability.</p>\n<p>[/quote]</p>\n<p>I got all prediction with the values of 1.00000/0.00000</p>\n<p>[/quote]</p>\n<p>It seems that the learning rate is too high and makes the output of the sigmoid function (1/(1 + exp(-x))) saturated</p>\n<p>[/quote]</p>\n\n<p>Thank you very much! Reducing the learning rate resolves the issue.</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 64347,
      "author_name": "jeong",
      "author_url": "",
      "post_date": "2015-02-16T15:59:15.597000",
      "content": "<p>[quote=CodingNeo;64343]</p>\n<p>[quote=Jeong-Yoon Lee;64341]</p>\n<p>[quote=CodingNeo;64319]</p>\n<p>Thanks Jeong-Yoon Lee. You share with me a lot of information. One more question to ask you for help. How can I get the probability of the prediction instead of 0/1 prediction? I need the probability to compute the log loss.</p>\n<p>[/quote]</p>\n<p>It always outputs the probability.</p>\n<p>[/quote]</p>\n<p>I got all prediction with the values of 1.00000/0.00000</p>\n<p>[/quote]</p>\n<p>It seems that the learning rate is too high and makes the output of the sigmoid function (1/(1 + exp(-x))) saturated</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 64343,
      "author_name": "CodingNeo",
      "author_url": "",
      "post_date": "2015-02-16T15:05:22.110000",
      "content": "<p>[quote=Jeong-Yoon Lee;64341]</p>\n<p>[quote=CodingNeo;64319]</p>\n<p>Thanks Jeong-Yoon Lee. You share with me a lot of information. One more question to ask you for help. How can I get the probability of the prediction instead of 0/1 prediction? I need the probability to compute the log loss.</p>\n<p>[/quote]</p>\n<p>It always outputs the probability.</p>\n<p>[/quote]</p>\n<p>I got all prediction with the values of 1.00000/0.00000</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 64342,
      "author_name": "CodingNeo",
      "author_url": "",
      "post_date": "2015-02-16T15:04:43.153000",
      "content": "<p>I got all 1.00000/0.00000 in prediction with the parameters (100000, 4, 1.0). Why?</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 64341,
      "author_name": "jeong",
      "author_url": "",
      "post_date": "2015-02-16T14:57:44.287000",
      "content": "<p>[quote=CodingNeo;64319]</p>\n<p>Thanks Jeong-Yoon Lee. You share with me a lot of information. One more question to ask you for help. How can I get the probability of the prediction instead of 0/1 prediction? I need the probability to compute the log loss.</p>\n<p>[/quote]</p>\n<p>It always outputs the probability.</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 64332,
      "author_name": "Jiming Ye",
      "author_url": "",
      "post_date": "2015-02-16T10:17:37.923000",
      "content": "<p>[quote=Jeong-Yoon Lee;64270]</p>\n<p>[quote=Jiming Ye;64266]</p>\n<p>&nbsp;I tried to learn how to implement those online algorithm from your code, and I have a question.</p>\n<p>In your FM model and NN, you have put counters in. And you use them&nbsp;like:</p>\n<p>w1[h] -= dl_dy / (sqrt(c) + 1) + l2 * w1[h]</p>\n<p>I haven't seen those things before. Actually when I implemented FM and NN, I didn't use them(Maybe that's the reason my FM model performs badly)</p>\n<p>Can you explain a little bit about these counters? I know this question might be somewhat dumb, but I just cannot figure it out by myself :(</p>\n<p>Thanks!</p>\n<p>[/quote]</p>\n<p>It's again from <a href=\"https://www.kaggle.com/c/criteo-display-ad-challenge/forums/t/10322/beat-the-benchmark-with-less-then-200mb-of-memory\" target=\"_blank\">tinrtgu's code</a>&nbsp;based on Google's FTRL paper at the Criteo competition. &nbsp;Actually 1 / (sqrt(c) + 1) is not what was used in the paper, but - I guess - his approximation of 1 / (sqrt(sum(g * g)) + 1).</p>\n<p>In later updates, I will try 1/(sqrt(sum(g*g)) + 1).</p>\n<p>EDIT:</p>\n<p>1 / sqrt(n) is common in stochastic gradient learning, and it is called per-coordinate learning rate if&nbsp;the i-th weight, w[i]&nbsp;is updated using c[i]&nbsp;only if it's associated with non-zero input x[i].</p>\n<p>To do so, 1 / (sqrt(c[i]) + 1) is straightforward extension of 1 / sqrt(n). &nbsp;However, as in the paper, 1 / (sqrt(sum(g[i] * g[i])) + 1) is a better choice, where g[i] is per-coordinate gradient for the i-th weight.</p>\n<p>[/quote]</p>\n<p>Thank you so much!</p>\n<p>Now I understand :)</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 64319,
      "author_name": "CodingNeo",
      "author_url": "",
      "post_date": "2015-02-16T06:33:08.107000",
      "content": "<p>Thanks Jeong-Yoon Lee. You share with me a lot of information. One more question to ask you for help. How can I get the probability of the prediction instead of 0/1 prediction? I need the probability to compute the log loss.</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 64304,
      "author_name": "CodingNeo",
      "author_url": "",
      "post_date": "2015-02-16T02:36:37.163000",
      "content": "<p>@Jeong-Yoon Lee, I fixed the issue which is caused by the wrong value of input parameters. I am trying the factorization machine in this package using the train data of this competition. I did the one hot encoding by hash trick as the input data. The factorization machine give me very bad result. I wonder something I did wrong. So consult you with two following question:</p>\n<ol>\n<li>I simply convert the data by one-hot encoding before sending to FM. Is it correct?</li>\n<li>Can you share the parameter values you used for FM for this problem?</li>\n</ol>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 64270,
      "author_name": "jeong",
      "author_url": "",
      "post_date": "2015-02-15T14:35:45.517000",
      "content": "<p>[quote=Jiming Ye;64266]</p>\n<p>&nbsp;I tried to learn how to implement those online algorithm from your code, and I have a question.</p>\n<p>In your FM model and NN, you have put counters in. And you use them&nbsp;like:</p>\n<p>w1[h] -= dl_dy / (sqrt(c) + 1) + l2 * w1[h]</p>\n<p>I haven't seen those things before. Actually when I implemented FM and NN, I didn't use them(Maybe that's the reason my FM model performs badly)</p>\n<p>Can you explain a little bit about these counters? I know this question might be somewhat dumb, but I just cannot figure it out by myself :(</p>\n<p>Thanks!</p>\n<p>[/quote]</p>\n<p>It's again from <a href=\"https://www.kaggle.com/c/criteo-display-ad-challenge/forums/t/10322/beat-the-benchmark-with-less-then-200mb-of-memory\" target=\"_blank\">tinrtgu's code</a>&nbsp;based on Google's FTRL paper at the Criteo competition. &nbsp;Actually 1 / (sqrt(c) + 1) is not what was used in the paper, but - I guess - his approximation of 1 / (sqrt(sum(g * g)) + 1).</p>\n<p>In later updates, I will try 1/(sqrt(sum(g*g)) + 1).</p>\n<p>EDIT:</p>\n<p>1 / sqrt(n) is common in stochastic gradient learning, and it is called per-coordinate learning rate if&nbsp;the i-th weight, w[i]&nbsp;is updated using c[i]&nbsp;only if it's associated with non-zero input x[i].</p>\n<p>To do so, 1 / (sqrt(c[i]) + 1) is straightforward extension of 1 / sqrt(n). &nbsp;However, as in the paper, 1 / (sqrt(sum(g[i] * g[i])) + 1) is a better choice, where g[i] is per-coordinate gradient for the i-th weight.</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 64269,
      "author_name": "jeong",
      "author_url": "",
      "post_date": "2015-02-15T14:05:55.100000",
      "content": "<p>[quote=CodingNeo;64214]</p>\n<p>I try to convert the train/test data into sparse format for using this package. But I got an zero division error in fm.read_sparse function. Any hints to resolve this issue?</p>\n<p>[/quote]</p>\n<p>I just tested SGD, FM, FTRL, NN and all worked fine on my side. &nbsp;Can you provide with more details that I can reproduce the error?</p>\n<p>Also, since I've updated the package quite a bit, please try the latest version.</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 64266,
      "author_name": "Jiming Ye",
      "author_url": "",
      "post_date": "2015-02-15T12:37:21.313000",
      "content": "<p>&nbsp;I tried to learn how to implement those online algorithm from your code, and I have a question.</p>\n<p>In your FM model and NN, you have put counters in. And you use them&nbsp;like:</p>\n<p>w1[h] -= dl_dy / (sqrt(c) + 1) + l2 * w1[h]</p>\n<p>I haven't seen those things before. Actually when I implemented FM and NN, I didn't use them(Maybe that's the reason my FM model performs badly)</p>\n<p>Can you explain a little bit about these counters? I know this question might be somewhat dumb, but I just cannot figure it out by myself :(</p>\n<p>Thanks!</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 64214,
      "author_name": "CodingNeo",
      "author_url": "",
      "post_date": "2015-02-14T04:25:53.340000",
      "content": "<p>I try to convert the train/test data into sparse format for using this package. But I got an zero division error in fm.read_sparse function. Any hints to resolve this issue?</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 64131,
      "author_name": "jeong",
      "author_url": "",
      "post_date": "2015-02-12T17:57:20.103000",
      "content": "<p>[quote=binga;64099]</p>\n<p>[quote=Charles;64090]</p>\n<p>Thanks&nbsp;Jeong-Yoon Lee for sharing your code.</p>\n<p>I tried using &quot;pip install Kaggler&quot; and got the following error:</p>\n<p>IOError: [Errno 2] No such file or directory: 'README.md'</p>\n<p>It seems like you forgot to include this file onto the PyPI repository.</p>\n<p>EDIT: Oops! Someone just beat me to raising the question. I did not notice&nbsp;that when posting...</p>\n<p>[/quote]</p>\n<p>I got the same error by installing through pip. However, by downloading the source and running</p>\n<p><code>python setup.py install</code></p>\n<p>everything went smooth.</p>\n<p>[/quote]</p>\n<p>Hi @binga. &nbsp;Sorry for the error.</p>\n<p>I noticed that &quot;pip install&quot; without &quot;-U&quot; will fail if there was a previous unsuccessful installation attempt. &nbsp;</p>\n<p>I tried &quot;pip install -U Kaggler&quot; on Mac and Ubuntu, and was able to install the package successfully.</p>\n<p>Can anyone else confirm either successful or unsuccessful installation by using pip?</p>\n<p>Thanks!</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 64105,
      "author_name": "binga",
      "author_url": "",
      "post_date": "2015-02-12T10:16:29.433000",
      "content": "<p>[quote=Charles;64104]</p>\n<p>python setup.py build_ext --inplace</p>\n<p>[/quote]</p>\n<p>Oh, yes. You're right! Same here.</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 64104,
      "author_name": "Charles",
      "author_url": "",
      "post_date": "2015-02-12T10:11:46.160000",
      "content": "<p>[quote=binga;64099]</p>\n<p>[quote=Charles;64090]</p>\n<p>Thanks&nbsp;Jeong-Yoon Lee for sharing your code.</p>\n<p>I tried using &quot;pip install Kaggler&quot; and got the following error:</p>\n<p>IOError: [Errno 2] No such file or directory: 'README.md'</p>\n<p>It seems like you forgot to include this file onto the PyPI repository.</p>\n<p>EDIT: Oops! Someone just beat me to raising the question. I did not notice&nbsp;that when posting...</p>\n<p>[/quote]</p>\n<p>I got the same error by installing through pip. However, by downloading the source and running</p>\n<p><code>python setup.py install</code></p>\n<p>everything went smooth.</p>\n<p>[/quote]</p>\n<p>I ended up also downloading the source and building from source. But I think&nbsp;you'd need to first run (as documented on the README page)&nbsp;</p>\n<p><code>python setup.py build_ext --inplace</code></p>\n<p>before running</p>\n<p><code>python setup.py install</code></p>\n<p>for the underlying C code to compile correctly. At least for me, the installation&nbsp;would not work without running the first command...</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 64099,
      "author_name": "binga",
      "author_url": "",
      "post_date": "2015-02-12T07:38:25.153000",
      "content": "<p>[quote=Charles;64090]</p>\n<p>Thanks&nbsp;Jeong-Yoon Lee for sharing your code.</p>\n<p>I tried using &quot;pip install Kaggler&quot; and got the following error:</p>\n<p>IOError: [Errno 2] No such file or directory: 'README.md'</p>\n<p>It seems like you forgot to include this file onto the PyPI repository.</p>\n<p>EDIT: Oops! Someone just beat me to raising the question. I did not notice&nbsp;that when posting...</p>\n<p>[/quote]</p>\n<p>I got the same error by installing through pip. However, by downloading the source and running</p>\n<p><code>python setup.py install</code></p>\n<p>everything went smooth.</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 64092,
      "author_name": "jeong",
      "author_url": "",
      "post_date": "2015-02-12T05:24:15.263000",
      "content": "<p>Thanks @CodingNeo and @Charles for the issue report, and sorry for the error.</p>\n<p>I fixed it and uploaded a new version - it must work now. &nbsp;Please try:</p>\n<p>$ pip install -U Kaggler</p>\n\n<p>I just learned a couple of things about Python packaging by sharing it with&nbsp;you guys:</p>\n<ul>\n<li><span style=\"line-height: 1.4\">By default, PyPi doesn't support Markdown README (README.md).</span></li>\n<li><span style=\"line-height: 1.4\">When Cython is used, both pyx and pxd files need to be added to setup.py. &nbsp;</span></li>\n</ul>\n<p>Sharing is learning. So awesome! :D</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 64085,
      "author_name": "jeong",
      "author_url": "",
      "post_date": "2015-02-12T03:13:54.520000",
      "content": "<p>[quote=Jiming Ye;64081]</p>\n<p>Thanks for sharing!</p>\n<p>I didn't see any L1 or L2 term in the FM model. I don't know whether this is how original FM works</p>\n<p>[/quote]</p>\n<p>Hi Jiming, Yes, in <a href=\"http://www.inf.uni-konstanz.de/~rendle/pdf/Rendle2010FM.pdf\" target=\"_blank\">the original FM paper by Steffen</a>, there was neither L1 nor L2 term. &nbsp;However since it's trivial, I'll consider adding them to the model soon. :)</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 64081,
      "author_name": "Jiming Ye",
      "author_url": "",
      "post_date": "2015-02-12T01:31:20.580000",
      "content": "<p>Thanks for sharing!</p>\n<p>I didn't see any L1 or L2 term in the FM model. I don't know whether this is how original FM works</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 64063,
      "author_name": "TanoPereira",
      "author_url": "",
      "post_date": "2015-02-11T20:07:35.093000",
      "content": "<p>Thank you for sharing this!!</p>\n<p>It is a great addition to everybody's toolbox.</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 64046,
      "author_name": "jeong",
      "author_url": "",
      "post_date": "2015-02-11T17:24:05.687000",
      "content": "<p>[quote=rcarson;64041]</p>\n<p>Thank you for sharing. I tried to build from source code, however I got this error:</p>\n<p>error: Setup script exited with error: library dfftpack has Fortran sources but no Fortran compiler found</p>\n<p>I use ubuntu 14.04 and libgfortran3 is installed. What else Fortran compiler do I need ? thank you.</p>\n<p>[/quote]</p>\n<p>Seems like it's one of SciPy dependencies. &nbsp;Can you build it again after installing SciPy's dependencies?</p>\n<p><code>$&nbsp;sudo apt-get install python-pip python-dev build-essential&nbsp;libatlas-base-dev gfortran</code></p>\n<p>Installing only gfortran might be sufficient.</p>\n<p>Please let me know if you find other dependency issues.</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 64045,
      "author_name": "jeong",
      "author_url": "",
      "post_date": "2015-02-11T17:13:13.860000",
      "content": "<p>[quote=Mikhail Trofimov;64020]</p>\n<p>Great!</p>\n<p>@Jeong-Yoon Lee, did you use this code in this contest?&nbsp;</p>\n<p>[/quote]</p>\n<p>Yes. With one-hot-encoding (cutoff at 100) on original + weekday + hour features, FTRL, FM, NN scored around&nbsp;0.395 on public leaderboard.</p>\n<p>Our team's final&nbsp;submission was FTRL + FM + NN + 3 idiots' FM + VW, and it scored 0.390 and 0.388 on the public and private leaderboard respectively.</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 64041,
      "author_name": "Jiwei Liu",
      "author_url": "",
      "post_date": "2015-02-11T15:43:05.837000",
      "content": "<p>Thank you for sharing. I tried to build from source code, however I got this error:</p>\n<p>error: Setup script exited with error: library dfftpack has Fortran sources but no Fortran compiler found</p>\n<p>I use ubuntu 14.04 and libgfortran3 is installed. What else Fortran compiler do I need ? thank you.</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 64040,
      "author_name": "cup3",
      "author_url": "",
      "post_date": "2015-02-11T15:37:06.080000",
      "content": "<p>Thanks! for sharing.</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 64020,
      "author_name": "",
      "author_url": "",
      "post_date": "2015-02-11T12:39:54.497000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 64018,
      "author_name": "",
      "author_url": "",
      "post_date": "2015-02-11T11:32:47.177000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 3187425,
      "author_name": "",
      "author_url": "",
      "post_date": "2025-04-26T02:23:54.297000",
      "content": "",
      "votes": 2,
      "replies": []
    },
    {
      "id": 2659723,
      "author_name": "",
      "author_url": "",
      "post_date": "2024-02-20T05:24:44.820000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 2049811,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-11-30T11:01:19.610000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 3224128,
      "author_name": "",
      "author_url": "",
      "post_date": "2025-06-14T12:50:43.103000",
      "content": "",
      "votes": 4,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "64009": "",
    "365296": "Thanks for sharing.\nwhen i use clf.fit(x_train,y_train)\ni get a problem:ValueError: Buffer dtype mismatch, expected 'int' but got 'long'\nis this can only run on 32bit mechine?",
    "64090": "",
    "64086": "",
    "64043": "",
    "64315": "",
    "64451": "",
    "64347": "",
    "64343": "",
    "64342": "",
    "64341": "",
    "64332": "",
    "64319": "",
    "64304": "",
    "64270": "",
    "64269": "",
    "64266": "",
    "64214": "",
    "64131": "",
    "64105": "",
    "64104": "",
    "64099": "",
    "64092": "",
    "64085": "",
    "64081": "",
    "64063": "",
    "64046": "",
    "64045": "",
    "64041": "",
    "64040": "",
    "64020": "",
    "64018": "",
    "3187425": "Thanks a lot, for your sharing!",
    "2659723": "Thanks for sharing.",
    "2049811": "Thanks for sharing.",
    "3224128": ""
  }
}