{
  "id": 96171,
  "title": "27th place Solution",
  "url": "/competitions/LANL-Earthquake-Prediction/discussion/96171",
  "author_name": "T.Yoshii",
  "post_date": "2019-06-18T14:49:01.662000",
  "votes": 8,
  "comment_count": 0,
  "views": 0,
  "content": "<h1>27th place Solution</h1>\n\n<p>I show the 27th solution of the LANL Earthquake Prediction competition in \bthis article.</p>\n\n<p>The main reason I write this article is because I wanted to share the findings I got from participating in the competition.</p>\n\n<h2>0. Bad News</h2>\n\n<p>First of all I did not know the discussion of <a href=\"https://www.kaggle.com/c/LANL-Earthquake-Prediction/discussion/90664#latest-535844\">Are data from p4677?</a>\b..</p>\n\n<p>If \bI read this article, I would skip some steps and just perform 4. Make Submission File.</p>\n\n<h2>1. Create and Explore \bthe features</h2>\n\n<p>I referred to other kernels and created some(11,226\b) features for LGBM.</p>\n\n<p>I standardized the \bfeatures with the standard deviation and examined the relationship with the target TTF, then I obtained several findings.</p>\n\n<ul>\n<li><p>Many of the features have a peak at around TTF ~ 0.3[sec], and the value decreases rapidly to TTF: 0 ~ 0.3 [sec], and the value decreases gently at TTF &gt; 0.3[sec] (Fig. 1(left)).</p></li>\n<li><p>Found the layered structure for each segment at TTF &gt; 4[sec] (Fig. 1(left)).</p></li>\n</ul>\n\n<p>From these findings, I thought that many features depend more strongly on the ratio of elapsed time until the next earthquake occurs than the relationship with TTF.</p>\n\n<p>So, I defined the value TTFp(= TTF/(TTF + TSF)) as the ratio of the elapsed time until the next earthquake occurs. Then I obtained clearer results between TTFp and the values of features than the relationship with TTF (Fig. 1 (right)).</p>\n\n<p>|<img src=\"https://i.imgur.com/jTAWQmE.png\" alt=\"Imgur\">\b|\n|:--:|\n|Fig.1 (left)The relationship between TTF and the value of a feature. (right)The relationship between TTFp(= TTF/(TTF + TSF)) and the value of a feature.|</p>\n\n<p>However, on the other hand, I can't found the features that related strongly the seismic intervals (= TTF+TSF).</p>\n\n<p>From this, I gave up calculating accurate TTF and focused on accurate TTFp prediction and \bprivate earthquake interval prediction.</p>\n\n<p>|\b<img src=\"https://i.imgur.com/nMFdiKy.png\" alt=\"Imgur\">|\n|:--:|\n|Fig. 2　Correlation diagram of earthquake interval and the value of certain feature (Calculate the moving standard deviation for the high frequency component of the signal, and calculate its median) for data with TTFp of 0.6 or more and 0.7 or less. Although the value of feature that has the highest correlation with the earthquake interval, it was insufficient to predict the accurate earthquake interval.|</p>\n\n<h2>2. CNN-model</h2>\n\n<p>I used the CNN-model for accurate TTFp prediction.</p>\n\n<p>I prepared the \breduced data($150 \\times 37$ch) which pre-processed(Raw, Rolling-mean, Wavelet-denoise, e.t.c.) the waveform (150,000 data) and binned every 1000 data to calculate statistics(percentile, std, count, e.t.c.) as the input data.</p>\n\n<p>I structure the model as shown in the Fig. 3, and select Adabound (lr = 1e-4, final_lr = 0.1) as the optimizer.</p>\n\n<p>|\b<img src=\"https://i.imgur.com/hvk3Ci9.png\" alt=\"Imgur\">|\n|:--:|\n|Fig. 3 Outline of CNN-model|</p>\n\n<p>I obtained MAE for TTFp\b: 0.112(OOF) with this CNN-model (Fig. 4).</p>\n\n<p>|\b<img src=\"https://i.imgur.com/cfHo3fS.png\" alt=\"Imgur\">|\n|:--:|\n|Fig. 4 (Upside: orange) TTFp prediction with CNN-model(OOF), (Upside: blue) Target TTFp, (Downside: blue) Residual between prediction and target. |</p>\n\n<p>Examined the relationship between the target \bTTFp and the predicted TTFp,\nit was found that the accuracy of predicted TTFp at a segment with a long seismic interval became worse on TTFp:0.5~0.9 (Fig. 5).</p>\n\n<p>|<img src=\"https://i.imgur.com/kHw1RcV.png\" alt=\"Imgur\">|\n|:--:|\n|Fig. 5 (Upper left) \bCorrelation diagram of predicted TTFp with CNN-model and target TTFp. (Lower left) \bCorrelation diagram of predicted TTFp with CNN-model and target TTFp at a segment with a short seismic interval. (Lower right) Correlation diagram of predicted TTFp with CNN-model and target TTFp at a segment with a long seismic interval. The accuracy is not so good at a segment with a long seismic interval on TTFp:0.5~0.9.|</p>\n\n<h2>3. Prediction Private data</h2>\n\n<p>I predicted the earthquake interval of the private data by comparing the distribution of TTFp predicted for each segment with the distribution of TTFp predicted by CNN-model for test data (Fig. 6).</p>\n\n<p>This \bprediction was an unnecessary action if I look at the argument\b　<a href=\"https://www.kaggle.com/c/LANL-Earthquake-Prediction/discussion/90664#latest-535844\">Are data from p4677?</a>\b, but I think that I could show that you could predict Private data to some extent without citing the dissertation.</p>\n\n<p>|<img src=\"https://i.imgur.com/5fdKU2v.png\" alt=\"Imgur\">|\n|:--:|\n|Fig 6. \b\bComparison of \bTTFp frequency of Test data prediction and TTFp frequency of OOF prediction for each segment. \b\b(Upper left)&lt;8sec segment, (Upper mid)~9sec segment, (Upper right)~12sec segment, (Lower left)~14sec segment, (Lower mid)\b&gt;16sec segment, (Lower right)Mixing some Training data segment to fit the distribution of test data. From these results, in the test (private) data, it was estimated that one ~9[sec] segment, one ~12[sec] segment, five ~14[sec] segments, and one &gt;16[sec] segment.|</p>\n\n<h2>4. Make Submission File</h2>\n\n<p>Since most of the earthquake interval of the segment included in Private is about 14 seconds and short and at \bleast \bis about 10 seconds, I decided to exclude the segment with short time interval (7to9 sec) from Training data.</p>\n\n<p>Furthermore, regardless of the model, the predicted maximum TTF was likely to affect the average of the seismic intervals of the segments included in the training data.</p>\n\n<p>Therefore, learning was performed so that the ratio of the time interval of segments included in Test data and the ratio of the interval of segments included in Training data are the same.</p>\n\n<p>The learning performed in two cases using three segments and four segments.</p>\n\n<p>The model used LGBM instead of CNN, as training data were reduced.</p>\n\n<p>|<img src=\"https://i.imgur.com/4Yk4bI9.png\" alt=\"Imgur\">|\n|:---:|\n|Fig 7. \bThe OOF result of learning with \bfour segment. (Upside: orange) TTF prediction with LGBM(OOF), (Upside: blue) Target TTF, (Downside: blue) Residual between prediction and target.|</p>\n\n<p>I selected the \bprediction obtained by these LGBMs as the final submission file.</p>\n\n<p>|Selection|Private Score|Public Score|\n|:--:|:--:|:--:|\n|3 segments| 2.48137| 2.24303|\n|4 segments| 2.41465| 1.89035|</p>\n\n<p>I didn't select other submissions as the final submission files, although the public score was better than the final submission files, but it was not reliable because it did not estimate Private data.</p>",
  "messages": [
    {
      "id": 555165,
      "postDate": "2019-06-18T14:49:01.663Z",
      "content": "<h1>27th place Solution</h1>\n\n<p>I show the 27th solution of the LANL Earthquake Prediction competition in \bthis article.</p>\n\n<p>The main reason I write this article is because I wanted to share the findings I got from participating in the competition.</p>\n\n<h2>0. Bad News</h2>\n\n<p>First of all I did not know the discussion of <a href=\"https://www.kaggle.com/c/LANL-Earthquake-Prediction/discussion/90664#latest-535844\">Are data from p4677?</a>\b..</p>\n\n<p>If \bI read this article, I would skip some steps and just perform 4. Make Submission File.</p>\n\n<h2>1. Create and Explore \bthe features</h2>\n\n<p>I referred to other kernels and created some(11,226\b) features for LGBM.</p>\n\n<p>I standardized the \bfeatures with the standard deviation and examined the relationship with the target TTF, then I obtained several findings.</p>\n\n<ul>\n<li><p>Many of the features have a peak at around TTF ~ 0.3[sec], and the value decreases rapidly to TTF: 0 ~ 0.3 [sec], and the value decreases gently at TTF &gt; 0.3[sec] (Fig. 1(left)).</p></li>\n<li><p>Found the layered structure for each segment at TTF &gt; 4[sec] (Fig. 1(left)).</p></li>\n</ul>\n\n<p>From these findings, I thought that many features depend more strongly on the ratio of elapsed time until the next earthquake occurs than the relationship with TTF.</p>\n\n<p>So, I defined the value TTFp(= TTF/(TTF + TSF)) as the ratio of the elapsed time until the next earthquake occurs. Then I obtained clearer results between TTFp and the values of features than the relationship with TTF (Fig. 1 (right)).</p>\n\n<p>|<img src=\"https://i.imgur.com/jTAWQmE.png\" alt=\"Imgur\">\b|\n|:--:|\n|Fig.1 (left)The relationship between TTF and the value of a feature. (right)The relationship between TTFp(= TTF/(TTF + TSF)) and the value of a feature.|</p>\n\n<p>However, on the other hand, I can't found the features that related strongly the seismic intervals (= TTF+TSF).</p>\n\n<p>From this, I gave up calculating accurate TTF and focused on accurate TTFp prediction and \bprivate earthquake interval prediction.</p>\n\n<p>|\b<img src=\"https://i.imgur.com/nMFdiKy.png\" alt=\"Imgur\">|\n|:--:|\n|Fig. 2　Correlation diagram of earthquake interval and the value of certain feature (Calculate the moving standard deviation for the high frequency component of the signal, and calculate its median) for data with TTFp of 0.6 or more and 0.7 or less. Although the value of feature that has the highest correlation with the earthquake interval, it was insufficient to predict the accurate earthquake interval.|</p>\n\n<h2>2. CNN-model</h2>\n\n<p>I used the CNN-model for accurate TTFp prediction.</p>\n\n<p>I prepared the \breduced data($150 \\times 37$ch) which pre-processed(Raw, Rolling-mean, Wavelet-denoise, e.t.c.) the waveform (150,000 data) and binned every 1000 data to calculate statistics(percentile, std, count, e.t.c.) as the input data.</p>\n\n<p>I structure the model as shown in the Fig. 3, and select Adabound (lr = 1e-4, final_lr = 0.1) as the optimizer.</p>\n\n<p>|\b<img src=\"https://i.imgur.com/hvk3Ci9.png\" alt=\"Imgur\">|\n|:--:|\n|Fig. 3 Outline of CNN-model|</p>\n\n<p>I obtained MAE for TTFp\b: 0.112(OOF) with this CNN-model (Fig. 4).</p>\n\n<p>|\b<img src=\"https://i.imgur.com/cfHo3fS.png\" alt=\"Imgur\">|\n|:--:|\n|Fig. 4 (Upside: orange) TTFp prediction with CNN-model(OOF), (Upside: blue) Target TTFp, (Downside: blue) Residual between prediction and target. |</p>\n\n<p>Examined the relationship between the target \bTTFp and the predicted TTFp,\nit was found that the accuracy of predicted TTFp at a segment with a long seismic interval became worse on TTFp:0.5~0.9 (Fig. 5).</p>\n\n<p>|<img src=\"https://i.imgur.com/kHw1RcV.png\" alt=\"Imgur\">|\n|:--:|\n|Fig. 5 (Upper left) \bCorrelation diagram of predicted TTFp with CNN-model and target TTFp. (Lower left) \bCorrelation diagram of predicted TTFp with CNN-model and target TTFp at a segment with a short seismic interval. (Lower right) Correlation diagram of predicted TTFp with CNN-model and target TTFp at a segment with a long seismic interval. The accuracy is not so good at a segment with a long seismic interval on TTFp:0.5~0.9.|</p>\n\n<h2>3. Prediction Private data</h2>\n\n<p>I predicted the earthquake interval of the private data by comparing the distribution of TTFp predicted for each segment with the distribution of TTFp predicted by CNN-model for test data (Fig. 6).</p>\n\n<p>This \bprediction was an unnecessary action if I look at the argument\b　<a href=\"https://www.kaggle.com/c/LANL-Earthquake-Prediction/discussion/90664#latest-535844\">Are data from p4677?</a>\b, but I think that I could show that you could predict Private data to some extent without citing the dissertation.</p>\n\n<p>|<img src=\"https://i.imgur.com/5fdKU2v.png\" alt=\"Imgur\">|\n|:--:|\n|Fig 6. \b\bComparison of \bTTFp frequency of Test data prediction and TTFp frequency of OOF prediction for each segment. \b\b(Upper left)&lt;8sec segment, (Upper mid)~9sec segment, (Upper right)~12sec segment, (Lower left)~14sec segment, (Lower mid)\b&gt;16sec segment, (Lower right)Mixing some Training data segment to fit the distribution of test data. From these results, in the test (private) data, it was estimated that one ~9[sec] segment, one ~12[sec] segment, five ~14[sec] segments, and one &gt;16[sec] segment.|</p>\n\n<h2>4. Make Submission File</h2>\n\n<p>Since most of the earthquake interval of the segment included in Private is about 14 seconds and short and at \bleast \bis about 10 seconds, I decided to exclude the segment with short time interval (7to9 sec) from Training data.</p>\n\n<p>Furthermore, regardless of the model, the predicted maximum TTF was likely to affect the average of the seismic intervals of the segments included in the training data.</p>\n\n<p>Therefore, learning was performed so that the ratio of the time interval of segments included in Test data and the ratio of the interval of segments included in Training data are the same.</p>\n\n<p>The learning performed in two cases using three segments and four segments.</p>\n\n<p>The model used LGBM instead of CNN, as training data were reduced.</p>\n\n<p>|<img src=\"https://i.imgur.com/4Yk4bI9.png\" alt=\"Imgur\">|\n|:---:|\n|Fig 7. \bThe OOF result of learning with \bfour segment. (Upside: orange) TTF prediction with LGBM(OOF), (Upside: blue) Target TTF, (Downside: blue) Residual between prediction and target.|</p>\n\n<p>I selected the \bprediction obtained by these LGBMs as the final submission file.</p>\n\n<p>|Selection|Private Score|Public Score|\n|:--:|:--:|:--:|\n|3 segments| 2.48137| 2.24303|\n|4 segments| 2.41465| 1.89035|</p>\n\n<p>I didn't select other submissions as the final submission files, although the public score was better than the final submission files, but it was not reliable because it did not estimate Private data.</p>",
      "rawMarkdown": "# 27th place Solution\nI show the 27th solution of the LANL Earthquake Prediction competition in \bthis article.\n\nThe main reason I write this article is because I wanted to share the findings I got from participating in the competition.\n\n\n## 0. Bad News\nFirst of all I did not know the discussion of [Are data from p4677?](https://www.kaggle.com/c/LANL-Earthquake-Prediction/discussion/90664#latest-535844)\b..\n\nIf \bI read this article, I would skip some steps and just perform 4. Make Submission File.\n\n\n## 1. Create and Explore \bthe features\nI referred to other kernels and created some(11,226\b) features for LGBM.\n\nI standardized the \bfeatures with the standard deviation and examined the relationship with the target TTF, then I obtained several findings.\n\n- Many of the features have a peak at around TTF ~ 0.3[sec], and the value decreases rapidly to TTF: 0 ~ 0.3 [sec], and the value decreases gently at TTF &gt; 0.3[sec] (Fig. 1(left)).\n\n- Found the layered structure for each segment at TTF &gt; 4[sec] (Fig. 1(left)).\n\nFrom these findings, I thought that many features depend more strongly on the ratio of elapsed time until the next earthquake occurs than the relationship with TTF.\n\nSo, I defined the value TTFp(= TTF/(TTF + TSF)) as the ratio of the elapsed time until the next earthquake occurs. Then I obtained clearer results between TTFp and the values of features than the relationship with TTF (Fig. 1 (right)).\n\n|![Imgur](https://i.imgur.com/jTAWQmE.png)\b|\n|:--:|\n|Fig.1 (left)The relationship between TTF and the value of a feature. (right)The relationship between TTFp(= TTF/(TTF + TSF)) and the value of a feature.|\n\nHowever, on the other hand, I can't found the features that related strongly the seismic intervals (= TTF+TSF).\n\nFrom this, I gave up calculating accurate TTF and focused on accurate TTFp prediction and \bprivate earthquake interval prediction.\n\n|\b![Imgur](https://i.imgur.com/nMFdiKy.png)|\n|:--:|\n|Fig. 2　Correlation diagram of earthquake interval and the value of certain feature (Calculate the moving standard deviation for the high frequency component of the signal, and calculate its median) for data with TTFp of 0.6 or more and 0.7 or less. Although the value of feature that has the highest correlation with the earthquake interval, it was insufficient to predict the accurate earthquake interval.|\n\n## 2. CNN-model\nI used the CNN-model for accurate TTFp prediction.\n\nI prepared the \breduced data($150 \\times 37$ch) which pre-processed(Raw, Rolling-mean, Wavelet-denoise, e.t.c.) the waveform (150,000 data) and binned every 1000 data to calculate statistics(percentile, std, count, e.t.c.) as the input data.\n\nI structure the model as shown in the Fig. 3, and select Adabound (lr = 1e-4, final_lr = 0.1) as the optimizer.\n\n\n|\b![Imgur](https://i.imgur.com/hvk3Ci9.png)|\n|:--:|\n|Fig. 3 Outline of CNN-model|\n\nI obtained MAE for TTFp\b: 0.112(OOF) with this CNN-model (Fig. 4).\n\n|\b![Imgur](https://i.imgur.com/cfHo3fS.png)|\n|:--:|\n|Fig. 4 (Upside: orange) TTFp prediction with CNN-model(OOF), (Upside: blue) Target TTFp, (Downside: blue) Residual between prediction and target. |\n\nExamined the relationship between the target \bTTFp and the predicted TTFp,\nit was found that the accuracy of predicted TTFp at a segment with a long seismic interval became worse on TTFp:0.5~0.9 (Fig. 5).\n\n|![Imgur](https://i.imgur.com/kHw1RcV.png)|\n|:--:|\n|Fig. 5 (Upper left) \bCorrelation diagram of predicted TTFp with CNN-model and target TTFp. (Lower left) \bCorrelation diagram of predicted TTFp with CNN-model and target TTFp at a segment with a short seismic interval. (Lower right) Correlation diagram of predicted TTFp with CNN-model and target TTFp at a segment with a long seismic interval. The accuracy is not so good at a segment with a long seismic interval on TTFp:0.5~0.9.|\n\n## 3. Prediction Private data\nI predicted the earthquake interval of the private data by comparing the distribution of TTFp predicted for each segment with the distribution of TTFp predicted by CNN-model for test data (Fig. 6).\n\nThis \bprediction was an unnecessary action if I look at the argument\b　[Are data from p4677?](https://www.kaggle.com/c/LANL-Earthquake-Prediction/discussion/90664#latest-535844)\b, but I think that I could show that you could predict Private data to some extent without citing the dissertation.\n\n|![Imgur](https://i.imgur.com/5fdKU2v.png)|\n|:--:|\n|Fig 6. \b\bComparison of \bTTFp frequency of Test data prediction and TTFp frequency of OOF prediction for each segment. \b\b(Upper left)&lt;8sec segment, (Upper mid)~9sec segment, (Upper right)~12sec segment, (Lower left)~14sec segment, (Lower mid)\b&gt;16sec segment, (Lower right)Mixing some Training data segment to fit the distribution of test data. From these results, in the test (private) data, it was estimated that one ~9[sec] segment, one ~12[sec] segment, five ~14[sec] segments, and one &gt;16[sec] segment.|\n\n## 4. Make Submission File\nSince most of the earthquake interval of the segment included in Private is about 14 seconds and short and at \bleast \bis about 10 seconds, I decided to exclude the segment with short time interval (7to9 sec) from Training data.\n\nFurthermore, regardless of the model, the predicted maximum TTF was likely to affect the average of the seismic intervals of the segments included in the training data.\n\nTherefore, learning was performed so that the ratio of the time interval of segments included in Test data and the ratio of the interval of segments included in Training data are the same.\n\nThe learning performed in two cases using three segments and four segments.\n\nThe model used LGBM instead of CNN, as training data were reduced.\n\n|![Imgur](https://i.imgur.com/4Yk4bI9.png)|\n|:---:|\n|Fig 7. \bThe OOF result of learning with \bfour segment. (Upside: orange) TTF prediction with LGBM(OOF), (Upside: blue) Target TTF, (Downside: blue) Residual between prediction and target.|\n\nI selected the \bprediction obtained by these LGBMs as the final submission file.\n\n|Selection|Private Score|Public Score|\n|:--:|:--:|:--:|\n|3 segments| 2.48137| 2.24303|\n|4 segments| 2.41465| 1.89035|\n\nI didn't select other submissions as the final submission files, although the public score was better than the final submission files, but it was not reliable because it did not estimate Private data.",
      "votes": 8
    }
  ],
  "comments": [],
  "raw_markdown_by_id": {
    "555165": "# 27th place Solution\nI show the 27th solution of the LANL Earthquake Prediction competition in \bthis article.\n\nThe main reason I write this article is because I wanted to share the findings I got from participating in the competition.\n\n\n## 0. Bad News\nFirst of all I did not know the discussion of [Are data from p4677?](https://www.kaggle.com/c/LANL-Earthquake-Prediction/discussion/90664#latest-535844)\b..\n\nIf \bI read this article, I would skip some steps and just perform 4. Make Submission File.\n\n\n## 1. Create and Explore \bthe features\nI referred to other kernels and created some(11,226\b) features for LGBM.\n\nI standardized the \bfeatures with the standard deviation and examined the relationship with the target TTF, then I obtained several findings.\n\n- Many of the features have a peak at around TTF ~ 0.3[sec], and the value decreases rapidly to TTF: 0 ~ 0.3 [sec], and the value decreases gently at TTF &gt; 0.3[sec] (Fig. 1(left)).\n\n- Found the layered structure for each segment at TTF &gt; 4[sec] (Fig. 1(left)).\n\nFrom these findings, I thought that many features depend more strongly on the ratio of elapsed time until the next earthquake occurs than the relationship with TTF.\n\nSo, I defined the value TTFp(= TTF/(TTF + TSF)) as the ratio of the elapsed time until the next earthquake occurs. Then I obtained clearer results between TTFp and the values of features than the relationship with TTF (Fig. 1 (right)).\n\n|![Imgur](https://i.imgur.com/jTAWQmE.png)\b|\n|:--:|\n|Fig.1 (left)The relationship between TTF and the value of a feature. (right)The relationship between TTFp(= TTF/(TTF + TSF)) and the value of a feature.|\n\nHowever, on the other hand, I can't found the features that related strongly the seismic intervals (= TTF+TSF).\n\nFrom this, I gave up calculating accurate TTF and focused on accurate TTFp prediction and \bprivate earthquake interval prediction.\n\n|\b![Imgur](https://i.imgur.com/nMFdiKy.png)|\n|:--:|\n|Fig. 2　Correlation diagram of earthquake interval and the value of certain feature (Calculate the moving standard deviation for the high frequency component of the signal, and calculate its median) for data with TTFp of 0.6 or more and 0.7 or less. Although the value of feature that has the highest correlation with the earthquake interval, it was insufficient to predict the accurate earthquake interval.|\n\n## 2. CNN-model\nI used the CNN-model for accurate TTFp prediction.\n\nI prepared the \breduced data($150 \\times 37$ch) which pre-processed(Raw, Rolling-mean, Wavelet-denoise, e.t.c.) the waveform (150,000 data) and binned every 1000 data to calculate statistics(percentile, std, count, e.t.c.) as the input data.\n\nI structure the model as shown in the Fig. 3, and select Adabound (lr = 1e-4, final_lr = 0.1) as the optimizer.\n\n\n|\b![Imgur](https://i.imgur.com/hvk3Ci9.png)|\n|:--:|\n|Fig. 3 Outline of CNN-model|\n\nI obtained MAE for TTFp\b: 0.112(OOF) with this CNN-model (Fig. 4).\n\n|\b![Imgur](https://i.imgur.com/cfHo3fS.png)|\n|:--:|\n|Fig. 4 (Upside: orange) TTFp prediction with CNN-model(OOF), (Upside: blue) Target TTFp, (Downside: blue) Residual between prediction and target. |\n\nExamined the relationship between the target \bTTFp and the predicted TTFp,\nit was found that the accuracy of predicted TTFp at a segment with a long seismic interval became worse on TTFp:0.5~0.9 (Fig. 5).\n\n|![Imgur](https://i.imgur.com/kHw1RcV.png)|\n|:--:|\n|Fig. 5 (Upper left) \bCorrelation diagram of predicted TTFp with CNN-model and target TTFp. (Lower left) \bCorrelation diagram of predicted TTFp with CNN-model and target TTFp at a segment with a short seismic interval. (Lower right) Correlation diagram of predicted TTFp with CNN-model and target TTFp at a segment with a long seismic interval. The accuracy is not so good at a segment with a long seismic interval on TTFp:0.5~0.9.|\n\n## 3. Prediction Private data\nI predicted the earthquake interval of the private data by comparing the distribution of TTFp predicted for each segment with the distribution of TTFp predicted by CNN-model for test data (Fig. 6).\n\nThis \bprediction was an unnecessary action if I look at the argument\b　[Are data from p4677?](https://www.kaggle.com/c/LANL-Earthquake-Prediction/discussion/90664#latest-535844)\b, but I think that I could show that you could predict Private data to some extent without citing the dissertation.\n\n|![Imgur](https://i.imgur.com/5fdKU2v.png)|\n|:--:|\n|Fig 6. \b\bComparison of \bTTFp frequency of Test data prediction and TTFp frequency of OOF prediction for each segment. \b\b(Upper left)&lt;8sec segment, (Upper mid)~9sec segment, (Upper right)~12sec segment, (Lower left)~14sec segment, (Lower mid)\b&gt;16sec segment, (Lower right)Mixing some Training data segment to fit the distribution of test data. From these results, in the test (private) data, it was estimated that one ~9[sec] segment, one ~12[sec] segment, five ~14[sec] segments, and one &gt;16[sec] segment.|\n\n## 4. Make Submission File\nSince most of the earthquake interval of the segment included in Private is about 14 seconds and short and at \bleast \bis about 10 seconds, I decided to exclude the segment with short time interval (7to9 sec) from Training data.\n\nFurthermore, regardless of the model, the predicted maximum TTF was likely to affect the average of the seismic intervals of the segments included in the training data.\n\nTherefore, learning was performed so that the ratio of the time interval of segments included in Test data and the ratio of the interval of segments included in Training data are the same.\n\nThe learning performed in two cases using three segments and four segments.\n\nThe model used LGBM instead of CNN, as training data were reduced.\n\n|![Imgur](https://i.imgur.com/4Yk4bI9.png)|\n|:---:|\n|Fig 7. \bThe OOF result of learning with \bfour segment. (Upside: orange) TTF prediction with LGBM(OOF), (Upside: blue) Target TTF, (Downside: blue) Residual between prediction and target.|\n\nI selected the \bprediction obtained by these LGBMs as the final submission file.\n\n|Selection|Private Score|Public Score|\n|:--:|:--:|:--:|\n|3 segments| 2.48137| 2.24303|\n|4 segments| 2.41465| 1.89035|\n\nI didn't select other submissions as the final submission files, although the public score was better than the final submission files, but it was not reliable because it did not estimate Private data."
  }
}