Skip to content

Commit

Permalink
version 2.0.14
Browse files Browse the repository at this point in the history
  • Loading branch information
Ron Wehrens authored and gaborcsardi committed Dec 12, 2013
1 parent 2cce441 commit db6e913
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 6 deletions.
6 changes: 6 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,12 @@ Changes in version 2.0.13:
boundaries at the edges of the map are shown twice when necessary
for better interpretability.

Changes in version 2.0.14:
- fixed a bug, disguised as a memory leak, where map.kohonen
attempted to calculate a distance between elements of a factor,
rather than using the membership matrix. (Spotted by CRAN checks
focusing on memory leaks, BDRipley)


***********************************************************************

Expand Down
6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
Package: kohonen
Version: 2.0.13
Version: 2.0.14
Title: Supervised and unsupervised self-organising maps
Author: Ron Wehrens
Maintainer: Ron Wehrens <[email protected]>
Description: Supervised and unsupervised self-organising maps
License: GPL (>= 2)
Depends: R (>= 2.6.0), class, MASS
Packaged: 2013-12-10 13:26:38 UTC; ron
Packaged: 2013-12-12 16:42:45 UTC; ron
NeedsCompilation: yes
Repository: CRAN
Date/Publication: 2013-12-10 14:51:07
Date/Publication: 2013-12-12 17:49:45
6 changes: 3 additions & 3 deletions MD5
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
976cae8e2ddd03dd2b52a73901c58e94 *CHANGES
bbc1455950aeb5b8698901957a42ddea *DESCRIPTION
65ff218d2542c6e926cf88fd342bc50a *CHANGES
d1f2cfdd74d5531545b51c02d8254eae *DESCRIPTION
9c45759409000a4097555af35a8ffe46 *NAMESPACE
4f8dc45b25a895e8570aa2e3d615e5ba *R/bdk.R
f8872ae6c6f57e47d1b1b626e621c25f *R/check.whatmap.R
6cc0a5ca02ea151088c24bbf420ab060 *R/classvec2classmat.R
c33fb995b589bc29bff84a717e626970 *R/map.R
1ff41daac5c4303faba8642a3850c867 *R/map.R
bac565cf58123910ea9529745fdf149d *R/plot.kohonen.R
6405f64156c791e44cf786767a630c63 *R/predict.kohonen.R
9685fed2072dbda758e8f60b52f47678 *R/som.R
Expand Down
7 changes: 7 additions & 0 deletions R/map.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@
### FIXME: inefficient (but correct) if there are zeros in x$weights;
### whatmap is a more elegant way to exclude layers.

### Bug fix 12/12/13: for mapping factors, the corresponding whatmap
### layer should first be converted to a matrix, otherwise no
### meaningful distance can be calculated. Spotted by CRAN checks on
### memory leaks (BDRipley)

"map.kohonen" <- function(x, newdata, whatmap=NULL, weights,
scale.distances = (nmaps > 1), ...)
{
Expand Down Expand Up @@ -48,6 +53,8 @@
for (i in seq(along = whatmap)) {
np <- ncol(codes[[ whatmap[i] ]])
dt <- newdata[[ whatmap[i] ]]
if (is.factor(dt))
dt <- classvec2classmat(dt)
cd <- codes[[ whatmap[i] ]]

distances[,i] <- .C("mapKohonen",
Expand Down

0 comments on commit db6e913

Please sign in to comment.