{
  "id": 209534,
  "title": "Private 6th Public 4th rank solution (Github link)",
  "url": "/competitions/predict-volcanic-eruptions-ingv-oe/writeups/alexandre-blanchet-private-6th-public-4th-rank-sol",
  "author_name": "",
  "post_date": "2021-01-08T12:31:30.433Z",
  "votes": 11,
  "comment_count": 2,
  "views": 0,
  "content": "<p>First, I would like to thank the National Institute of Geophysics and Volcanology and Kaggle for hosting this competition. I have learned a lot. Congratulations to the winner and to all the participants.<br>\nThe source code can be found on my github here:<br>\n<a href=\"https://github.com/Haha89/INGV-eruption-prediction\" target=\"_blank\">https://github.com/Haha89/INGV-eruption-prediction</a></p>\n<p>My solution is inspired by this notebook <a href=\"https://www.kaggle.com/dkaraflos/1-geomean-nn-and-6featlgbm-2-259-private-lb\" target=\"_blank\">https://www.kaggle.com/dkaraflos/1-geomean-nn-and-6featlgbm-2-259-private-lb</a>, dealing with earthquake prediction.</p>\n<p>The workflow is divided into the following parts:</p>\n<ul>\n<li>Feature engineering</li>\n<li>Presentation of the model i used</li>\n</ul>\n<h2>Feature engineering</h2>\n<p>The objective is to add information about the temporal series to characterize them. The list below is not exhaustive but i calculated for each of the 10 segments:</p>\n<ul>\n<li>Temporal characteristics:<br>\nmean, var, amplitude, quantiles, rolling gradient amplitude, number of peaks (using tsfresh), autocorrelation, zeros-cross rate</li>\n<li>Frequential features: mean/var/amplitude of imaginary and real parts of Fourier Transform.</li>\n<li>Cepstral features: Mel-frequency cepstral coefficients (20 coeff)</li>\n<li>Spectral features: the spectral_contrast (7 coefficients)</li>\n</ul>\n<p>All these features were calculated for each sensor (missing values set to -1) and saved as csv locally (90min to run for train + test sets).</p>\n<h2>Deep learning model</h2>\n<p>The model I used contains a LSTM layer followed by 3 Conv1D layers (param 128, 84, 64). Then a flattening operation allows to send the data in 3 Dense layers (fully connected) (size 64, 32 and 1). Only ReLu activation function is used.<br>\nThe optimizer is Nadam with a learning rate of 5e-3, the loss is the MAE.</p>\n<p>8 models trained of subsets of the training sets were averaged to give the final submission.</p>\n<p>Hope this summary was useful, please comment below if you want additional information.<br>\nAlex</p>",
  "messages": [
    {
      "id": "1143289",
      "postDate": "01/07/2021 20:34:54",
      "content": "<p>First, I would like to thank the National Institute of Geophysics and Volcanology and Kaggle for hosting this competition. I have learned a lot. Congratulations to the winner and to all the participants.<br>\nThe source code can be found on my github here:<br>\n<a href=\"https://github.com/Haha89/INGV-eruption-prediction\" target=\"_blank\">https://github.com/Haha89/INGV-eruption-prediction</a></p>\n<p>My solution is inspired by this notebook <a href=\"https://www.kaggle.com/dkaraflos/1-geomean-nn-and-6featlgbm-2-259-private-lb\" target=\"_blank\">https://www.kaggle.com/dkaraflos/1-geomean-nn-and-6featlgbm-2-259-private-lb</a>, dealing with earthquake prediction.</p>\n<p>The workflow is divided into the following parts:</p>\n<ul>\n<li>Feature engineering</li>\n<li>Presentation of the model i used</li>\n</ul>\n<h2>Feature engineering</h2>\n<p>The objective is to add information about the temporal series to characterize them. The list below is not exhaustive but i calculated for each of the 10 segments:</p>\n<ul>\n<li>Temporal characteristics:<br>\nmean, var, amplitude, quantiles, rolling gradient amplitude, number of peaks (using tsfresh), autocorrelation, zeros-cross rate</li>\n<li>Frequential features: mean/var/amplitude of imaginary and real parts of Fourier Transform.</li>\n<li>Cepstral features: Mel-frequency cepstral coefficients (20 coeff)</li>\n<li>Spectral features: the spectral_contrast (7 coefficients)</li>\n</ul>\n<p>All these features were calculated for each sensor (missing values set to -1) and saved as csv locally (90min to run for train + test sets).</p>\n<h2>Deep learning model</h2>\n<p>The model I used contains a LSTM layer followed by 3 Conv1D layers (param 128, 84, 64). Then a flattening operation allows to send the data in 3 Dense layers (fully connected) (size 64, 32 and 1). Only ReLu activation function is used.<br>\nThe optimizer is Nadam with a learning rate of 5e-3, the loss is the MAE.</p>\n<p>8 models trained of subsets of the training sets were averaged to give the final submission.</p>\n<p>Hope this summary was useful, please comment below if you want additional information.<br>\nAlex</p>",
      "rawMarkdown": "First, I would like to thank the National Institute of Geophysics and Volcanology and Kaggle for hosting this competition. I have learned a lot. Congratulations to the winner and to all the participants.\nThe source code can be found on my github here:\nhttps://github.com/Haha89/INGV-eruption-prediction\n\nMy solution is inspired by this notebook https://www.kaggle.com/dkaraflos/1-geomean-nn-and-6featlgbm-2-259-private-lb, dealing with earthquake prediction.\n\nThe workflow is divided into the following parts:\n- Feature engineering\n- Presentation of the model i used\n\n## Feature engineering\n \nThe objective is to add information about the temporal series to characterize them. The list below is not exhaustive but i calculated for each of the 10 segments:\n- Temporal characteristics:\nmean, var, amplitude, quantiles, rolling gradient amplitude, number of peaks (using tsfresh), autocorrelation, zeros-cross rate\n- Frequential features: mean/var/amplitude of imaginary and real parts of Fourier Transform.\n- Cepstral features: Mel-frequency cepstral coefficients (20 coeff)\n- Spectral features: the spectral_contrast (7 coefficients)\n\nAll these features were calculated for each sensor (missing values set to -1) and saved as csv locally (90min to run for train + test sets).\n\n## Deep learning model\nThe model I used contains a LSTM layer followed by 3 Conv1D layers (param 128, 84, 64). Then a flattening operation allows to send the data in 3 Dense layers (fully connected) (size 64, 32 and 1). Only ReLu activation function is used.\nThe optimizer is Nadam with a learning rate of 5e-3, the loss is the MAE.\n\n8 models trained of subsets of the training sets were averaged to give the final submission.\n\nHope this summary was useful, please comment below if you want additional information.\nAlex",
      "votes": null
    },
    {
      "id": "1144335",
      "postDate": "01/08/2021 12:02:47",
      "content": "<p>Congrats, thank you for sharing! How many features did you use in the NN model? Did you do any feature selection?</p>",
      "rawMarkdown": "Congrats, thank you for sharing! How many features did you use in the NN model? Did you do any feature selection?",
      "votes": null
    },
    {
      "id": "1144343",
      "postDate": "01/08/2021 12:08:05",
      "content": "<p>Hi, i extract 53 features per segment so 530 features feed the NN. No feature selection was done.</p>",
      "rawMarkdown": "Hi, i extract 53 features per segment so 530 features feed the NN. No feature selection was done.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1144335,
      "author_name": "leventelippenszky",
      "author_url": "",
      "post_date": "01/08/2021 12:02:47",
      "content": "<p>Congrats, thank you for sharing! How many features did you use in the NN model? Did you do any feature selection?</p>",
      "votes": null,
      "replies": [
        {
          "id": 1144343,
          "author_name": "haha89",
          "author_url": "",
          "post_date": "01/08/2021 12:08:05",
          "content": "<p>Hi, i extract 53 features per segment so 530 features feed the NN. No feature selection was done.</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "1143289": "First, I would like to thank the National Institute of Geophysics and Volcanology and Kaggle for hosting this competition. I have learned a lot. Congratulations to the winner and to all the participants.\nThe source code can be found on my github here:\nhttps://github.com/Haha89/INGV-eruption-prediction\n\nMy solution is inspired by this notebook https://www.kaggle.com/dkaraflos/1-geomean-nn-and-6featlgbm-2-259-private-lb, dealing with earthquake prediction.\n\nThe workflow is divided into the following parts:\n- Feature engineering\n- Presentation of the model i used\n\n## Feature engineering\n \nThe objective is to add information about the temporal series to characterize them. The list below is not exhaustive but i calculated for each of the 10 segments:\n- Temporal characteristics:\nmean, var, amplitude, quantiles, rolling gradient amplitude, number of peaks (using tsfresh), autocorrelation, zeros-cross rate\n- Frequential features: mean/var/amplitude of imaginary and real parts of Fourier Transform.\n- Cepstral features: Mel-frequency cepstral coefficients (20 coeff)\n- Spectral features: the spectral_contrast (7 coefficients)\n\nAll these features were calculated for each sensor (missing values set to -1) and saved as csv locally (90min to run for train + test sets).\n\n## Deep learning model\nThe model I used contains a LSTM layer followed by 3 Conv1D layers (param 128, 84, 64). Then a flattening operation allows to send the data in 3 Dense layers (fully connected) (size 64, 32 and 1). Only ReLu activation function is used.\nThe optimizer is Nadam with a learning rate of 5e-3, the loss is the MAE.\n\n8 models trained of subsets of the training sets were averaged to give the final submission.\n\nHope this summary was useful, please comment below if you want additional information.\nAlex",
    "1144335": "Congrats, thank you for sharing! How many features did you use in the NN model? Did you do any feature selection?",
    "1144343": "Hi, i extract 53 features per segment so 530 features feed the NN. No feature selection was done."
  },
  "source": "meta"
}