Skip to content

Commit

Permalink
update documentation of pmedian
Browse files Browse the repository at this point in the history
  • Loading branch information
jbytecode committed Apr 18, 2024
1 parent db053d2 commit a934a49
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/pmedian.jl
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ end
- `data::Matrix`: Coordinates of locations
- `ncenters::Int`: Number of centers
# Descriptions
# Description
The function calculates Euclidean distances between all possible rows of the matrix data.
`ncenters` locations are then selected that minimizes the total distances to the nearest rows.
Expand Down Expand Up @@ -79,7 +79,7 @@ julia> result.centers
"""
function pmedian(data::Matrix, ncenters::Int)::PMedianResult

n, p = size(data)
n, _ = size(data)

distances = zeros(Float64, n, n)

Expand All @@ -104,8 +104,9 @@ end
- `distancematrix::Matrix`: n x n matrix of distances
- `ncenters::Int`: Number of centers
# Descriptions
`ncenters` locations are selected that minimizes the total distances to the nearest rows.
# Description
- `ncenters` locations are selected that minimizes the total distances to the nearest rows.
# Output
- `PMedianResult`: PMedianResult object.
Expand Down

0 comments on commit a934a49

Please sign in to comment.