Completed
Push — develop ( 118ee0...af3b57 )
by Arkadiusz
02:32
created

LeastSquares   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 1
cbo 0
dl 0
loc 31
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A train() 0 5 1
A predict() 0 3 1
1
<?php
2
3
declare (strict_types = 1);
4
5
namespace Phpml\Regression;
6
7
class LeastSquares implements Regression
8
{
9
    /**
10
     * @var array
11
     */
12
    private $features;
13
14
    /**
15
     * @var array
16
     */
17
    private $targets;
18
19
    /**
20
     * @param array $features
21
     * @param array $targets
22
     */
23
    public function train(array $features, array $targets)
24
    {
25
        $this->features = $features;
26
        $this->targets = $targets;
27
    }
28
29
    /**
30
     * @param array $features
31
     *
32
     * @return mixed
33
     */
34
    public function predict(array $features)
35
    {
36
    }
37
}
38