f64 commited on
Commit
7bf3f50
·
1 Parent(s): 35bfbac
Files changed (2) hide show
  1. pages/6_TECT_7_ID.py +1 -1
  2. 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": 26,
648
  "metadata": {},
649
  "outputs": [
650
  {
651
  "name": "stdout",
652
  "output_type": "stream",
653
  "text": [
654
- "[['-210' '529' '-943' '102' '578' '-830' '-221' '577' '-859' '-211' '579'\n",
655
- " '-752' '-122' '636' '-592' '-21' '602' '-558' '-200' '573' '-505']]\n",
656
- "[['-200' '573' '-505' '-21' '602' '-558' '-122' '636' '-592' '-211' '579'\n",
657
- " '-752' '-221' '577' '-859' '102' '578' '-830' '-210' '529' '-943']]\n"
658
  ]
659
  },
660
  {
@@ -686,70 +686,70 @@
686
  " </thead>\n",
687
  " <tbody>\n",
688
  " <tr>\n",
689
- " <th>73</th>\n",
690
- " <td>BBB011112</td>\n",
691
- " <td>-200</td>\n",
692
- " <td>573</td>\n",
693
- " <td>-505</td>\n",
694
  " </tr>\n",
695
  " <tr>\n",
696
- " <th>74</th>\n",
697
- " <td>BBB011112</td>\n",
698
- " <td>-21</td>\n",
699
- " <td>602</td>\n",
700
- " <td>-558</td>\n",
701
  " </tr>\n",
702
  " <tr>\n",
703
- " <th>75</th>\n",
704
- " <td>BBB011112</td>\n",
705
- " <td>-122</td>\n",
706
- " <td>636</td>\n",
707
- " <td>-592</td>\n",
708
  " </tr>\n",
709
  " <tr>\n",
710
- " <th>76</th>\n",
711
- " <td>BBB011112</td>\n",
712
- " <td>-211</td>\n",
713
- " <td>579</td>\n",
714
- " <td>-752</td>\n",
715
  " </tr>\n",
716
  " <tr>\n",
717
- " <th>77</th>\n",
718
- " <td>BBB011112</td>\n",
719
- " <td>-221</td>\n",
720
- " <td>577</td>\n",
721
- " <td>-859</td>\n",
722
  " </tr>\n",
723
  " <tr>\n",
724
- " <th>78</th>\n",
725
- " <td>BBB011112</td>\n",
726
- " <td>102</td>\n",
727
- " <td>578</td>\n",
728
- " <td>-830</td>\n",
729
  " </tr>\n",
730
  " <tr>\n",
731
- " <th>79</th>\n",
732
- " <td>BBB011112</td>\n",
733
- " <td>-210</td>\n",
734
- " <td>529</td>\n",
735
- " <td>-943</td>\n",
736
  " </tr>\n",
737
  " </tbody>\n",
738
  "</table>\n",
739
  "</div>"
740
  ],
741
  "text/plain": [
742
- " ID X Y Z\n",
743
- "73 BBB011112 -200 573 -505\n",
744
- "74 BBB011112 -21 602 -558\n",
745
- "75 BBB011112 -122 636 -592\n",
746
- "76 BBB011112 -211 579 -752\n",
747
- "77 BBB011112 -221 577 -859\n",
748
- "78 BBB011112 102 578 -830\n",
749
- "79 BBB011112 -210 529 -943"
750
  ]
751
  },
752
- "execution_count": 26,
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(\"BBB011112\")\n",
762
- "print(dictGroupID[\"BBB011112\"][xyz].values.reshape(1,-1))\n",
763
- "print(dictGroupID[\"BBB011112\"][xyz].values[::-1].reshape(1,-1))\n",
764
  "\n",
765
- "dictGroupID[\"BBB011112\"]\n",
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
  },