-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
V3 #34
base: master
Are you sure you want to change the base?
V3 #34
Conversation
38afdbc
to
05a1f2b
Compare
namespace Kmeans; | ||
|
||
use Kmeans\Cluster; | ||
use Kmeans\ClusterCollection; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Import 'Kmeans\Cluster' and 'Kmeans\ClusterCollection' are never used
namespace Kmeans\Interfaces; | ||
|
||
use Kmeans\Interfaces\ClusterCollectionInterface; | ||
use Kmeans\Interfaces\PointCollectionInterface; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ClusterCollectionInterface and PointCollectionInterface are the same namespace as InitializationSchemeInterface.
Therefore, "use Kmeans\Interfaces\ClusterCollectionInterface" and "use Kmeans\Interfaces\PointCollectionInterface" can be deleted unless they are intended to be used explicitly.
|
||
interface AlgorithmInterface | ||
{ | ||
public function clusterize(PointCollectionInterface $points, int $nbClusters): ClusterCollectionInterface; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In that discussion we decided to add setDistanceFunction to AlgorithmInterface .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, in another PR 👍
Really great! I checked the implementation and proceeded with the review. I just made a few comments. |
src/Algorithm.php
Outdated
$this->iterationCallbacks[] = $callback; | ||
} | ||
|
||
public function clusterize(PointCollectionInterface $points, int $nbClusters): ClusterCollectionInterface |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The return of Algorithm::clusterize is discussed as ClusterizationResultInterface .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, in another PR +1
|
||
namespace Kmeans\Interfaces; | ||
|
||
interface ClusterizationResultInterface extends \Serializable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We decided to add getTotalVariance() .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, in another PR +1
Thanks, @battlecook this PR is an Epic, more smaller PRs are going to go from When we're happy with the result, we can prepare a RC from V3. |
No description provided.