Skip to content
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

Draft
wants to merge 20 commits into
base: master
Choose a base branch
from
Draft

V3 #34

wants to merge 20 commits into from

Conversation

bdelespierre
Copy link
Owner

No description provided.

@bdelespierre bdelespierre self-assigned this Sep 21, 2021
namespace Kmeans;

use Kmeans\Cluster;
use Kmeans\ClusterCollection;
Copy link
Contributor

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;
Copy link
Contributor

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;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#32

In that discussion we decided to add setDistanceFunction to AlgorithmInterface .

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, in another PR 👍

@battlecook
Copy link
Contributor

Really great!

I checked the implementation and proceeded with the review. I just made a few comments.

$this->iterationCallbacks[] = $callback;
}

public function clusterize(PointCollectionInterface $points, int $nbClusters): ClusterCollectionInterface
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#28 (comment)

The return of Algorithm::clusterize is discussed as ClusterizationResultInterface .

Copy link
Owner Author

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#31

We decided to add getTotalVariance() .

Copy link
Owner Author

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

@bdelespierre
Copy link
Owner Author

Thanks, @battlecook this PR is an Epic, more smaller PRs are going to go from feature/xyz to v3. Then this PR is going to get updated and checked by the CI/CD I just installed.

When we're happy with the result, we can prepare a RC from V3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants