This is an automated email from the ASF dual-hosted git repository.
paulk pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/groovy-website.git
The following commit(s) were added to refs/heads/asf-site by this push:
new 0996e56 make no longer a draft
0996e56 is described below
commit 0996e56075ef29008d2216bb5a9c3b5a9867bb80
Author: Paul King <[email protected]>
AuthorDate: Fri May 2 09:39:06 2025 +1000
make no longer a draft
---
site/src/site/blog/img/matrixWhiskyCorrHeatmap.png | Bin 71690 -> 77312 bytes
site/src/site/blog/whisky-revisited.adoc | 11 +++++------
2 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/site/src/site/blog/img/matrixWhiskyCorrHeatmap.png
b/site/src/site/blog/img/matrixWhiskyCorrHeatmap.png
index 556d134..b5d535f 100644
Binary files a/site/src/site/blog/img/matrixWhiskyCorrHeatmap.png and
b/site/src/site/blog/img/matrixWhiskyCorrHeatmap.png differ
diff --git a/site/src/site/blog/whisky-revisited.adoc
b/site/src/site/blog/whisky-revisited.adoc
index c1a1286..3c78aa0 100644
--- a/site/src/site/blog/whisky-revisited.adoc
+++ b/site/src/site/blog/whisky-revisited.adoc
@@ -1,7 +1,6 @@
= Whisky flavor profiles revisited
Paul King
:revdate: 2025-04-17T22:30:00+00:00
-:draft: true
:keywords: whisky, whiskey, groovy, kmeans, clustering, apache echarts
:description: This post looks at using the Underdog data science library.
@@ -258,7 +257,7 @@ We'll take the results and do some minor formatting changes:
[source,groovy]
----
(summary.columns - 'Cluster').each { c ->
- summary[c] = summary[c](Double, Double) {it.round(3) }
+ summary[c] = summary[c](Double, Double) { it.round(3) }
}
println summary
----
@@ -274,7 +273,7 @@ Which has this output:
2 | 1.5 | 2.455 | 1.114 |
0.227 | 0.114 | 1.114 | 1.114 | 0.591 |
1.25 | 1.818 | 1.773 | 1.977 |
----
-Looking at the centroids is one way to understand how the whiskies have been
grouped.
+Looking at the centroids is one way to try to understand how the whiskies have
been grouped.
But, it's very hard to visualize 12 dimensional data, so instead,
let's project our data onto 2 dimensions using PCA and store those projections
back into the dataframe:
@@ -537,7 +536,7 @@ It's easy enough to roll our own:
[source,groovy]
----
def corr = [size<..0, 0..<size].combinations().collect { i, j ->
- Correlation.cor(data*.getAt(j), data*.getAt(i)) * 100 as int
+ Correlation.cor(data*.getAt(j), data*.getAt(i)).round(2)
}
def corrMatrix = Matrix.builder().data(X: 0..<corr.size(), Heat: corr)
@@ -564,9 +563,9 @@ image:img/matrixWhiskyCorrHeatmap.png[heatmap,50%]
== Conclusion
-We have looked at how to use Underdog and Matrix.
+We have looked at how to use Underdog and Matrix to classify whisky flavor
profiles.
.Update history
****
-*19/Apr/2025*: Initial version +
+*02/May/2025*: Initial version +
****