2017 © Pedro Peláez
 

library multidistance

Calculate Multiple Distance Based Similarity Method

image

miqdadm/multidistance

Calculate Multiple Distance Based Similarity Method

  • Saturday, August 20, 2016
  • by MiqdadM
  • Repository
  • 1 Watchers
  • 1 Stars
  • 12 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Multidistance

Build Status Total Downloads Latest Unstable Version, (*1)

Calculate 2 Vektor Using 8 Distance Based Similarity Method : - Euclidean Distance Method - Manhatan Distance Method - Minkowski Distance Method - Chebychef Distance Method - Canbera Distance Method - Bray Curtis Distance Method - Kullback Leibler Distance Method - Jensen Shannon Distance Method, (*2)

Requirements

PHP 5.4 +

Installation

Run via composer, (*3)

composer require miqdadm/multidistance

Or, you can put into your composer.json file., (*4)

"require": {
  "miqdadm/multidistance": "*"
}

Then run composer update, (*5)

composer update

Basic Usage

<?php

require 'vendor/autoload.php';
use MiqdadM\Multidistance\multidistance as Calculate;

$test = new Calculate([4, 3, 6], [2, 3, 7]);
$test->distance(); //do this method first

echo 'Euclidean Distance Method';
echo'

';
print_r($test->getEuclidean()); // 2.2360679774998
echo'
'; echo '</br>'; echo 'Manhatan (City Block) Distance Method'; echo'
';
print_r($test->getManhatan()); // 3
echo'
'; echo '</br>'; echo 'Minkowski Distance (&#955 = 3) Method'; echo'
';
print_r($test->getMinkowski()); // 1.9129311827724
echo'
'; echo '</br>'; echo 'Chebychef Distance Method'; echo'
';
print_r($test->getChebychef()); // 2
echo'
'; echo '</br>'; echo 'Canbera Distance Method'; echo'
';
print_r($test->getCanbera()); // 0.41025641025641
echo'
'; echo '</br>'; echo 'Bray Curtis Distance Method'; echo'
';
print_r($test->getBrayCurtis()); // 0.12
echo'
'; echo '</br>'; echo 'Kullback Leibler Distance Method'; echo'
';
print_r($test->getKullbackLeibler()); // 1.8476846432762
echo'
'; echo '</br>'; echo 'Jensen Shannon Distance Method'; echo'
';
print_r($test->getJensenShannon()); // 0.37829763262563
echo'
';

The Versions

20/08 2016

dev-master

9999999-dev https://github.com/MiqdadM/multidistance

Calculate Multiple Distance Based Similarity Method

  Sources   Download

The Development Requires

by M. Miqdad

euclidean manhatan minkowski chebychef canbera bray curtis kullback leibler jensen shannon

20/08 2016

2.0.0

2.0.0.0 https://github.com/MiqdadM/multidistance

Calculate Multiple Distance Based Similarity Method

  Sources   Download

The Development Requires

by M. Miqdad

euclidean manhatan minkowski chebychef canbera bray curtis kullback leibler jensen shannon

18/08 2016

1.0.0

1.0.0.0 https://github.com/MiqdadM/multidistance

Calculate Multiple Distance Based Similarity Method

  Sources   Download

The Development Requires

by M. Miqdad

distance similarity