Skip to content

Commit

Permalink
Add missing @throws and @param docblocks (#107)
Browse files Browse the repository at this point in the history
  • Loading branch information
alucic authored and akondas committed Jul 26, 2017
1 parent 3bcba40 commit 08d974b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Phpml/Classification/MLPClassifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ class MLPClassifier extends MultilayerPerceptron implements Classifier
{

/**
* @param mixed $target
* @param mixed $target
*
* @throws InvalidArgumentException
*
* @return int
*/
public function getTargetClass($target): int
Expand Down
2 changes: 2 additions & 0 deletions src/Phpml/Exception/InvalidArgumentException.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ public static function invalidClustersNumber()
}

/**
* @param mixed $target
*
* @return InvalidArgumentException
*/
public static function invalidTarget($target)
Expand Down
3 changes: 3 additions & 0 deletions src/Phpml/NeuralNetwork/Network/MultilayerPerceptron.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ public function train(array $samples, array $targets)
/**
* @param array $samples
* @param array $targets
* @param array $classes
*
* @throws InvalidArgumentException
*/
public function partialTrain(array $samples, array $targets, array $classes = [])
{
Expand Down

0 comments on commit 08d974b

Please sign in to comment.