f64
commited on
Commit
·
7bf3f50
1
Parent(s):
35bfbac
- pages/6_TECT_7_ID.py +1 -1
- static/test.ipynb +53 -53
pages/6_TECT_7_ID.py
CHANGED
|
@@ -116,7 +116,7 @@ if selectedFile is not None:
|
|
| 116 |
xyz = ["X","Y","Z"]
|
| 117 |
df_packs_reshaped = dgID.apply(lambda df: pd.Series(df[xyz].values[::-1].reshape(1,-1)[0])).reset_index()
|
| 118 |
x_test_vect = df_packs_reshaped.iloc[:,1:]
|
| 119 |
-
df_packs_reshaped["Прогноз_V"] = classifier_object.predict(x_test_vect)
|
| 120 |
col2.dataframe(df_packs_reshaped[["ID","Прогноз_V"]], height=620)
|
| 121 |
|
| 122 |
|
|
|
|
| 116 |
xyz = ["X","Y","Z"]
|
| 117 |
df_packs_reshaped = dgID.apply(lambda df: pd.Series(df[xyz].values[::-1].reshape(1,-1)[0])).reset_index()
|
| 118 |
x_test_vect = df_packs_reshaped.iloc[:,1:]
|
| 119 |
+
df_packs_reshaped["Прогноз_V"] = classifier_object.predict(x_test_vect.values)
|
| 120 |
col2.dataframe(df_packs_reshaped[["ID","Прогноз_V"]], height=620)
|
| 121 |
|
| 122 |
|
static/test.ipynb
CHANGED
|
@@ -644,17 +644,17 @@
|
|
| 644 |
},
|
| 645 |
{
|
| 646 |
"cell_type": "code",
|
| 647 |
-
"execution_count":
|
| 648 |
"metadata": {},
|
| 649 |
"outputs": [
|
| 650 |
{
|
| 651 |
"name": "stdout",
|
| 652 |
"output_type": "stream",
|
| 653 |
"text": [
|
| 654 |
-
"[['-
|
| 655 |
-
" '-
|
| 656 |
-
"[['-
|
| 657 |
-
" '-
|
| 658 |
]
|
| 659 |
},
|
| 660 |
{
|
|
@@ -686,70 +686,70 @@
|
|
| 686 |
" </thead>\n",
|
| 687 |
" <tbody>\n",
|
| 688 |
" <tr>\n",
|
| 689 |
-
" <th>
|
| 690 |
-
" <td>
|
| 691 |
-
" <td>-
|
| 692 |
-
" <td>
|
| 693 |
-
" <td
|
| 694 |
" </tr>\n",
|
| 695 |
" <tr>\n",
|
| 696 |
-
" <th>
|
| 697 |
-
" <td>
|
| 698 |
-
" <td>-
|
| 699 |
-
" <td>
|
| 700 |
-
" <td
|
| 701 |
" </tr>\n",
|
| 702 |
" <tr>\n",
|
| 703 |
-
" <th>
|
| 704 |
-
" <td>
|
| 705 |
-
" <td>-
|
| 706 |
-
" <td>
|
| 707 |
-
" <td>-
|
| 708 |
" </tr>\n",
|
| 709 |
" <tr>\n",
|
| 710 |
-
" <th>
|
| 711 |
-
" <td>
|
| 712 |
-
" <td
|
| 713 |
-
" <td>
|
| 714 |
-
" <td>-
|
| 715 |
" </tr>\n",
|
| 716 |
" <tr>\n",
|
| 717 |
-
" <th>
|
| 718 |
-
" <td>
|
| 719 |
-
" <td
|
| 720 |
-
" <td>
|
| 721 |
-
" <td>-
|
| 722 |
" </tr>\n",
|
| 723 |
" <tr>\n",
|
| 724 |
-
" <th>
|
| 725 |
-
" <td>
|
| 726 |
-
" <td>
|
| 727 |
-
" <td>
|
| 728 |
-
" <td>-
|
| 729 |
" </tr>\n",
|
| 730 |
" <tr>\n",
|
| 731 |
-
" <th>
|
| 732 |
-
" <td>
|
| 733 |
-
" <td>-
|
| 734 |
-
" <td>
|
| 735 |
-
" <td>-
|
| 736 |
" </tr>\n",
|
| 737 |
" </tbody>\n",
|
| 738 |
"</table>\n",
|
| 739 |
"</div>"
|
| 740 |
],
|
| 741 |
"text/plain": [
|
| 742 |
-
"
|
| 743 |
-
"
|
| 744 |
-
"
|
| 745 |
-
"
|
| 746 |
-
"
|
| 747 |
-
"
|
| 748 |
-
"
|
| 749 |
-
"
|
| 750 |
]
|
| 751 |
},
|
| 752 |
-
"execution_count":
|
| 753 |
"metadata": {},
|
| 754 |
"output_type": "execute_result"
|
| 755 |
}
|
|
@@ -758,11 +758,11 @@
|
|
| 758 |
"#dgID.apply(lambda df: df.tail(1))\n",
|
| 759 |
"#dgID.apply(lambda df: type(df))\n",
|
| 760 |
"#df2.groupby(\"ID\").apply(lambda df: list(df.columns))\n",
|
| 761 |
-
"dgID.get_group(\"
|
| 762 |
-
"print(dictGroupID[\"
|
| 763 |
-
"print(dictGroupID[\"
|
| 764 |
"\n",
|
| 765 |
-
"dictGroupID[\"
|
| 766 |
"#dgID.indices\n"
|
| 767 |
]
|
| 768 |
},
|
|
|
|
| 644 |
},
|
| 645 |
{
|
| 646 |
"cell_type": "code",
|
| 647 |
+
"execution_count": 32,
|
| 648 |
"metadata": {},
|
| 649 |
"outputs": [
|
| 650 |
{
|
| 651 |
"name": "stdout",
|
| 652 |
"output_type": "stream",
|
| 653 |
"text": [
|
| 654 |
+
"[['-221' '575' '438' '-102' '601' '258' '-220' '561' '-13' '113' '567'\n",
|
| 655 |
+
" '-242' '221' '581' '-249' '222' '598' '-85' '-300' '554' '-130']]\n",
|
| 656 |
+
"[['-300' '554' '-130' '222' '598' '-85' '221' '581' '-249' '113' '567'\n",
|
| 657 |
+
" '-242' '-220' '561' '-13' '-102' '601' '258' '-221' '575' '438']]\n"
|
| 658 |
]
|
| 659 |
},
|
| 660 |
{
|
|
|
|
| 686 |
" </thead>\n",
|
| 687 |
" <tbody>\n",
|
| 688 |
" <tr>\n",
|
| 689 |
+
" <th>113</th>\n",
|
| 690 |
+
" <td>BBB011117</td>\n",
|
| 691 |
+
" <td>-221</td>\n",
|
| 692 |
+
" <td>575</td>\n",
|
| 693 |
+
" <td>438</td>\n",
|
| 694 |
" </tr>\n",
|
| 695 |
" <tr>\n",
|
| 696 |
+
" <th>114</th>\n",
|
| 697 |
+
" <td>BBB011117</td>\n",
|
| 698 |
+
" <td>-102</td>\n",
|
| 699 |
+
" <td>601</td>\n",
|
| 700 |
+
" <td>258</td>\n",
|
| 701 |
" </tr>\n",
|
| 702 |
" <tr>\n",
|
| 703 |
+
" <th>115</th>\n",
|
| 704 |
+
" <td>BBB011117</td>\n",
|
| 705 |
+
" <td>-220</td>\n",
|
| 706 |
+
" <td>561</td>\n",
|
| 707 |
+
" <td>-13</td>\n",
|
| 708 |
" </tr>\n",
|
| 709 |
" <tr>\n",
|
| 710 |
+
" <th>116</th>\n",
|
| 711 |
+
" <td>BBB011117</td>\n",
|
| 712 |
+
" <td>113</td>\n",
|
| 713 |
+
" <td>567</td>\n",
|
| 714 |
+
" <td>-242</td>\n",
|
| 715 |
" </tr>\n",
|
| 716 |
" <tr>\n",
|
| 717 |
+
" <th>117</th>\n",
|
| 718 |
+
" <td>BBB011117</td>\n",
|
| 719 |
+
" <td>221</td>\n",
|
| 720 |
+
" <td>581</td>\n",
|
| 721 |
+
" <td>-249</td>\n",
|
| 722 |
" </tr>\n",
|
| 723 |
" <tr>\n",
|
| 724 |
+
" <th>118</th>\n",
|
| 725 |
+
" <td>BBB011117</td>\n",
|
| 726 |
+
" <td>222</td>\n",
|
| 727 |
+
" <td>598</td>\n",
|
| 728 |
+
" <td>-85</td>\n",
|
| 729 |
" </tr>\n",
|
| 730 |
" <tr>\n",
|
| 731 |
+
" <th>119</th>\n",
|
| 732 |
+
" <td>BBB011117</td>\n",
|
| 733 |
+
" <td>-300</td>\n",
|
| 734 |
+
" <td>554</td>\n",
|
| 735 |
+
" <td>-130</td>\n",
|
| 736 |
" </tr>\n",
|
| 737 |
" </tbody>\n",
|
| 738 |
"</table>\n",
|
| 739 |
"</div>"
|
| 740 |
],
|
| 741 |
"text/plain": [
|
| 742 |
+
" ID X Y Z\n",
|
| 743 |
+
"113 BBB011117 -221 575 438\n",
|
| 744 |
+
"114 BBB011117 -102 601 258\n",
|
| 745 |
+
"115 BBB011117 -220 561 -13\n",
|
| 746 |
+
"116 BBB011117 113 567 -242\n",
|
| 747 |
+
"117 BBB011117 221 581 -249\n",
|
| 748 |
+
"118 BBB011117 222 598 -85\n",
|
| 749 |
+
"119 BBB011117 -300 554 -130"
|
| 750 |
]
|
| 751 |
},
|
| 752 |
+
"execution_count": 32,
|
| 753 |
"metadata": {},
|
| 754 |
"output_type": "execute_result"
|
| 755 |
}
|
|
|
|
| 758 |
"#dgID.apply(lambda df: df.tail(1))\n",
|
| 759 |
"#dgID.apply(lambda df: type(df))\n",
|
| 760 |
"#df2.groupby(\"ID\").apply(lambda df: list(df.columns))\n",
|
| 761 |
+
"dgID.get_group(\"BBB011117\")\n",
|
| 762 |
+
"#print(dictGroupID[\"BBB011117\"][xyz].values.reshape(1,-1))\n",
|
| 763 |
+
"print(dictGroupID[\"BBB011117\"][xyz].values[::-1].reshape(1,-1))\n",
|
| 764 |
"\n",
|
| 765 |
+
"dictGroupID[\"BBB011117\"]\n",
|
| 766 |
"#dgID.indices\n"
|
| 767 |
]
|
| 768 |
},
|