Skip to content

Changes prints to @info #289

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/fuzzycmeans.jl
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ function _fuzzy_cmeans(
copyto!(prev_centers, centers)
iter += 1
if displevel >= 2
@printf("%7d %18.6e\n", iter, δ)
@info("$(iter) $(δ)")
end
end

Expand Down
6 changes: 3 additions & 3 deletions src/kmeans.jl
Original file line number Diff line number Diff line change
Expand Up @@ -195,15 +195,15 @@ function _kmeans!(X::AbstractMatrix{<:Real}, # in: data matrix (d

# display information (if required)
if displevel >= 2
@printf("%7d %18.6e %18.6e | %8d\n", t, objv, objv_change, num_affected)
@info("$(t) $(objv) $(objv_change) $(num_affected)")
end
end

if displevel >= 1
if converged
println("K-means converged with $t iterations (objv = $objv)")
@info("K-means converged with $t iterations (objv = $objv)")
else
println("K-means terminated without convergence after $t iterations (objv = $objv)")
@info("K-means terminated without convergence after $t iterations (objv = $objv)")
end
end

Expand Down
6 changes: 3 additions & 3 deletions src/kmedoids.jl
Original file line number Diff line number Diff line change
Expand Up @@ -157,15 +157,15 @@ function _kmedoids!(medoids::Vector{Int}, # initialized medoids

# display progress
if displevel >= 2
@printf("%7d %18.6e %18.6e\n", t, tcost, tcost - tcost_pre)
@info("$(t) $(tcost) $(tcost - tcost_pre)")
end
end

if displevel >= 1
if converged
println("K-medoids converged with $t iterations (objv = $tcost)")
@info("K-medoids converged with $t iterations (objv = $tcost)")
else
println("K-medoids terminated without convergence after $t iterations (objv = $tcost)")
@info("K-medoids terminated without convergence after $t iterations (objv = $tcost)")
end
end

Expand Down
Loading