回答編集履歴
2
コード修正
test
CHANGED
@@ -18,7 +18,7 @@
|
|
18
18
|
|
19
19
|
outlier_ABCDE = np.stack([outlier_A, outlier_B, outlier_C, outlier_D, outlier_E])
|
20
20
|
|
21
|
-
|
21
|
+
outlier = np.sort(outlier_ABCDE, axis=0)[-1]
|
22
22
|
|
23
23
|
```
|
24
24
|
|
@@ -48,6 +48,6 @@
|
|
48
48
|
|
49
49
|
outlier_ABCDE = np.stack([outlier_A, outlier_B, outlier_C, outlier_D, outlier_E])
|
50
50
|
|
51
|
-
|
51
|
+
outlier = np.diag(outlier_ABCDE[np.argmax(outlier_ABCDE, axis=0)])
|
52
52
|
|
53
53
|
```
|
1
コード修正
test
CHANGED
@@ -21,3 +21,33 @@
|
|
21
21
|
result = np.sort(outlier_ABCDE, axis=0)[-1]
|
22
22
|
|
23
23
|
```
|
24
|
+
|
25
|
+
|
26
|
+
|
27
|
+
または
|
28
|
+
|
29
|
+
|
30
|
+
|
31
|
+
```python
|
32
|
+
|
33
|
+
import numpy as np
|
34
|
+
|
35
|
+
|
36
|
+
|
37
|
+
outlier_A = np.array([0.77, 0.89, 0.68,0.92])
|
38
|
+
|
39
|
+
outlier_B = np.array([0.43, 0.91, 0.03,0.14])
|
40
|
+
|
41
|
+
outlier_C = np.array([0.23, 0.87, 0.66,0.09])
|
42
|
+
|
43
|
+
outlier_D = np.array([0.05, 0.98, 0.24,0.65])
|
44
|
+
|
45
|
+
outlier_E = np.array([0.12, 0.43, 0.29,0.87])
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
outlier_ABCDE = np.stack([outlier_A, outlier_B, outlier_C, outlier_D, outlier_E])
|
50
|
+
|
51
|
+
result = np.diag(outlier_ABCDE[np.argmax(outlier_ABCDE, axis=0)])
|
52
|
+
|
53
|
+
```
|