File tree Expand file tree Collapse file tree
src/CrossValidation/Metrics Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ public function compatibility() : array
6060 */
6161 public function score (array $ predictions , array $ labels ) : float
6262 {
63- $ table = new ContingencyTable ()->generate ($ labels , $ predictions );
63+ $ table = ( new ContingencyTable () )->generate ($ labels , $ predictions );
6464
6565 $ score = 0.0 ;
6666
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ public function compatibility() : array
6161 */
6262 public function score (array $ predictions , array $ labels ) : float
6363 {
64- $ table = new ContingencyTable ()->generate ($ predictions , $ labels );
64+ $ table = ( new ContingencyTable () )->generate ($ predictions , $ labels );
6565
6666 $ score = 0.0 ;
6767
Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ public function compatibility() : array
7272 */
7373 public function score (array $ predictions , array $ labels ) : float
7474 {
75- $ table = new ContingencyTable ()->generate ($ labels , $ predictions );
75+ $ table = ( new ContingencyTable () )->generate ($ labels , $ predictions );
7676
7777 $ table = Matrix::build ($ table ->toArray ());
7878
Original file line number Diff line number Diff line change @@ -79,8 +79,8 @@ public function compatibility() : array
7979 */
8080 public function score (array $ predictions , array $ labels ) : float
8181 {
82- $ homogeneity = new Homogeneity ()->score ($ predictions , $ labels );
83- $ completeness = new Completeness ()->score ($ predictions , $ labels );
82+ $ homogeneity = ( new Homogeneity () )->score ($ predictions , $ labels );
83+ $ completeness = ( new Completeness () )->score ($ predictions , $ labels );
8484
8585 return (1.0 + $ this ->beta ) * $ homogeneity * $ completeness
8686 / (($ this ->beta * $ homogeneity + $ completeness ) ?: EPSILON );
You can’t perform that action at this time.
0 commit comments