{
  "id": 540845,
  "title": "CV and leaderboard thread",
  "url": "/competitions/jane-street-real-time-market-data-forecasting/discussion/540845",
  "author_name": "Ravi Ramakrishnan",
  "post_date": "2024-10-16T09:22:41.270000",
  "votes": 27,
  "comment_count": 35,
  "views": 0,
  "content": "<p>Hello fellow participants,</p>\n<p>Please find this thread for CV and leaderboard relations for starter models. I shall commence with my models insofar from the below public work-</p>\n<ol>\n<li><a href=\"https://www.kaggle.com/code/ravi20076/janestreet2024-baseline-submission-v1\" target=\"_blank\">https://www.kaggle.com/code/ravi20076/janestreet2024-baseline-submission-v1</a></li>\n<li><a href=\"https://www.kaggle.com/datasets/ravi20076/janestreetpublicv1\" target=\"_blank\">https://www.kaggle.com/datasets/ravi20076/janestreetpublicv1</a></li>\n<li><a href=\"https://www.kaggle.com/code/ravi20076/janestreet2024-baseline-train-v1\" target=\"_blank\">https://www.kaggle.com/code/ravi20076/janestreet2024-baseline-train-v1</a> </li>\n</ol>\n<p>All of these are single LGBM models with simple train-test split CV scheme</p>\n<table>\n<thead>\n<tr>\n<th>Version</th>\n<th>Date</th>\n<th>CV score</th>\n<th>LB score</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>LGBMV1_1</td>\n<td>15Oct2024</td>\n<td>0.007555</td>\n<td>0.0043</td>\n</tr>\n<tr>\n<td>LGBMV1_2</td>\n<td>15Oct2024</td>\n<td>0.007569</td>\n<td>0.0044</td>\n</tr>\n<tr>\n<td>LGBMV1_4</td>\n<td>15Oct2024</td>\n<td>0.007882</td>\n<td>0.0043</td>\n</tr>\n<tr>\n<td>LGBMV1_5</td>\n<td>15Oct2024</td>\n<td>0.007667</td>\n<td>0.0041</td>\n</tr>\n<tr>\n<td>CBV1_2</td>\n<td>16Oct2024</td>\n<td>0.007734</td>\n<td>0.0039</td>\n</tr>\n</tbody>\n</table>\n<p><br>Thoughts? Comments?</p>",
  "messages": [
    {
      "id": 3019116,
      "postDate": "2024-10-16T09:22:41.270Z",
      "content": "<p>Hello fellow participants,</p>\n<p>Please find this thread for CV and leaderboard relations for starter models. I shall commence with my models insofar from the below public work-</p>\n<ol>\n<li><a href=\"https://www.kaggle.com/code/ravi20076/janestreet2024-baseline-submission-v1\" target=\"_blank\">https://www.kaggle.com/code/ravi20076/janestreet2024-baseline-submission-v1</a></li>\n<li><a href=\"https://www.kaggle.com/datasets/ravi20076/janestreetpublicv1\" target=\"_blank\">https://www.kaggle.com/datasets/ravi20076/janestreetpublicv1</a></li>\n<li><a href=\"https://www.kaggle.com/code/ravi20076/janestreet2024-baseline-train-v1\" target=\"_blank\">https://www.kaggle.com/code/ravi20076/janestreet2024-baseline-train-v1</a> </li>\n</ol>\n<p>All of these are single LGBM models with simple train-test split CV scheme</p>\n<table>\n<thead>\n<tr>\n<th>Version</th>\n<th>Date</th>\n<th>CV score</th>\n<th>LB score</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>LGBMV1_1</td>\n<td>15Oct2024</td>\n<td>0.007555</td>\n<td>0.0043</td>\n</tr>\n<tr>\n<td>LGBMV1_2</td>\n<td>15Oct2024</td>\n<td>0.007569</td>\n<td>0.0044</td>\n</tr>\n<tr>\n<td>LGBMV1_4</td>\n<td>15Oct2024</td>\n<td>0.007882</td>\n<td>0.0043</td>\n</tr>\n<tr>\n<td>LGBMV1_5</td>\n<td>15Oct2024</td>\n<td>0.007667</td>\n<td>0.0041</td>\n</tr>\n<tr>\n<td>CBV1_2</td>\n<td>16Oct2024</td>\n<td>0.007734</td>\n<td>0.0039</td>\n</tr>\n</tbody>\n</table>\n<p><br>Thoughts? Comments?</p>",
      "rawMarkdown": "Hello fellow participants,\n\nPlease find this thread for CV and leaderboard relations for starter models. I shall commence with my models insofar from the below public work-\n1. https://www.kaggle.com/code/ravi20076/janestreet2024-baseline-submission-v1\n2. https://www.kaggle.com/datasets/ravi20076/janestreetpublicv1\n3. https://www.kaggle.com/code/ravi20076/janestreet2024-baseline-train-v1 \n\nAll of these are single LGBM models with simple train-test split CV scheme\n\n|Version     |Date          |CV score | LB score|\n| --- | --- | -------------- | ---------------|\n|LGBMV1_1 |15Oct2024|0.007555|  0.0043   |\n|LGBMV1_2|15Oct2024|0.007569|  0.0044  |\n|LGBMV1_4|15Oct2024|0.007882|   0.0043  |\n|LGBMV1_5|15Oct2024|0.007667|   0.0041   |\n|CBV1_2|16Oct2024|0.007734| 0.0039 |\n\n<br>Thoughts? Comments?\n",
      "votes": 28
    },
    {
      "id": 3028716,
      "postDate": "2024-10-26T13:01:21.280Z",
      "content": "<p>A couple of stupidly simple baseline CVs (based on the last 100 days in the training data):</p>\n<ol>\n<li>guess 0 for everything, R^2 = 0</li>\n<li>use the previous day's responder_6 mean, R^2 = -0.02</li>\n<li>use the previous day's responder_6 observation (at each time_id). R^2 = -0.99</li>\n</ol>\n<p>This last one surprised me enough to plot out the metric at different bucket sizes <em>(time_id has factors [1, 2, 4, 8, 11, 22, 44, 88, 121, 242, 484, 968])</em></p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F175917%2Fc87d62311c86e6746c1004f85282e4fe%2Fdownload%20(4).png?generation=1729947254771306&amp;alt=media\" alt=\"\"></p>\n<ul>\n<li>Previous values are anti-predictive. </li>\n<li>Simple lag-based features based on the target will probably not be useful</li>\n<li>if in doubt, guess 0 🤣</li>\n</ul>\n<p>An untuned catboost, has a CV of ~0.0075 (at least it's positive).</p>",
      "rawMarkdown": "A couple of stupidly simple baseline CVs (based on the last 100 days in the training data):\n\n1. guess 0 for everything, R^2 = 0\n2. use the previous day's responder_6 mean, R^2 = -0.02\n3. use the previous day's responder_6 observation (at each time_id). R^2 = -0.99\n\nThis last one surprised me enough to plot out the metric at different bucket sizes *(time_id has factors [1, 2, 4, 8, 11, 22, 44, 88, 121, 242, 484, 968])*\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F175917%2Fc87d62311c86e6746c1004f85282e4fe%2Fdownload%20(4).png?generation=1729947254771306&alt=media)\n\n- Previous values are anti-predictive. \n- Simple lag-based features based on the target will probably not be useful\n- if in doubt, guess 0 🤣\n\nAn untuned catboost, has a CV of ~0.0075 (at least it's positive).",
      "votes": 6,
      "replies": [
        {
          "id": 3028791,
          "postDate": "2024-10-26T14:09:33.887Z",
          "rawMarkdown": "",
          "isDeleted": true
        },
        {
          "id": 3030397,
          "postDate": "2024-10-28T13:42:02.447Z",
          "content": "<p>I have also tried it, and I thought autoregression would be great, but the result was unexpected.</p>",
          "rawMarkdown": "I have also tried it, and I thought autoregression would be great, but the result was unexpected.",
          "votes": 1
        }
      ]
    },
    {
      "id": 3049088,
      "postDate": "2024-11-18T17:30:33.517Z",
      "content": "<p>I'm using a single validation split by time right now. Date ids after 1515 (inclusive) are selected as validation so it makes exactly 183 date ids.</p>\n<table>\n<thead>\n<tr>\n<th>validation</th>\n<th>leaderboard</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>0.009278876873841768</td>\n<td>0.0043</td>\n</tr>\n<tr>\n<td>0.009420489539111121</td>\n<td>0.0040</td>\n</tr>\n<tr>\n<td>0.009872482483289868</td>\n<td>0.0045</td>\n</tr>\n<tr>\n<td>0.009936407757916044</td>\n<td>0.0044</td>\n</tr>\n<tr>\n<td>0.010493038314628556</td>\n<td>0.0045</td>\n</tr>\n<tr>\n<td>0.01055438183200752</td>\n<td>0.0046</td>\n</tr>\n<tr>\n<td>0.01062276941316631</td>\n<td>0.0046</td>\n</tr>\n<tr>\n<td>0.0107125793311309</td>\n<td>0.0047</td>\n</tr>\n<tr>\n<td>0.01079937669003117</td>\n<td>0.0047</td>\n</tr>\n<tr>\n<td>0.010810543767857728</td>\n<td>0.0049</td>\n</tr>\n<tr>\n<td>0.010920114827567384</td>\n<td>0.0048</td>\n</tr>\n<tr>\n<td>0.010962342625704502</td>\n<td>0.0049</td>\n</tr>\n<tr>\n<td>0.011066736623069118</td>\n<td>0.0048</td>\n</tr>\n</tbody>\n</table>\n<p>I can say that my validation scores are correlated with leaderboard so far.<br>\nCorrelation Pearson: 0.908436, Spearman: 0.946081</p>",
      "rawMarkdown": "I'm using a single validation split by time right now. Date ids after 1515 (inclusive) are selected as validation so it makes exactly 183 date ids.\n\n|validation          |leaderboard|\n|--------------------|-----------|\n|0.009278876873841768| 0.0043    |\n|0.009420489539111121| 0.0040    |\n|0.009872482483289868| 0.0045    |\n|0.009936407757916044| 0.0044    |\n|0.010493038314628556| 0.0045    |\n|0.01055438183200752 | 0.0046    |\n|0.01062276941316631 | 0.0046    |\n|0.0107125793311309  | 0.0047    |\n|0.01079937669003117 | 0.0047    |\n|0.010810543767857728| 0.0049    |\n|0.010920114827567384| 0.0048    |\n|0.010962342625704502| 0.0049    |\n|0.011066736623069118| 0.0048    |\n\n\nI can say that my validation scores are correlated with leaderboard so far.\nCorrelation Pearson: 0.908436, Spearman: 0.946081\n",
      "votes": 4,
      "replies": [
        {
          "id": 3049105,
          "postDate": "2024-11-18T17:53:14.967Z",
          "content": "<p>Thanks for sharing! Are the submitted models retrained with all date_ids using the best iterations found from validation data or the last 183 date_ids are not used (only as validation)</p>",
          "rawMarkdown": "Thanks for sharing! Are the submitted models retrained with all date_ids using the best iterations found from validation data or the last 183 date_ids are not used (only as validation)",
          "replies": [
            {
              "id": 3049117,
              "postDate": "2024-11-18T18:09:15.467Z",
              "content": "<p>Yeah, I retrain on 47M samples after validating, but I don't find best iterations through early stopping. I'm using fixed number of iterations.</p>",
              "rawMarkdown": "Yeah, I retrain on 47M samples after validating, but I don't find best iterations through early stopping. I'm using fixed number of iterations."
            }
          ]
        }
      ]
    },
    {
      "id": 3030421,
      "postDate": "2024-10-28T14:14:22.277Z",
      "content": "<table>\n<thead>\n<tr>\n<th>model</th>\n<th>cv</th>\n<th>lb</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>lgb</td>\n<td>0.007869</td>\n<td>0.0048</td>\n</tr>\n<tr>\n<td>lgb</td>\n<td>0.006137</td>\n<td>0.0031</td>\n</tr>\n<tr>\n<td>lgb</td>\n<td>0.005106</td>\n<td>0.0032</td>\n</tr>\n<tr>\n<td>lgb</td>\n<td>0.004907</td>\n<td>0.0033</td>\n</tr>\n<tr>\n<td>lgb</td>\n<td>0.005246</td>\n<td>0.0036</td>\n</tr>\n<tr>\n<td>lgb+xgb</td>\n<td>0.007840</td>\n<td>0.0052</td>\n</tr>\n<tr>\n<td>ridge</td>\n<td>0.003261</td>\n<td>0.0023</td>\n</tr>\n</tbody>\n</table>",
      "rawMarkdown": "| model | cv | lb\n| --- | --- | --- |\n| lgb | 0.007869 | 0.0048  |\n| lgb | 0.006137 | 0.0031   |\n| lgb | 0.005106 | 0.0032  |\n| lgb | 0.004907 | 0.0033 |\n| lgb | 0.005246 | 0.0036 |\n|lgb+xgb| 0.007840 | 0.0052 |\n| ridge|0.003261 | 0.0023 |",
      "votes": 3,
      "replies": [
        {
          "id": 3030435,
          "postDate": "2024-10-28T14:24:02.810Z",
          "content": "<p>Thanks for sharing <a href=\"https://www.kaggle.com/shiyili\" target=\"_blank\">@shiyili</a> . Is it you hyper-parameter tunning with lgb for different lb?</p>",
          "rawMarkdown": "Thanks for sharing @shiyili . Is it you hyper-parameter tunning with lgb for different lb?",
          "votes": 1,
          "replies": [
            {
              "id": 3030456,
              "postDate": "2024-10-28T14:37:26.473Z",
              "content": "<p>There are different tricks (inlucding hp tuning) for each model. But the validation set are more-or-less the same. </p>",
              "rawMarkdown": "There are different tricks (inlucding hp tuning) for each model. But the validation set are more-or-less the same. ",
              "votes": 2
            }
          ]
        },
        {
          "id": 3030461,
          "postDate": "2024-10-28T14:39:43.687Z",
          "content": "<p>Mind sharing your cv scheme? I only tried using &gt; 1577 time id as validation set but don’t seem correlated well</p>",
          "rawMarkdown": "Mind sharing your cv scheme? I only tried using > 1577 time id as validation set but don’t seem correlated well",
          "votes": 1,
          "replies": [
            {
              "id": 3030464,
              "postDate": "2024-10-28T14:43:10.363Z",
              "content": "<p>I used partition 6-10, and kept the last 100 dates as validation. 5-folds are splited based on date_id (e.g. <code>i % n_fold == 0</code> )</p>",
              "rawMarkdown": "I used partition 6-10, and kept the last 100 dates as validation. 5-folds are splited based on date_id (e.g. `i % n_fold == 0` )",
              "votes": 4
            }
          ]
        },
        {
          "id": 3037461,
          "postDate": "2024-11-05T18:22:30.163Z",
          "content": "<p>Are you early stopping on the last 100 date_id? Or just using it as a holdout?</p>",
          "rawMarkdown": "Are you early stopping on the last 100 date_id? Or just using it as a holdout?",
          "replies": [
            {
              "id": 3037576,
              "postDate": "2024-11-05T20:45:10.923Z",
              "content": "<p>holdout the last 100 date_id as OOF </p>",
              "rawMarkdown": "holdout the last 100 date_id as OOF "
            },
            {
              "id": 3037632,
              "postDate": "2024-11-05T22:28:06.943Z",
              "content": "<p>Could you please check which date_id's your xgb+lgb (lb 0.0052) did better on relative to your solo lgb (lb 0.0048)? I'd love to know. </p>",
              "rawMarkdown": "Could you please check which date_id's your xgb+lgb (lb 0.0052) did better on relative to your solo lgb (lb 0.0048)? I'd love to know. "
            },
            {
              "id": 3037836,
              "postDate": "2024-11-06T08:20:27.993Z",
              "content": "<p>Do you mean check it in the validation set? Why does it matter?</p>",
              "rawMarkdown": "Do you mean check it in the validation set? Why does it matter?"
            },
            {
              "id": 3037954,
              "postDate": "2024-11-06T12:06:33.500Z",
              "content": "<p>Hmm also using it as a holdout and 5 fold within train set only, holdout score is 0.0085+ but LB stuck at half that..</p>",
              "rawMarkdown": "Hmm also using it as a holdout and 5 fold within train set only, holdout score is 0.0085+ but LB stuck at half that..",
              "votes": 1
            },
            {
              "id": 3038073,
              "postDate": "2024-11-06T14:59:02.403Z",
              "content": "<p>Yeah, it performed worse on validation but better on leaderboard - I was wondering what dates the predictions really differed on from the solo lgb model. I'm willing to sacrifice submissions to experiment with validation sets that better correlate with leaderboard. </p>",
              "rawMarkdown": "Yeah, it performed worse on validation but better on leaderboard - I was wondering what dates the predictions really differed on from the solo lgb model. I'm willing to sacrifice submissions to experiment with validation sets that better correlate with leaderboard. "
            }
          ]
        }
      ]
    },
    {
      "id": 3019235,
      "postDate": "2024-10-16T11:25:28.623Z",
      "content": "<p>Continuous updates </p>\n<table>\n<thead>\n<tr>\n<th>date</th>\n<th>model</th>\n<th>CV_method</th>\n<th>CV_score</th>\n<th>LB_score</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>10/16</td>\n<td>Ridge</td>\n<td>data 9train_test_split(8:2)</td>\n<td>0.0036</td>\n<td>0.0026</td>\n</tr>\n<tr>\n<td>10/23</td>\n<td>Ridge</td>\n<td>data 7,8,9 train_test_split(8:2)</td>\n<td>0.00489</td>\n<td>0.0033</td>\n</tr>\n</tbody>\n</table>",
      "rawMarkdown": "Continuous updates \ndate| model | CV_method|CV_score|LB_score|\n| --- | --- | --- | --- | --- |\n|10/16| Ridge |data 9train_test_split(8:2) |0.0036|0.0026|\n|10/23|Ridge| data 7,8,9 train_test_split(8:2)|0.00489|0.0033|",
      "votes": 3
    },
    {
      "id": 3028925,
      "postDate": "2024-10-26T16:37:46.170Z",
      "content": "<p>Hi <a href=\"https://www.kaggle.com/ravi20076\" target=\"_blank\">@ravi20076</a>  Great work and thanks for sharing your results.</p>\n<p>I noticed that you used symbol_id as feature for model input. I was wondering if it will make a difference when new symbol id is added in the test?</p>",
      "rawMarkdown": "Hi @ravi20076  Great work and thanks for sharing your results.\n\nI noticed that you used symbol_id as feature for model input. I was wondering if it will make a difference when new symbol id is added in the test?",
      "votes": 1
    },
    {
      "id": 3022196,
      "postDate": "2024-10-19T11:38:33.493Z",
      "content": "<table>\n<thead>\n<tr>\n<th>Model</th>\n<th>Test R²</th>\n<th>Leaderboard (LB) Score</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Single LGBM</td>\n<td>0.0433</td>\n<td>0.0033</td>\n</tr>\n</tbody>\n</table>\n<ul>\n<li>But I am Confuse about my Test Score , I am using metric from Sk-learn <a href=\"https://www.kaggle.com/ravi20076\" target=\"_blank\">@ravi20076</a> </li>\n</ul>",
      "rawMarkdown": "| Model        | Test R²   | Leaderboard (LB) Score |\n|--------------|-----------|------------------------|\n| Single LGBM  | 0.0433    | 0.0033                 |\n\n- But I am Confuse about my Test Score , I am using metric from Sk-learn @ravi20076 ",
      "votes": 1,
      "replies": [
        {
          "id": 3030232,
          "postDate": "2024-10-28T10:21:32.720Z",
          "content": "<p>can you share your training notebook? im curious what if anything was wrong with your setup</p>",
          "rawMarkdown": "can you share your training notebook? im curious what if anything was wrong with your setup",
          "votes": 1,
          "replies": [
            {
              "id": 3037535,
              "postDate": "2024-11-05T19:42:29.583Z",
              "content": "<p>This is my Training Code , <a href=\"https://www.kaggle.com/dc260123\" target=\"_blank\">@dc260123</a>.</p>\n<pre><code>%%time\n\ndef weighted_r2_score(y_true, y_pred, sample_weight):\n    numerator = np.sum(sample_weight * (y_true - y_pred) ** 2)\n    denominator = np.sum(sample_weight * (y_true) ** 2)\n    r2 = 1 - (numerator / denominator)\n    return r2\n\ndef train_and_evaluate_kfold(model, X, y, sample_weights, =5, =42, =):\n\n    kf = KFold(=n_splits, =, =SEED)\n    train_r2_scores = []\n    test_r2_scores = []\n    models = []  \n\n     fold, (train_index, test_index)  enumerate(tqdm(kf.split(X), =n_splits, =)):\n        X_train, X_test = X.iloc[train_index], X.iloc[test_index]\n        y_train, y_test = y.iloc[train_index], y.iloc[test_index]\n        weights_train, weights_test = sample_weights[train_index], sample_weights[test_index]\n\n        model_clone = model.__class__(**model.get_params())\n\n        model_clone.fit(X_train, y_train)\n\n        models.append(model_clone)\n\n        y_train_pred = model_clone.predict(X_train)\n        y_test_pred = model_clone.predict(X_test)\n\n        train_r2 = weighted_r2_score(y_train, y_train_pred, weights_train)\n        test_r2 = weighted_r2_score(y_test, y_test_pred, weights_test)\n\n        train_r2_scores.append(train_r2)\n        test_r2_scores.append(test_r2)\n\n        (f)\n\n        time.sleep(1)\n\n        clear_output(=)\n\n    with open(pickle_file, ) as f:\n        pickle.dump(models, f)\n\n    (f)\n    (f)\n\n    return models\n\nX = train[fe]  \ny = train[]  \nsample_weights = train[].values  \n\nmodel = LGBMRegressor(=-1, =42, =)\n\nLightModels = train_and_evaluate_kfold(model, X, y, sample_weights)\n</code></pre>",
              "rawMarkdown": "This is my Training Code , @dc260123.\n```\n%%time\n\ndef weighted_r2_score(y_true, y_pred, sample_weight):\n    numerator = np.sum(sample_weight * (y_true - y_pred) ** 2)\n    denominator = np.sum(sample_weight * (y_true) ** 2)\n    r2 = 1 - (numerator / denominator)\n    return r2\n\ndef train_and_evaluate_kfold(model, X, y, sample_weights, n_splits=5, SEED=42, pickle_file=\"trained_models.pkl\"):\n\n    kf = KFold(n_splits=n_splits, shuffle=True, random_state=SEED)\n    train_r2_scores = []\n    test_r2_scores = []\n    models = []  \n    \n    for fold, (train_index, test_index) in enumerate(tqdm(kf.split(X), total=n_splits, desc=\"Training Folds\")):\n        X_train, X_test = X.iloc[train_index], X.iloc[test_index]\n        y_train, y_test = y.iloc[train_index], y.iloc[test_index]\n        weights_train, weights_test = sample_weights[train_index], sample_weights[test_index]\n        \n        model_clone = model.__class__(**model.get_params())\n        \n        model_clone.fit(X_train, y_train)\n        \n        models.append(model_clone)\n        \n        y_train_pred = model_clone.predict(X_train)\n        y_test_pred = model_clone.predict(X_test)\n        \n        train_r2 = weighted_r2_score(y_train, y_train_pred, weights_train)\n        test_r2 = weighted_r2_score(y_test, y_test_pred, weights_test)\n        \n        train_r2_scores.append(train_r2)\n        test_r2_scores.append(test_r2)\n        \n        print(f\"Fold {fold + 1} - Train R²: {train_r2:.4f}, Test R²: {test_r2:.4f}\")\n        \n        time.sleep(1)\n        \n        clear_output(wait=True)\n    \n    with open(pickle_file, 'wb') as f:\n        pickle.dump(models, f)\n    \n    print(f\"Mean Train R² Score: {np.mean(train_r2_scores):.4f}\")\n    print(f\"Mean Test R² Score: {np.mean(test_r2_scores):.4f}\")\n    \n    return models\n\nX = train[fe]  \ny = train['responder_6']  \nsample_weights = train['weight'].values  \n\nmodel = LGBMRegressor(verbose=-1, random_state=42, device='gpu')\n\nLightModels = train_and_evaluate_kfold(model, X, y, sample_weights)\n```\n"
            },
            {
              "id": 3041485,
              "postDate": "2024-11-10T12:44:27.120Z",
              "content": "<p>I dont think they are taking the mean of each folds losses. Can you try to save the prediction and targets and calculate the 'overall' score for each fold?</p>",
              "rawMarkdown": "I dont think they are taking the mean of each folds losses. Can you try to save the prediction and targets and calculate the 'overall' score for each fold?"
            },
            {
              "id": 3042267,
              "postDate": "2024-11-11T11:38:22.923Z",
              "content": "<p><a href=\"https://www.kaggle.com/dc260123\" target=\"_blank\">@dc260123</a> may i ask whats your cv - lb and validation scheme looks like?  </p>",
              "rawMarkdown": "@dc260123 may i ask whats your cv - lb and validation scheme looks like?  "
            },
            {
              "id": 3042465,
              "postDate": "2024-11-11T14:35:09.163Z",
              "content": "<p>CV 0.0082 <br>\nlb 0.006</p>\n<p>but my best score is a blend of two models and with online learning so take it with a grain of salt <br>\nLooking at other people's numbers it seems like a .002~0.003 spread seems to be reasonable </p>",
              "rawMarkdown": "CV 0.0082 \nlb 0.006\n\nbut my best score is a blend of two models and with online learning so take it with a grain of salt \nLooking at other people's numbers it seems like a .002~0.003 spread seems to be reasonable "
            },
            {
              "id": 3042473,
              "postDate": "2024-11-11T14:41:48.597Z",
              "content": "<p>How'd you implement online learning? Do you know of any good example notebooks? I've failed at every attempt of it 😞</p>",
              "rawMarkdown": "How'd you implement online learning? Do you know of any good example notebooks? I've failed at every attempt of it 😞"
            },
            {
              "id": 3042510,
              "postDate": "2024-11-11T15:09:19.043Z",
              "content": "<p>I dont think they are changing the 1 minute restriction and the callback api makes it difficult too. </p>\n<p>My code is in a hobby project state with a lot of comments and todos so I can't share the whole thing without investing a lot of time making a fork and maintaining the public fork: you will most likely run into other problems anyway…</p>\n<p>If you haven't done it already I would suggest to do what the others have suggested too to set up some sort of test calling your predict callback and debug the callback directly instead of through the grpc server or modify their server locally to forward server side error properly back to client.(start with removing the wrapper exception GatewayRuntimeError)</p>\n<p>And no I just brute-forced through it without reference any notebook… Most of my submission are for troubleshooting this. At one point I had to rely on trying to understand if I made some progress if I see \"Submission Scoring Error\" or \"Notebook Threw Exception\" : )</p>\n<p>I understand that to some extend they want to prevent private test set leakage but forwarding an exception type back to us with a limit on the exception's length should be safe and helpful for troubleshooting.</p>",
              "rawMarkdown": "I dont think they are changing the 1 minute restriction and the callback api makes it difficult too. \n\nMy code is in a hobby project state with a lot of comments and todos so I can't share the whole thing without investing a lot of time making a fork and maintaining the public fork: you will most likely run into other problems anyway...\n\nIf you haven't done it already I would suggest to do what the others have suggested too to set up some sort of test calling your predict callback and debug the callback directly instead of through the grpc server or modify their server locally to forward server side error properly back to client.(start with removing the wrapper exception GatewayRuntimeError)\n\nAnd no I just brute-forced through it without reference any notebook... Most of my submission are for troubleshooting this. At one point I had to rely on trying to understand if I made some progress if I see \"Submission Scoring Error\" or \"Notebook Threw Exception\" : )\n\nI understand that to some extend they want to prevent private test set leakage but forwarding an exception type back to us with a limit on the exception's length should be safe and helpful for troubleshooting.",
              "votes": 1
            },
            {
              "id": 3042523,
              "postDate": "2024-11-11T15:13:09.453Z",
              "content": "<p>I don't get errors. When I say I've failed, I mean my score drops significantly. I'm attempting to incrementally train an xgboost model by specifying the model parameter in the fit method.</p>",
              "rawMarkdown": "I don't get errors. When I say I've failed, I mean my score drops significantly. I'm attempting to incrementally train an xgboost model by specifying the model parameter in the fit method."
            },
            {
              "id": 3042541,
              "postDate": "2024-11-11T15:26:50.433Z",
              "content": "<p>try run it with online learning on your validation set and print a result each day comparing it with without online learning? </p>\n<p>I only have a theoretical understanding of gradient boosting and am fairly new to kaggle + practical use of boosting libraries but I dont think GB models are good candidates for online learning because they are not trained with SGD. </p>\n<p>The good empirical results we see are generally from training them with the provided algorithm(some sort of full batch gradient descent with GOSS/bagging). If I have to guess I think you can either try to fit the model again with the new data only or a mix of old and new data. </p>\n<p>With only the new data the model does not have enough sample to be refitted properly and if you mix new data with some old data to stabilize the gradient's direction you might overfit the model </p>",
              "rawMarkdown": "try run it with online learning on your validation set and print a result each day comparing it with without online learning? \n\nI only have a theoretical understanding of gradient boosting and am fairly new to kaggle + practical use of boosting libraries but I dont think GB models are good candidates for online learning because they are not trained with SGD. \n\nThe good empirical results we see are generally from training them with the provided algorithm(some sort of full batch gradient descent with GOSS/bagging). If I have to guess I think you can either try to fit the model again with the new data only or a mix of old and new data. \n\nWith only the new data the model does not have enough sample to be refitted properly and if you mix new data with some old data to stabilize the gradient's direction you might overfit the model "
            },
            {
              "id": 3042599,
              "postDate": "2024-11-11T16:03:20.743Z",
              "content": "<p><a href=\"https://www.kaggle.com/competitions/optiver-trading-at-the-close/discussion/487446\" target=\"_blank\">https://www.kaggle.com/competitions/optiver-trading-at-the-close/discussion/487446</a><br>\n<a href=\"https://www.kaggle.com/competitions/optiver-trading-at-the-close/discussion/486169\" target=\"_blank\">https://www.kaggle.com/competitions/optiver-trading-at-the-close/discussion/486169</a><br>\nBoth notebooks mention online learning/training for GB models. </p>\n<p>I'll try adjusting the kaggle submission code locally to test OL methods and print with/without OL. Still working on feature engineering anyways. If you don't mind, what dates are you using for local validation? Is your reported CV with your ensemble and OL? Or ensemble without OL?<br>\n\"CV 0.0082<br>\nlb 0.006\"</p>",
              "rawMarkdown": "https://www.kaggle.com/competitions/optiver-trading-at-the-close/discussion/487446\nhttps://www.kaggle.com/competitions/optiver-trading-at-the-close/discussion/486169\nBoth notebooks mention online learning/training for GB models. \n\nI'll try adjusting the kaggle submission code locally to test OL methods and print with/without OL. Still working on feature engineering anyways. If you don't mind, what dates are you using for local validation? Is your reported CV with your ensemble and OL? Or ensemble without OL?\n\"CV 0.0082\nlb 0.006\""
            }
          ]
        }
      ]
    },
    {
      "id": 3021989,
      "postDate": "2024-10-19T06:20:49.847Z",
      "content": "<p>validation period : date_id more over 1577<br>\ncv : 0.006210 , lb : 0.0039</p>",
      "rawMarkdown": "validation period : date_id more over 1577\ncv : 0.006210 , lb : 0.0039",
      "votes": 2
    },
    {
      "id": 3070143,
      "postDate": "2024-12-12T10:20:36.727Z",
      "content": "<p>Hello, do you have any new ideas about the updated LB scores and validation strategy?</p>",
      "rawMarkdown": "Hello, do you have any new ideas about the updated LB scores and validation strategy?"
    },
    {
      "id": 3037678,
      "postDate": "2024-11-06T01:58:04.957Z",
      "rawMarkdown": "",
      "votes": 2,
      "isDeleted": true
    },
    {
      "id": 3037677,
      "postDate": "2024-11-06T01:57:16.337Z",
      "rawMarkdown": "",
      "isDeleted": true
    },
    {
      "id": 3037162,
      "postDate": "2024-11-05T12:40:55.367Z",
      "rawMarkdown": "",
      "isDeleted": true
    }
  ],
  "comments": [
    {
      "id": 3028716,
      "author_name": "paddykb",
      "author_url": "",
      "post_date": "2024-10-26T13:01:21.280000",
      "content": "<p>A couple of stupidly simple baseline CVs (based on the last 100 days in the training data):</p>\n<ol>\n<li>guess 0 for everything, R^2 = 0</li>\n<li>use the previous day's responder_6 mean, R^2 = -0.02</li>\n<li>use the previous day's responder_6 observation (at each time_id). R^2 = -0.99</li>\n</ol>\n<p>This last one surprised me enough to plot out the metric at different bucket sizes <em>(time_id has factors [1, 2, 4, 8, 11, 22, 44, 88, 121, 242, 484, 968])</em></p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F175917%2Fc87d62311c86e6746c1004f85282e4fe%2Fdownload%20(4).png?generation=1729947254771306&amp;alt=media\" alt=\"\"></p>\n<ul>\n<li>Previous values are anti-predictive. </li>\n<li>Simple lag-based features based on the target will probably not be useful</li>\n<li>if in doubt, guess 0 🤣</li>\n</ul>\n<p>An untuned catboost, has a CV of ~0.0075 (at least it's positive).</p>",
      "votes": 6,
      "replies": [
        {
          "id": 3028791,
          "author_name": "",
          "author_url": "",
          "post_date": "2024-10-26T14:09:33.887000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 3030397,
          "author_name": "yunsuxiaozi",
          "author_url": "",
          "post_date": "2024-10-28T13:42:02.447000",
          "content": "<p>I have also tried it, and I thought autoregression would be great, but the result was unexpected.</p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 3049088,
      "author_name": "Gunes Evitan",
      "author_url": "",
      "post_date": "2024-11-18T17:30:33.517000",
      "content": "<p>I'm using a single validation split by time right now. Date ids after 1515 (inclusive) are selected as validation so it makes exactly 183 date ids.</p>\n<table>\n<thead>\n<tr>\n<th>validation</th>\n<th>leaderboard</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>0.009278876873841768</td>\n<td>0.0043</td>\n</tr>\n<tr>\n<td>0.009420489539111121</td>\n<td>0.0040</td>\n</tr>\n<tr>\n<td>0.009872482483289868</td>\n<td>0.0045</td>\n</tr>\n<tr>\n<td>0.009936407757916044</td>\n<td>0.0044</td>\n</tr>\n<tr>\n<td>0.010493038314628556</td>\n<td>0.0045</td>\n</tr>\n<tr>\n<td>0.01055438183200752</td>\n<td>0.0046</td>\n</tr>\n<tr>\n<td>0.01062276941316631</td>\n<td>0.0046</td>\n</tr>\n<tr>\n<td>0.0107125793311309</td>\n<td>0.0047</td>\n</tr>\n<tr>\n<td>0.01079937669003117</td>\n<td>0.0047</td>\n</tr>\n<tr>\n<td>0.010810543767857728</td>\n<td>0.0049</td>\n</tr>\n<tr>\n<td>0.010920114827567384</td>\n<td>0.0048</td>\n</tr>\n<tr>\n<td>0.010962342625704502</td>\n<td>0.0049</td>\n</tr>\n<tr>\n<td>0.011066736623069118</td>\n<td>0.0048</td>\n</tr>\n</tbody>\n</table>\n<p>I can say that my validation scores are correlated with leaderboard so far.<br>\nCorrelation Pearson: 0.908436, Spearman: 0.946081</p>",
      "votes": 4,
      "replies": [
        {
          "id": 3049105,
          "author_name": "HAO",
          "author_url": "",
          "post_date": "2024-11-18T17:53:14.967000",
          "content": "<p>Thanks for sharing! Are the submitted models retrained with all date_ids using the best iterations found from validation data or the last 183 date_ids are not used (only as validation)</p>",
          "votes": 0,
          "replies": [
            {
              "id": 3049117,
              "author_name": "Gunes Evitan",
              "author_url": "",
              "post_date": "2024-11-18T18:09:15.467000",
              "content": "<p>Yeah, I retrain on 47M samples after validating, but I don't find best iterations through early stopping. I'm using fixed number of iterations.</p>",
              "votes": 0,
              "replies": []
            }
          ]
        }
      ]
    },
    {
      "id": 3030421,
      "author_name": "SLi",
      "author_url": "",
      "post_date": "2024-10-28T14:14:22.277000",
      "content": "<table>\n<thead>\n<tr>\n<th>model</th>\n<th>cv</th>\n<th>lb</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>lgb</td>\n<td>0.007869</td>\n<td>0.0048</td>\n</tr>\n<tr>\n<td>lgb</td>\n<td>0.006137</td>\n<td>0.0031</td>\n</tr>\n<tr>\n<td>lgb</td>\n<td>0.005106</td>\n<td>0.0032</td>\n</tr>\n<tr>\n<td>lgb</td>\n<td>0.004907</td>\n<td>0.0033</td>\n</tr>\n<tr>\n<td>lgb</td>\n<td>0.005246</td>\n<td>0.0036</td>\n</tr>\n<tr>\n<td>lgb+xgb</td>\n<td>0.007840</td>\n<td>0.0052</td>\n</tr>\n<tr>\n<td>ridge</td>\n<td>0.003261</td>\n<td>0.0023</td>\n</tr>\n</tbody>\n</table>",
      "votes": 3,
      "replies": [
        {
          "id": 3030435,
          "author_name": "AIFahim",
          "author_url": "",
          "post_date": "2024-10-28T14:24:02.810000",
          "content": "<p>Thanks for sharing <a href=\"https://www.kaggle.com/shiyili\" target=\"_blank\">@shiyili</a> . Is it you hyper-parameter tunning with lgb for different lb?</p>",
          "votes": 1,
          "replies": [
            {
              "id": 3030456,
              "author_name": "SLi",
              "author_url": "",
              "post_date": "2024-10-28T14:37:26.473000",
              "content": "<p>There are different tricks (inlucding hp tuning) for each model. But the validation set are more-or-less the same. </p>",
              "votes": 2,
              "replies": []
            }
          ]
        },
        {
          "id": 3030461,
          "author_name": "yu",
          "author_url": "",
          "post_date": "2024-10-28T14:39:43.687000",
          "content": "<p>Mind sharing your cv scheme? I only tried using &gt; 1577 time id as validation set but don’t seem correlated well</p>",
          "votes": 1,
          "replies": [
            {
              "id": 3030464,
              "author_name": "SLi",
              "author_url": "",
              "post_date": "2024-10-28T14:43:10.363000",
              "content": "<p>I used partition 6-10, and kept the last 100 dates as validation. 5-folds are splited based on date_id (e.g. <code>i % n_fold == 0</code> )</p>",
              "votes": 4,
              "replies": []
            }
          ]
        },
        {
          "id": 3037461,
          "author_name": "JM",
          "author_url": "",
          "post_date": "2024-11-05T18:22:30.163000",
          "content": "<p>Are you early stopping on the last 100 date_id? Or just using it as a holdout?</p>",
          "votes": 0,
          "replies": [
            {
              "id": 3037576,
              "author_name": "SLi",
              "author_url": "",
              "post_date": "2024-11-05T20:45:10.923000",
              "content": "<p>holdout the last 100 date_id as OOF </p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 3037632,
              "author_name": "Jack",
              "author_url": "",
              "post_date": "2024-11-05T22:28:06.943000",
              "content": "<p>Could you please check which date_id's your xgb+lgb (lb 0.0052) did better on relative to your solo lgb (lb 0.0048)? I'd love to know. </p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 3037836,
              "author_name": "SLi",
              "author_url": "",
              "post_date": "2024-11-06T08:20:27.993000",
              "content": "<p>Do you mean check it in the validation set? Why does it matter?</p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 3037954,
              "author_name": "JM",
              "author_url": "",
              "post_date": "2024-11-06T12:06:33.500000",
              "content": "<p>Hmm also using it as a holdout and 5 fold within train set only, holdout score is 0.0085+ but LB stuck at half that..</p>",
              "votes": 1,
              "replies": []
            },
            {
              "id": 3038073,
              "author_name": "Jack",
              "author_url": "",
              "post_date": "2024-11-06T14:59:02.403000",
              "content": "<p>Yeah, it performed worse on validation but better on leaderboard - I was wondering what dates the predictions really differed on from the solo lgb model. I'm willing to sacrifice submissions to experiment with validation sets that better correlate with leaderboard. </p>",
              "votes": 0,
              "replies": []
            }
          ]
        }
      ]
    },
    {
      "id": 3019235,
      "author_name": "yunsuxiaozi",
      "author_url": "",
      "post_date": "2024-10-16T11:25:28.623000",
      "content": "<p>Continuous updates </p>\n<table>\n<thead>\n<tr>\n<th>date</th>\n<th>model</th>\n<th>CV_method</th>\n<th>CV_score</th>\n<th>LB_score</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>10/16</td>\n<td>Ridge</td>\n<td>data 9train_test_split(8:2)</td>\n<td>0.0036</td>\n<td>0.0026</td>\n</tr>\n<tr>\n<td>10/23</td>\n<td>Ridge</td>\n<td>data 7,8,9 train_test_split(8:2)</td>\n<td>0.00489</td>\n<td>0.0033</td>\n</tr>\n</tbody>\n</table>",
      "votes": 3,
      "replies": []
    },
    {
      "id": 3028925,
      "author_name": "SLi",
      "author_url": "",
      "post_date": "2024-10-26T16:37:46.170000",
      "content": "<p>Hi <a href=\"https://www.kaggle.com/ravi20076\" target=\"_blank\">@ravi20076</a>  Great work and thanks for sharing your results.</p>\n<p>I noticed that you used symbol_id as feature for model input. I was wondering if it will make a difference when new symbol id is added in the test?</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 3022196,
      "author_name": "Sheikh Muhammad Abdullah",
      "author_url": "",
      "post_date": "2024-10-19T11:38:33.493000",
      "content": "<table>\n<thead>\n<tr>\n<th>Model</th>\n<th>Test R²</th>\n<th>Leaderboard (LB) Score</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Single LGBM</td>\n<td>0.0433</td>\n<td>0.0033</td>\n</tr>\n</tbody>\n</table>\n<ul>\n<li>But I am Confuse about my Test Score , I am using metric from Sk-learn <a href=\"https://www.kaggle.com/ravi20076\" target=\"_blank\">@ravi20076</a> </li>\n</ul>",
      "votes": 1,
      "replies": [
        {
          "id": 3030232,
          "author_name": "dc260123",
          "author_url": "",
          "post_date": "2024-10-28T10:21:32.720000",
          "content": "<p>can you share your training notebook? im curious what if anything was wrong with your setup</p>",
          "votes": 1,
          "replies": [
            {
              "id": 3037535,
              "author_name": "Sheikh Muhammad Abdullah",
              "author_url": "",
              "post_date": "2024-11-05T19:42:29.583000",
              "content": "<p>This is my Training Code , <a href=\"https://www.kaggle.com/dc260123\" target=\"_blank\">@dc260123</a>.</p>\n<pre><code>%%time\n\ndef weighted_r2_score(y_true, y_pred, sample_weight):\n    numerator = np.sum(sample_weight * (y_true - y_pred) ** 2)\n    denominator = np.sum(sample_weight * (y_true) ** 2)\n    r2 = 1 - (numerator / denominator)\n    return r2\n\ndef train_and_evaluate_kfold(model, X, y, sample_weights, =5, =42, =):\n\n    kf = KFold(=n_splits, =, =SEED)\n    train_r2_scores = []\n    test_r2_scores = []\n    models = []  \n\n     fold, (train_index, test_index)  enumerate(tqdm(kf.split(X), =n_splits, =)):\n        X_train, X_test = X.iloc[train_index], X.iloc[test_index]\n        y_train, y_test = y.iloc[train_index], y.iloc[test_index]\n        weights_train, weights_test = sample_weights[train_index], sample_weights[test_index]\n\n        model_clone = model.__class__(**model.get_params())\n\n        model_clone.fit(X_train, y_train)\n\n        models.append(model_clone)\n\n        y_train_pred = model_clone.predict(X_train)\n        y_test_pred = model_clone.predict(X_test)\n\n        train_r2 = weighted_r2_score(y_train, y_train_pred, weights_train)\n        test_r2 = weighted_r2_score(y_test, y_test_pred, weights_test)\n\n        train_r2_scores.append(train_r2)\n        test_r2_scores.append(test_r2)\n\n        (f)\n\n        time.sleep(1)\n\n        clear_output(=)\n\n    with open(pickle_file, ) as f:\n        pickle.dump(models, f)\n\n    (f)\n    (f)\n\n    return models\n\nX = train[fe]  \ny = train[]  \nsample_weights = train[].values  \n\nmodel = LGBMRegressor(=-1, =42, =)\n\nLightModels = train_and_evaluate_kfold(model, X, y, sample_weights)\n</code></pre>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 3041485,
              "author_name": "dc260123",
              "author_url": "",
              "post_date": "2024-11-10T12:44:27.120000",
              "content": "<p>I dont think they are taking the mean of each folds losses. Can you try to save the prediction and targets and calculate the 'overall' score for each fold?</p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 3042267,
              "author_name": "yu",
              "author_url": "",
              "post_date": "2024-11-11T11:38:22.923000",
              "content": "<p><a href=\"https://www.kaggle.com/dc260123\" target=\"_blank\">@dc260123</a> may i ask whats your cv - lb and validation scheme looks like?  </p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 3042465,
              "author_name": "dc260123",
              "author_url": "",
              "post_date": "2024-11-11T14:35:09.163000",
              "content": "<p>CV 0.0082 <br>\nlb 0.006</p>\n<p>but my best score is a blend of two models and with online learning so take it with a grain of salt <br>\nLooking at other people's numbers it seems like a .002~0.003 spread seems to be reasonable </p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 3042473,
              "author_name": "Jack",
              "author_url": "",
              "post_date": "2024-11-11T14:41:48.597000",
              "content": "<p>How'd you implement online learning? Do you know of any good example notebooks? I've failed at every attempt of it 😞</p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 3042510,
              "author_name": "dc260123",
              "author_url": "",
              "post_date": "2024-11-11T15:09:19.043000",
              "content": "<p>I dont think they are changing the 1 minute restriction and the callback api makes it difficult too. </p>\n<p>My code is in a hobby project state with a lot of comments and todos so I can't share the whole thing without investing a lot of time making a fork and maintaining the public fork: you will most likely run into other problems anyway…</p>\n<p>If you haven't done it already I would suggest to do what the others have suggested too to set up some sort of test calling your predict callback and debug the callback directly instead of through the grpc server or modify their server locally to forward server side error properly back to client.(start with removing the wrapper exception GatewayRuntimeError)</p>\n<p>And no I just brute-forced through it without reference any notebook… Most of my submission are for troubleshooting this. At one point I had to rely on trying to understand if I made some progress if I see \"Submission Scoring Error\" or \"Notebook Threw Exception\" : )</p>\n<p>I understand that to some extend they want to prevent private test set leakage but forwarding an exception type back to us with a limit on the exception's length should be safe and helpful for troubleshooting.</p>",
              "votes": 1,
              "replies": []
            },
            {
              "id": 3042523,
              "author_name": "Jack",
              "author_url": "",
              "post_date": "2024-11-11T15:13:09.453000",
              "content": "<p>I don't get errors. When I say I've failed, I mean my score drops significantly. I'm attempting to incrementally train an xgboost model by specifying the model parameter in the fit method.</p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 3042541,
              "author_name": "dc260123",
              "author_url": "",
              "post_date": "2024-11-11T15:26:50.433000",
              "content": "<p>try run it with online learning on your validation set and print a result each day comparing it with without online learning? </p>\n<p>I only have a theoretical understanding of gradient boosting and am fairly new to kaggle + practical use of boosting libraries but I dont think GB models are good candidates for online learning because they are not trained with SGD. </p>\n<p>The good empirical results we see are generally from training them with the provided algorithm(some sort of full batch gradient descent with GOSS/bagging). If I have to guess I think you can either try to fit the model again with the new data only or a mix of old and new data. </p>\n<p>With only the new data the model does not have enough sample to be refitted properly and if you mix new data with some old data to stabilize the gradient's direction you might overfit the model </p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 3042599,
              "author_name": "Jack",
              "author_url": "",
              "post_date": "2024-11-11T16:03:20.743000",
              "content": "<p><a href=\"https://www.kaggle.com/competitions/optiver-trading-at-the-close/discussion/487446\" target=\"_blank\">https://www.kaggle.com/competitions/optiver-trading-at-the-close/discussion/487446</a><br>\n<a href=\"https://www.kaggle.com/competitions/optiver-trading-at-the-close/discussion/486169\" target=\"_blank\">https://www.kaggle.com/competitions/optiver-trading-at-the-close/discussion/486169</a><br>\nBoth notebooks mention online learning/training for GB models. </p>\n<p>I'll try adjusting the kaggle submission code locally to test OL methods and print with/without OL. Still working on feature engineering anyways. If you don't mind, what dates are you using for local validation? Is your reported CV with your ensemble and OL? Or ensemble without OL?<br>\n\"CV 0.0082<br>\nlb 0.006\"</p>",
              "votes": 0,
              "replies": []
            }
          ]
        }
      ]
    },
    {
      "id": 3021989,
      "author_name": "chumajin",
      "author_url": "",
      "post_date": "2024-10-19T06:20:49.847000",
      "content": "<p>validation period : date_id more over 1577<br>\ncv : 0.006210 , lb : 0.0039</p>",
      "votes": 2,
      "replies": []
    },
    {
      "id": 3070143,
      "author_name": "Xiang Sheng",
      "author_url": "",
      "post_date": "2024-12-12T10:20:36.727000",
      "content": "<p>Hello, do you have any new ideas about the updated LB scores and validation strategy?</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 3037678,
      "author_name": "",
      "author_url": "",
      "post_date": "2024-11-06T01:58:04.957000",
      "content": "",
      "votes": 2,
      "replies": []
    },
    {
      "id": 3037677,
      "author_name": "",
      "author_url": "",
      "post_date": "2024-11-06T01:57:16.337000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 3037162,
      "author_name": "",
      "author_url": "",
      "post_date": "2024-11-05T12:40:55.367000",
      "content": "",
      "votes": 0,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "3019116": "Hello fellow participants,\n\nPlease find this thread for CV and leaderboard relations for starter models. I shall commence with my models insofar from the below public work-\n1. https://www.kaggle.com/code/ravi20076/janestreet2024-baseline-submission-v1\n2. https://www.kaggle.com/datasets/ravi20076/janestreetpublicv1\n3. https://www.kaggle.com/code/ravi20076/janestreet2024-baseline-train-v1 \n\nAll of these are single LGBM models with simple train-test split CV scheme\n\n|Version     |Date          |CV score | LB score|\n| --- | --- | -------------- | ---------------|\n|LGBMV1_1 |15Oct2024|0.007555|  0.0043   |\n|LGBMV1_2|15Oct2024|0.007569|  0.0044  |\n|LGBMV1_4|15Oct2024|0.007882|   0.0043  |\n|LGBMV1_5|15Oct2024|0.007667|   0.0041   |\n|CBV1_2|16Oct2024|0.007734| 0.0039 |\n\n<br>Thoughts? Comments?\n",
    "3028716": "A couple of stupidly simple baseline CVs (based on the last 100 days in the training data):\n\n1. guess 0 for everything, R^2 = 0\n2. use the previous day's responder_6 mean, R^2 = -0.02\n3. use the previous day's responder_6 observation (at each time_id). R^2 = -0.99\n\nThis last one surprised me enough to plot out the metric at different bucket sizes *(time_id has factors [1, 2, 4, 8, 11, 22, 44, 88, 121, 242, 484, 968])*\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F175917%2Fc87d62311c86e6746c1004f85282e4fe%2Fdownload%20(4).png?generation=1729947254771306&alt=media)\n\n- Previous values are anti-predictive. \n- Simple lag-based features based on the target will probably not be useful\n- if in doubt, guess 0 🤣\n\nAn untuned catboost, has a CV of ~0.0075 (at least it's positive).",
    "3049088": "I'm using a single validation split by time right now. Date ids after 1515 (inclusive) are selected as validation so it makes exactly 183 date ids.\n\n|validation          |leaderboard|\n|--------------------|-----------|\n|0.009278876873841768| 0.0043    |\n|0.009420489539111121| 0.0040    |\n|0.009872482483289868| 0.0045    |\n|0.009936407757916044| 0.0044    |\n|0.010493038314628556| 0.0045    |\n|0.01055438183200752 | 0.0046    |\n|0.01062276941316631 | 0.0046    |\n|0.0107125793311309  | 0.0047    |\n|0.01079937669003117 | 0.0047    |\n|0.010810543767857728| 0.0049    |\n|0.010920114827567384| 0.0048    |\n|0.010962342625704502| 0.0049    |\n|0.011066736623069118| 0.0048    |\n\n\nI can say that my validation scores are correlated with leaderboard so far.\nCorrelation Pearson: 0.908436, Spearman: 0.946081\n",
    "3030421": "| model | cv | lb\n| --- | --- | --- |\n| lgb | 0.007869 | 0.0048  |\n| lgb | 0.006137 | 0.0031   |\n| lgb | 0.005106 | 0.0032  |\n| lgb | 0.004907 | 0.0033 |\n| lgb | 0.005246 | 0.0036 |\n|lgb+xgb| 0.007840 | 0.0052 |\n| ridge|0.003261 | 0.0023 |",
    "3019235": "Continuous updates \ndate| model | CV_method|CV_score|LB_score|\n| --- | --- | --- | --- | --- |\n|10/16| Ridge |data 9train_test_split(8:2) |0.0036|0.0026|\n|10/23|Ridge| data 7,8,9 train_test_split(8:2)|0.00489|0.0033|",
    "3028925": "Hi @ravi20076  Great work and thanks for sharing your results.\n\nI noticed that you used symbol_id as feature for model input. I was wondering if it will make a difference when new symbol id is added in the test?",
    "3022196": "| Model        | Test R²   | Leaderboard (LB) Score |\n|--------------|-----------|------------------------|\n| Single LGBM  | 0.0433    | 0.0033                 |\n\n- But I am Confuse about my Test Score , I am using metric from Sk-learn @ravi20076 ",
    "3021989": "validation period : date_id more over 1577\ncv : 0.006210 , lb : 0.0039",
    "3070143": "Hello, do you have any new ideas about the updated LB scores and validation strategy?",
    "3037678": "",
    "3037677": "",
    "3037162": ""
  }
}