dspam: be more conservative with karma awards
previous settings were reasonable for a well trained dspam. After starting with a fresh dspam, the settings were not optimal for the amount of naive that a default dspam is.
This commit is contained in:
parent
0eef321990
commit
8012dff4f9
@ -493,7 +493,7 @@ sub reject_agree {
|
|||||||
if ( $d->{class} eq 'Innocent' ) {
|
if ( $d->{class} eq 'Innocent' ) {
|
||||||
if ( $sa->{is_spam} eq 'No' ) {
|
if ( $sa->{is_spam} eq 'No' ) {
|
||||||
if ( $d->{confidence} > .9 ) {
|
if ( $d->{confidence} > .9 ) {
|
||||||
$self->adjust_karma( 2 );
|
$self->adjust_karma( 1 );
|
||||||
};
|
};
|
||||||
$self->log(LOGINFO, "pass, agree, $status");
|
$self->log(LOGINFO, "pass, agree, $status");
|
||||||
return DECLINED;
|
return DECLINED;
|
||||||
@ -634,14 +634,14 @@ sub autolearn_karma {
|
|||||||
my $karma = $self->connection->notes('karma');
|
my $karma = $self->connection->notes('karma');
|
||||||
return if ! defined $karma;
|
return if ! defined $karma;
|
||||||
|
|
||||||
if ( $karma <= -1 && $response->{result} eq 'Innocent' ) {
|
if ( $karma < -1 && $response->{result} eq 'Innocent' ) {
|
||||||
$self->log(LOGINFO, "training bad karma FN as spam");
|
$self->log(LOGINFO, "training bad karma ($karma) FN as spam");
|
||||||
$self->train_error_as_spam( $transaction );
|
$self->train_error_as_spam( $transaction );
|
||||||
return 1;
|
return 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
if ( $karma >= 1 && $response->{result} eq 'Spam' ) {
|
if ( $karma > 1 && $response->{result} eq 'Spam' ) {
|
||||||
$self->log(LOGINFO, "training good karma FP as ham");
|
$self->log(LOGINFO, "training good karma ($karma) FP as ham");
|
||||||
$self->train_error_as_ham( $transaction );
|
$self->train_error_as_ham( $transaction );
|
||||||
return 1;
|
return 1;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user