Hi David,
Thanks! I just tried it with new sets version (1.0-6) and it works great!
Thanks again for a very nice package.
Best regards,
Ryszard
--
Confidentiality Notice: This message is private and may contain
Peter, Ryszard,
I just put a new version on CRAN (1.0-6) which fixes the problem
occuring with operators and mixed classes, so, e.g.,
gset(1,2) set()
{}
now works. I also made sure that X == X is always TRUE, and fixed the
all.equal-bug:
gset(1, 0.5 - 0.3) == gset(1, 0.3 - 0.1)
[1]
Thanks, David.
On 2010-04-11 15:12, David Meyer wrote:
Peter, Ryszard,
I just put a new version on CRAN (1.0-6) which fixes the problem
occuring with operators and mixed classes, so, e.g.,
gset(1,2) set()
{}
now works. I also made sure that X == X is always TRUE, and fixed the
This is rather by chance due to numeric instabilities, I think:
It looks like something else is going on in addition to potential problem
with numerical instabilities:
p - runif(length(letters))
q - gset(letters, p)
all.equal(p,p)
all.equal(q,q)
q == q
p - runif(length(letters))
q -
Thank you for looking into it!
There is still something I do not understand (despite different numerics on
different machines, etc.)
On my system plain p == p (where p's are from runif())
gives all TRUE values, but with q (gset) which memberships values are set to p
q == q generates FALSE
Ryszard,
I don't get your results; are you using an older version of sets?
summary(p == p)
# ModeTRUENA's
#logical 26 0
q == q
#[1] TRUE
summary(p == gset_memberships(q)) # and this gives all TRUE values
# ModeTRUENA's
#logical 26 0
sessionInfo()
R
On Apr 7, 2010, at 8:54 AM, Czerminski, Ryszard wrote:
Thank you for looking into it!
There is still something I do not understand (despite different
numerics on different machines, etc.)
On my system plain p == p (where p's are from runif())
gives all TRUE values, but with q (gset) which
This is rather by chance due to numeric instabilities, I think:
It looks like something else is going on in addition to potential problem
with numerical instabilities:
p - runif(length(letters))
q - gset(letters, p)
all.equal(p,p)
all.equal(q,q)
q == q
p - runif(length(letters))
q -
Apparently memberships values are identical, tags of set members are identical
(letters),
but q == q still generates FALSE...
The equality method for gsets performs some computations which might
yield these results in case of numeric problems. As I wrote, I will
think about using all.equal
The equality method for gsets performs some computations which might yield
these results in case of numeric problems...
I see...
The other differences are probably due to older R version (2.7.1) I am using
I guess it is time to upgrade...
Best regards,
Ryszard
sessionInfo()
R version 2.7.1
Hi Peter,
This looks like another one: gset_is_equal(X,X) and X == X evaluate to
FALSE ?
uv - c('a', 'b', 'c'); s - gset(uv, runif(length(uv)))
s
{a [0.0811552], b [0.3552998], c [0.996772]}
gset_is_equal(s, s)
[1] FALSE
s == s
[1] FALSE
class(s)
[1] gset cset
Best regards,
Ryszard
This is rather by chance due to numeric instabilities, I think:
uv - c('a', 'b', 'c'); s - gset(uv, runif(length(uv)))
s
{a [0.7533966], b [0.968067], c [0.2494876]}
s == s
[1] TRUE
gset_is_equal(s,s)
[1] TRUE
But using all.equal instead of `==` for the memberships might by a good
idea, I
When using generalized sets from sets library
A EMPTY does not work, but gset_intersection(A,EMPTY) works: example
code below
Is it a bug?
Best regards,
Ryszard
library(sets)
support - universe - c('a','b','c','d')
A - gset(support=support, memberships=c(0.2, 0.2, 0.9, 0),
universe=universe)
Unless I'm missing something, I don't see any method
in pkg:sets for intersection other than gset_intersection.
So you're using the base R function `` whose help page
tells you that its arguments should be vectors. Yours
aren't.
-Peter Ehlers
On 2010-03-31 8:50, Czerminski, Ryszard wrote:
On 2010-03-31 9:30, Peter Ehlers wrote:
Unless I'm missing something, I don't see any method
in pkg:sets for intersection other than gset_intersection.
Whoops, a bit quick on the draw.
There are of course also set_intersection and cset_intersection,
but not AFAICS any method for ``.
-Peter
It seems that A B works the same way as gset_intersection(A,B)
as long as A and B are not empty...
see below:
fuzzy_logic(Yager, p=2)
support - universe - c('a','b','c','d')
A - gset(support=support, memberships=c(0.2, 0.2, 0.9, 0),
universe=universe)
B - gset(support=support,
Ryszard,
You've made me take a closer look and now I do think that
you've found a bug.
After a quick look at the package vignette, I see that the
authors have indeed overloaded and so it should work for
your example. The problem seems to be the order of the class
attribute which is used to
17 matches
Mail list logo