Skip to content

Commit 87e4a75

Browse files
committed
Changed percentile method changed to quantile
1 parent 348ac51 commit 87e4a75

18 files changed

+1360
-1266
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
- Unreleased
2+
- Changed percentile method changed to quantile
3+
14
- 2.0.4
25
- Individual Arithmetic and Comparison methods now public
36
- Matrix reductions have their own namespace
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
<?php
2+
3+
namespace Tensor\Benchmarks\Special;
4+
5+
use Tensor\Matrix;
6+
7+
/**
8+
* @Groups({"Special"})
9+
* @BeforeMethods({"setUp"})
10+
*/
11+
class MatrixClippingBench
12+
{
13+
/**
14+
* @var \Tensor\Matrix
15+
*/
16+
protected $a;
17+
18+
/**
19+
* @var \Tensor\Matrix
20+
*/
21+
protected $kernel;
22+
23+
public function setUp() : void
24+
{
25+
$this->a = Matrix::uniform(1000, 1000);
26+
}
27+
28+
/**
29+
* @Subject
30+
* @Iterations(5)
31+
* @OutputTimeUnit("seconds", precision=3)
32+
*/
33+
public function clip() : void
34+
{
35+
$this->a->clip(0, 1);
36+
}
37+
38+
/**
39+
* @Subject
40+
* @Iterations(5)
41+
* @OutputTimeUnit("seconds", precision=3)
42+
*/
43+
public function clipUpper() : void
44+
{
45+
$this->a->clipUpper(0);
46+
}
47+
48+
/**
49+
* @Subject
50+
* @Iterations(5)
51+
* @OutputTimeUnit("seconds", precision=3)
52+
*/
53+
public function clipLower() : void
54+
{
55+
$this->a->clipLower(0);
56+
}
57+
}

benchmarks/Statistical/MatrixPercentileBench.php renamed to benchmarks/Statistical/MatrixQuantileBench.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* @Groups({"Statistical"})
99
* @BeforeMethods({"setUp"})
1010
*/
11-
class MatrixPercentileBench
11+
class MatrixQuantileBench
1212
{
1313
/**
1414
* @var \Tensor\Matrix
@@ -25,8 +25,8 @@ public function setUp() : void
2525
* @Iterations(5)
2626
* @OutputTimeUnit("seconds", precision=3)
2727
*/
28-
public function percentile() : void
28+
public function quantile() : void
2929
{
30-
$this->a->percentile(50.0);
30+
$this->a->quantile(0.5);
3131
}
3232
}

0 commit comments

Comments
 (0)