Add null coalesce operator in token count vectoriezer
This commit is contained in:
parent
38a26d185f
commit
8aad8afc37
|
@ -132,7 +132,7 @@ class TokenCountVectorizer implements Transformer
|
|||
return false;
|
||||
}
|
||||
|
||||
return isset($this->vocabulary[$token]) ? $this->vocabulary[$token] : false;
|
||||
return $this->vocabulary[$token] ?? false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -163,7 +163,7 @@ class ClassificationReport
|
|||
return 0.0;
|
||||
}
|
||||
|
||||
return 2.0 * (($precision * $recall) / ($divider));
|
||||
return 2.0 * (($precision * $recall) / $divider);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue