{
  "id": 457864,
  "title": "Don't forget to move the peaks.",
  "url": "/competitions/open-problems-single-cell-perturbations/discussion/457864",
  "author_name": "",
  "post_date": "2023-11-27T08:50:04.286920800Z",
  "votes": 5,
  "comment_count": 2,
  "views": 0,
  "content": "<p>Don't forget to move the peaks.</p>\n<p>For values that are greater than the maximum of Train column (0):<br>\nY = Y + (Y- max(Ycol0))*0.28 </p>\n<p>For min:<br>\nY = Y + (Y- min(Ycol0))*0.28<br>\nRepeat the process for every column between 0 and 18116.</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F4172517%2Fd7f40b50c1ff56253e17da4e2fdbfdda%2FIMG_20231127_114450_1.jpg?generation=1701075336921467&amp;alt=media\" alt=\"\"></p>\n<p>code : <a href=\"https://www.kaggle.com/code/liudacheldieva/submit-only\" target=\"_blank\">https://www.kaggle.com/code/liudacheldieva/submit-only</a><br>\nversion 11</p>\n<pre><code> pandas  pd\nfn = \ndf57d = pd.read_csv(, index_col=)\n\ndf_de_train = pd.read_parquet(fn)\naggs= df_de_train[ (df_de_train.columns)[:]].T[].copy()\naggs = pd.DataFrame(aggs)\ndiff_= pd.DataFrame((df_de_train[ (df_de_train.columns)[:]]  .(axis=) - df_de_train[ (df_de_train.columns)[:]]  .(axis=)))\nmin_= pd.DataFrame(df_de_train[ (df_de_train.columns)[:]]  .(axis=)  )\nmax_= pd.DataFrame(df_de_train[ (df_de_train.columns)[:]]  .(axis=)  )\naggs[]=diff_[]\naggs[]=min_[]\naggs[]=max_[]    \n\n col  (df57d.columns):\n   df[df[col] &gt; aggs.loc[col] [] ] =  df[df[col] &gt; aggs.loc[col] [] ]  + (df[df[col] &gt; aggs.loc[col] [] ]- aggs.loc[col] [])/*\n   df[df[col] &lt; aggs.loc[col] [] ] =  df[df[col] &lt; aggs.loc[col] [] ]  -  ( aggs.loc[col] [] -df[df[col] &lt; aggs.loc[col] [] ])/*\n</code></pre>",
  "messages": [
    {
      "id": "2539662",
      "postDate": "11/27/2023 08:50:04",
      "content": "<p>Don't forget to move the peaks.</p>\n<p>For values that are greater than the maximum of Train column (0):<br>\nY = Y + (Y- max(Ycol0))*0.28 </p>\n<p>For min:<br>\nY = Y + (Y- min(Ycol0))*0.28<br>\nRepeat the process for every column between 0 and 18116.</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F4172517%2Fd7f40b50c1ff56253e17da4e2fdbfdda%2FIMG_20231127_114450_1.jpg?generation=1701075336921467&amp;alt=media\" alt=\"\"></p>\n<p>code : <a href=\"https://www.kaggle.com/code/liudacheldieva/submit-only\" target=\"_blank\">https://www.kaggle.com/code/liudacheldieva/submit-only</a><br>\nversion 11</p>\n<pre><code> pandas  pd\nfn = \ndf57d = pd.read_csv(, index_col=)\n\ndf_de_train = pd.read_parquet(fn)\naggs= df_de_train[ (df_de_train.columns)[:]].T[].copy()\naggs = pd.DataFrame(aggs)\ndiff_= pd.DataFrame((df_de_train[ (df_de_train.columns)[:]]  .(axis=) - df_de_train[ (df_de_train.columns)[:]]  .(axis=)))\nmin_= pd.DataFrame(df_de_train[ (df_de_train.columns)[:]]  .(axis=)  )\nmax_= pd.DataFrame(df_de_train[ (df_de_train.columns)[:]]  .(axis=)  )\naggs[]=diff_[]\naggs[]=min_[]\naggs[]=max_[]    \n\n col  (df57d.columns):\n   df[df[col] &gt; aggs.loc[col] [] ] =  df[df[col] &gt; aggs.loc[col] [] ]  + (df[df[col] &gt; aggs.loc[col] [] ]- aggs.loc[col] [])/*\n   df[df[col] &lt; aggs.loc[col] [] ] =  df[df[col] &lt; aggs.loc[col] [] ]  -  ( aggs.loc[col] [] -df[df[col] &lt; aggs.loc[col] [] ])/*\n</code></pre>",
      "rawMarkdown": "Don't forget to move the peaks.\n\n\n\nFor values that are greater than the maximum of Train column (0):\nY = Y + (Y- max(Ycol0))*0.28 \n\nFor min:\nY = Y + (Y- min(Ycol0))*0.28\nRepeat the process for every column between 0 and 18116.\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F4172517%2Fd7f40b50c1ff56253e17da4e2fdbfdda%2FIMG_20231127_114450_1.jpg?generation=1701075336921467&alt=media)\n\ncode : https://www.kaggle.com/code/liudacheldieva/submit-only\nversion 11\n\n```python\nimport pandas as pd\nfn = '/kaggle/input/open-problems-single-cell-perturbations/de_train.parquet'\ndf57d = pd.read_csv('/kaggle/input/op2-gentle-param-tuner/submission_tsvd50_Ridge_LeaveOneOutEncoderCompoundCellType_blendWithPriors_0.45_0.1MT_tuned.csv', index_col='id')\n\ndf_de_train = pd.read_parquet(fn)# , index_col = 0)\naggs= df_de_train[ list(df_de_train.columns)[5:]].T[0].copy()\naggs = pd.DataFrame(aggs)\ndiff_= pd.DataFrame((df_de_train[ list(df_de_train.columns)[5:]]  .max(axis=0) - df_de_train[ list(df_de_train.columns)[5:]]  .min(axis=0)))\nmin_= pd.DataFrame(df_de_train[ list(df_de_train.columns)[5:]]  .min(axis=0)  )\nmax_= pd.DataFrame(df_de_train[ list(df_de_train.columns)[5:]]  .max(axis=0)  )\naggs['diff']=diff_[0]\naggs['min']=min_[0]\naggs['max']=max_[0]    \n# second moov22\nfor col in list(df57d.columns):\n   df[df[col] > aggs.loc[col] ['max'] ] =  df[df[col] > aggs.loc[col] ['max'] ]  + (df[df[col] > aggs.loc[col] ['max'] ]- aggs.loc[col] ['max'])/100*0.18# 08\n   df[df[col] < aggs.loc[col] ['min'] ] =  df[df[col] < aggs.loc[col] ['min'] ]  - abs ( aggs.loc[col] ['min'] -df[df[col] < aggs.loc[col] ['min'] ])/100*0.18# 08\n\n```",
      "votes": null
    },
    {
      "id": "2539882",
      "postDate": "11/27/2023 11:30:46",
      "content": "<p>It is possible to raise or lower the model for every drug.<br>\nTo determine the distance to move, examine \"minimizing drug RMSE\"'.</p>\n<p>Create a single model for predicting the \"single variable X\" of the drug.</p>\n<pre><code> distance =  single_variable_X \n                   - X_minimized_drug_RMSE\n</code></pre>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F4172517%2Fbe118dda0e76d9807f7dd5dc440a577b%2FIMG_20231127_141llll225.jpg?generation=1701084758977754&amp;alt=media\" alt=\"\"></p>",
      "rawMarkdown": "It is possible to raise or lower the model for every drug.\nTo determine the distance to move, examine \"minimizing drug RMSE\"'.\n\nCreate a single model for predicting the \"single variable X\" of the drug.\n\n```python\n distance =  single_variable_X \n                   - X_minimized_drug_RMSE\n```\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F4172517%2Fbe118dda0e76d9807f7dd5dc440a577b%2FIMG_20231127_141llll225.jpg?generation=1701084758977754&alt=media)",
      "votes": null
    },
    {
      "id": "2543705",
      "postDate": "11/30/2023 10:01:23",
      "content": "<p>You can calculate min and max values column wise and then multiply them by 0.72 and use numpy's clip function finally.  </p>",
      "rawMarkdown": "You can calculate min and max values column wise and then multiply them by 0.72 and use numpy's clip function finally.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 2539882,
      "author_name": "",
      "author_url": "",
      "post_date": "11/27/2023 11:30:46",
      "content": "<p>It is possible to raise or lower the model for every drug.<br>\nTo determine the distance to move, examine \"minimizing drug RMSE\"'.</p>\n<p>Create a single model for predicting the \"single variable X\" of the drug.</p>\n<pre><code> distance =  single_variable_X \n                   - X_minimized_drug_RMSE\n</code></pre>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F4172517%2Fbe118dda0e76d9807f7dd5dc440a577b%2FIMG_20231127_141llll225.jpg?generation=1701084758977754&amp;alt=media\" alt=\"\"></p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 2543705,
      "author_name": "jankowalski2000",
      "author_url": "",
      "post_date": "11/30/2023 10:01:23",
      "content": "<p>You can calculate min and max values column wise and then multiply them by 0.72 and use numpy's clip function finally.  </p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "2539662": "Don't forget to move the peaks.\n\n\n\nFor values that are greater than the maximum of Train column (0):\nY = Y + (Y- max(Ycol0))*0.28 \n\nFor min:\nY = Y + (Y- min(Ycol0))*0.28\nRepeat the process for every column between 0 and 18116.\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F4172517%2Fd7f40b50c1ff56253e17da4e2fdbfdda%2FIMG_20231127_114450_1.jpg?generation=1701075336921467&alt=media)\n\ncode : https://www.kaggle.com/code/liudacheldieva/submit-only\nversion 11\n\n```python\nimport pandas as pd\nfn = '/kaggle/input/open-problems-single-cell-perturbations/de_train.parquet'\ndf57d = pd.read_csv('/kaggle/input/op2-gentle-param-tuner/submission_tsvd50_Ridge_LeaveOneOutEncoderCompoundCellType_blendWithPriors_0.45_0.1MT_tuned.csv', index_col='id')\n\ndf_de_train = pd.read_parquet(fn)# , index_col = 0)\naggs= df_de_train[ list(df_de_train.columns)[5:]].T[0].copy()\naggs = pd.DataFrame(aggs)\ndiff_= pd.DataFrame((df_de_train[ list(df_de_train.columns)[5:]]  .max(axis=0) - df_de_train[ list(df_de_train.columns)[5:]]  .min(axis=0)))\nmin_= pd.DataFrame(df_de_train[ list(df_de_train.columns)[5:]]  .min(axis=0)  )\nmax_= pd.DataFrame(df_de_train[ list(df_de_train.columns)[5:]]  .max(axis=0)  )\naggs['diff']=diff_[0]\naggs['min']=min_[0]\naggs['max']=max_[0]    \n# second moov22\nfor col in list(df57d.columns):\n   df[df[col] > aggs.loc[col] ['max'] ] =  df[df[col] > aggs.loc[col] ['max'] ]  + (df[df[col] > aggs.loc[col] ['max'] ]- aggs.loc[col] ['max'])/100*0.18# 08\n   df[df[col] < aggs.loc[col] ['min'] ] =  df[df[col] < aggs.loc[col] ['min'] ]  - abs ( aggs.loc[col] ['min'] -df[df[col] < aggs.loc[col] ['min'] ])/100*0.18# 08\n\n```",
    "2539882": "It is possible to raise or lower the model for every drug.\nTo determine the distance to move, examine \"minimizing drug RMSE\"'.\n\nCreate a single model for predicting the \"single variable X\" of the drug.\n\n```python\n distance =  single_variable_X \n                   - X_minimized_drug_RMSE\n```\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F4172517%2Fbe118dda0e76d9807f7dd5dc440a577b%2FIMG_20231127_141llll225.jpg?generation=1701084758977754&alt=media)",
    "2543705": "You can calculate min and max values column wise and then multiply them by 0.72 and use numpy's clip function finally."
  },
  "source": "meta"
}