Вы находитесь на странице: 1из 10

# 4

4.1.
4.1.1.
:
( ).
( -).
, ,
.
: .
, .

4.1.2.
, :
`

1X
2
M SE(a, X) =
(a(xi ) yi ) .
` i=1
, , , .
, .
, , .
, , .

4.1.3.
:
`

1X
M AE(a, X) =
|a(xi ) yi | .
` i=1
, .
, .

4.1.4.
R2 (a, X):
2

R (a, X) = 1

P`

i=1 a(xi ) yi
P`
)
i=1 (yi y

2

y =

1X
yi ,
` i=1

. ,
( ) y .
:
0 R2 1,
R2 = 1 , R2 = 0
, R2 < 0 ( ).
, y .

4.1.5.
, , ,
. , .
, , .
( ),
. , , .

4.1.6.
:
(a, X) =

`




1 X
( 1) yi < a(xi ) + yi a(xi ) (yi a(xi )) .
` i=1

. 4.1:
[0, 1] , .
1, , , , 0 .

4.1.7.
, , . x
n , y1 , ..., yn .
.
, ( ).
.
, , x .
, , , , .
, , -. .
2

4.2.
, .

4.2.1.
:
`

1X
[a(xi ) 6= yi ]
` i=1
, , , . :
`

accuracy(a, X) =

1X
[a(xi ) = yi ] .
` i=1

, .

4.2.2.
. . 1000 , 950 1 50 +1.
( ) ,
1. 0.95,
.
, . q0
, accuracy [q0 , 1], [1/2, 1],
. , ,
, , , - ,
.

4.2.3.
,
. .
, , , . 100 , 80
. , , 50 ,
48 . , , , :
, , , .
, , .

4.3.
4.3.1.
, . ,
. , , : .
.

4.3.2.
,
, .

a(x) = 1
a(x) = 1

y=1
True Positive (TP)
False Negative (FN)

y = 1
False Positive (FP)
True Negative (TN)

+1, , .
+1, (true positive),
1, (false positive).
1, , .
+1, (false negative). 1,
(true negative).
, : .
, , .

4.3.3.
a1 (x) a2 (x). 200 ,
100 1 100 1. :

a1 (x) = 1
a1 (x) = 1

y=1
80
20

y = 1
20
80

a2 (x) = 1
a2 (x) = 1

y=1
48
52

y = 1
2
98

. , (precision), , :
precision(a, X) =

TP
.
TP + FP

, (recall), ,
:
TP
recall(a, X) =
.
TP + FN
:
precision(a1 , X) = 0.8,

precision(a2 , X) = 0.96

recall(a1 , X) = 0.8,

recall(a2 , X) = 0.48

, .

4.3.4.
. , 5%.
precision(a, X) 0.95.
. , , . ,
80% , . recall(a, X) 0.8.
,
. :

a(x) = 1
a(x) = 1

y=1
10
90
4

y = 1
20
10000

## (accuracy), (precision) (recall) :

accuracy(a, X) = 0.99,

precision(a, X) = 0.33,

recall(a, X) = 0.1.

, 0.99, : 66%
10% .
, .

4.4.
, .

4.4.1. ()
, :
precision(a, X) =

TP
.
TP + FP

, :
recall(a, X) =

TP
.
TP + FN

, . , .
.

4.4.2.
:
A=

1
(precision + recall)
2

, 10%, 100%:
precision = 0.1

recall = 1.

, 10% +1,
+1. , ,
A = 0.55. , , precision = 0.55 recall = 55
A = 0.55.
, , , .

0.8

recall

0.6

0.4

0.2

0.0

0.0

0.2

0.6

0.4

0.8

precision
. 4.2: A = 12 (precision + recall) = const precisionrecall

4.4.3.
, :
M = min(precision, recall).
, :
precision = 0.05,

recall = 1

M = 0.05.

: , , ,
M :
precision = 0.4,

recall = 0.5

M = 0.4,

precision = 0.4,

recall = 0.9

M = 0.4.

, .
1

0.8

recall

0.6

0.4

0.2

0.0

0.0

0.2

0.6

0.4

0.8

precision
. 4.3: M = min(precision, recall) = const precisionrecall
6

4.4.4. F-
, F -:
F =

2 precision recall
.
precision + recall

F -, M , :
precision = 0.4,

recall = 0.5

F = 0.44,

precision = 0.4,

recall = 0.9

F = 0.55.

0.8

0.8

0.8

0.6

0.6

0.6

0.4

0.2

0.0

recall

recall

recall

, F -,
:
precision recall
F = (1 + 2 ) 2
.
precision + recall
, = 0.5 , = 2, , .

0.4

0.2

0.0

0.2

0.4

0.6

0.8

0.0

0.4

0.2

0.0

precision

0.2

0.4

0.6

0.8

0.0

0.0

precision

0.2

0.4

0.6

0.8

precision

## . 4.4: F = const precisionrecall = 1, = 0.5 = 2

4.5.
4.5.1.
:
b(x), t.
a(x) = [b(x) > t],
b(x) +1. , b(x)
, x +1.
a(x) = [hw, xi > t] +1
b(x) = hw, xi.
,
.

4.5.2.
b(x),
x. :
a(x) = [b(x) > 0.5]
, (precision) 10%, (recall) 70%. , 90% , , .
, :
. b(x).
7

4.5.3. PR-
-.
X , Y .
.
1

precision

0.8

0.6

0.4

0.2

0.0

0.0

0.2

0.6

0.4

0.8

recall
. 4.5:
PR- 6 ,
1 3 0. .
b(x)
y

0.14
0

0.23
1

0.39
0

0.54
0

0.73
1

0.90
1

1. 1.
0.
2. , 1, 100% (
1 ), 1/3 ( 3 1 ).
3. 1,
100%, 2/3.
4. , 1, 2/3,
.
5. , 1, 0.5,
.
6. 5 1 ,
100%, 3/5.
, .

. 4.6: -
, PR- (0, 0), (1, r), r
1.
, , , 100%, (1, 1). , ,
.
1. AUCPRC, PR-.

4.5.4. ROC-
1 ROC-,
False Positive Rate ( X) True Positive Rate ( Y ):
FPR =

FP
,
FP + TN

TPR =

TP
.
TP + FN

## ROC- PR-: . ROC- :

1

0.8

TPR

0.6

0.4

0.2

0.0

0.0

0.2

0.6

0.4

FPR
. 4.7: ROC

0.8

ROC- :

. 4.8: ROC
(0, 0) (1, 1). , , (0, 1). , ,
.
AUCROC, ROC-.

4.5.5. AUC-ROC
, ROC- F P R T P R,
:
FP
TP
FPR =
,
TPR =
.
FP + TN
TP + FN
, AUC-ROC ROC- . AU C ROC = 1,
AU C ROC = 12 .
AU C ROC ,
, ,
.

4.5.6. AUC-PRC
PR- precision recall:
precision =

TP
,
TP + FP

recall =

10

TP
,
TP + FN

## Нижнее меню

### Получите наши бесплатные приложения

Авторское право © 2021 Scribd Inc.