diff --git a/DESCRIPTION b/DESCRIPTION index baa7e36..a15d4bb 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -50,6 +50,7 @@ Suggests: covr, hasseDiagram, knitr, + markdown, rmarkdown, testthat (>= 2.1.0), parallel diff --git a/R/concept_lattice.R b/R/concept_lattice.R index 0da0358..bafec4b 100644 --- a/R/concept_lattice.R +++ b/R/concept_lattice.R @@ -11,9 +11,6 @@ #' # Find the concepts #' fc_planets$find_concepts() #' -#' # Plot the concept lattice -#' # fc_planets$concepts$plot() -#' #' # Find join- and meet- irreducible elements #' fc_planets$concepts$join_irreducibles() #' fc_planets$concepts$meet_irreducibles() diff --git a/R/fcaR-package.R b/R/fcaR-package.R index cff643f..f102557 100644 --- a/R/fcaR-package.R +++ b/R/fcaR-package.R @@ -32,9 +32,6 @@ NULL #' # Find its concepts and implications #' fc_planets$find_implications() #' -#' # Plot the concept lattice -#' fc_planets$concepts$plot() -#' #' # Print the extracted implications #' fc_planets$implications #' diff --git a/R/formal_context.R b/R/formal_context.R index b04aa22..9abcce1 100644 --- a/R/formal_context.R +++ b/R/formal_context.R @@ -17,9 +17,6 @@ #' fc_planets <- FormalContext$new(planets) #' print(fc_planets) #' -#' # Plot the formal context -#' fc_planets$plot() -#' #' # Define a set of attributes #' S <- SparseSet$new(attributes = fc_planets$attributes) #' S$assign(moon = 1, large = 1) diff --git a/doc/arules.html b/doc/arules.html index 8456636..c006650 100644 --- a/doc/arules.html +++ b/doc/arules.html @@ -392,23 +392,20 @@

Importing a transactions object

It suffices to initialize a FormalContext object with the transactions dataset:

fc <- FormalContext$new(Mushroom)
 fc
-#> Registered S3 method overwritten by 'pryr':
-#>   method      from
-#>   print.bytes Rcpp
-#> FormalContext with 8124 objects and 114 attributes.
-#>       Class=edible   Class=poisonous   CapShape=bell   CapShape=conical  
-#>    1                        X                                            
-#>    2       X                                                             
-#>    3       X                                 X                           
-#>    4                        X                                            
-#>    5       X                                                             
-#>    6       X                                                             
-#>    7       X                                 X                           
-#>    8       X                                 X                           
-#>    9                        X                                            
-#>   10       X                                 X                           
-#> Other attributes are: CapShape=flat, CapShape=knobbed, CapShape=sunken,
-#> CapShape=convex, CapSurf=fibrous, CapSurf=grooves, ...
+#> FormalContext with 8124 objects and 114 attributes. +#> Class=edible Class=poisonous CapShape=bell CapShape=conical +#> 1 X +#> 2 X +#> 3 X X +#> 4 X +#> 5 X +#> 6 X +#> 7 X X +#> 8 X X +#> 9 X +#> 10 X X +#> Other attributes are: CapShape=flat, CapShape=knobbed, CapShape=sunken, +#> CapShape=convex, CapSurf=fibrous, CapSurf=grooves, ...

From this point, we can use all the functionalities in the fcaR package regarding formal contexts, concept lattices and implication sets.

diff --git a/doc/implications.html b/doc/implications.html index 1411b59..957eaba 100644 --- a/doc/implications.html +++ b/doc/implications.html @@ -940,9 +940,9 @@

Simplification Logic

fc_I$implications$apply_rules(rules = c("composition",
                                         "simplification"))
 #> Processing batch
-#> --> Composition: from 12 to 12 in 0.003 secs.
-#> --> Simplification: from 12 to 12 in 0.156 secs.
-#> Batch took 0.164 secs.
+#> --> Composition: from 12 to 12 in 0.002 secs. +#> --> Simplification: from 12 to 12 in 0.131 secs. +#> Batch took 0.137 secs.

This enables the reduction of the cardinality and/or the size of the ImplicationSet.

In addition, the “simplification” rule to remove redundancies can be used in the computation of the closure of a set, to provide a reduced set of implications that is inferred from the set of attributes:

# Let us build a set of attributes
diff --git a/docs/articles/extending_equivalence.html b/docs/articles/extending_equivalence.html
index 8269da7..06f45c6 100644
--- a/docs/articles/extending_equivalence.html
+++ b/docs/articles/extending_equivalence.html
@@ -220,21 +220,21 @@ 

fc$implications$apply_rules("randomize") #> Processing batch #> --> Randomize: from 10 to 10 in 0.001 secs. -#> Batch took 0.004 secs.

+#> Batch took 0.005 secs.
 # Reordered implications
 fc$implications
 #> Implication set with 10 implications.
-#> Rule 1: {small, near, far, moon} -> {medium, large, no_moon}
-#> Rule 2: {far} -> {moon}
-#> Rule 3: {medium} -> {far, moon}
-#> Rule 4: {near} -> {small}
-#> Rule 5: {small, near, moon, no_moon} -> {medium, large, far}
-#> Rule 6: {large} -> {far, moon}
-#> Rule 7: {small, medium, far, moon} -> {large, near, no_moon}
-#> Rule 8: {small, large, far, moon} -> {medium, near, no_moon}
-#> Rule 9: {no_moon} -> {small, near}
-#> Rule 10: {medium, large, far, moon} -> {small, near, no_moon}
+#> Rule 1: {large} -> {far, moon} +#> Rule 2: {medium, large, far, moon} -> {small, near, no_moon} +#> Rule 3: {small, near, moon, no_moon} -> {medium, large, far} +#> Rule 4: {small, medium, far, moon} -> {large, near, no_moon} +#> Rule 5: {medium} -> {far, moon} +#> Rule 6: {small, near, far, moon} -> {medium, large, no_moon} +#> Rule 7: {no_moon} -> {small, near} +#> Rule 8: {near} -> {small} +#> Rule 9: {small, large, far, moon} -> {medium, near, no_moon} +#> Rule 10: {far} -> {moon} diff --git a/docs/articles/implications.html b/docs/articles/implications.html index 59e20c4..3c8748b 100644 --- a/docs/articles/implications.html +++ b/docs/articles/implications.html @@ -696,9 +696,9 @@

fc_I$implications$apply_rules(rules = c("composition", "simplification")) #> Processing batch -#> --> Composition: from 12 to 12 in 0.004 secs. -#> --> Simplification: from 12 to 12 in 0.087 secs. -#> Batch took 0.095 secs. +#> --> Composition: from 12 to 12 in 0.005 secs. +#> --> Simplification: from 12 to 12 in 0.092 secs. +#> Batch took 0.1 secs.

This enables the reduction of the cardinality and/or the size of the ImplicationSet.

In addition, the “simplification” rule to remove redundancies can be used in the computation of the closure of a set, to provide a reduced set of implications that is inferred from the set of attributes:

diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml
index 9b972e8..b12652d 100644
--- a/docs/pkgdown.yml
+++ b/docs/pkgdown.yml
@@ -6,5 +6,5 @@ articles:
   concept_lattice: concept_lattice.html
   extending_equivalence: extending_equivalence.html
   implications: implications.html
-last_built: 2020-11-27T10:51Z
+last_built: 2020-12-01T20:00Z
 
diff --git a/docs/reference/ConceptLattice.html b/docs/reference/ConceptLattice.html
index 3150b9e..a47eeb3 100644
--- a/docs/reference/ConceptLattice.html
+++ b/docs/reference/ConceptLattice.html
@@ -422,9 +422,6 @@ 

Examp # Find the concepts fc_planets$find_concepts() -# Plot the concept lattice -# fc_planets$concepts$plot() - # Find join- and meet- irreducible elements fc_planets$concepts$join_irreducibles()

#> ({Jupiter, Saturn}, {large, far, moon}) diff --git a/docs/reference/FormalContext.html b/docs/reference/FormalContext.html index 1672d4f..0f4fce7 100644 --- a/docs/reference/FormalContext.html +++ b/docs/reference/FormalContext.html @@ -471,9 +471,6 @@

Examp #> Uranus X X X #> Neptune X X X #> Pluto X X X

-# Plot the formal context -fc_planets$plot() -
# Define a set of attributes S <- SparseSet$new(attributes = fc_planets$attributes) S$assign(moon = 1, large = 1) diff --git a/docs/reference/ImplicationSet.html b/docs/reference/ImplicationSet.html index f1154fa..d567dbf 100644 --- a/docs/reference/ImplicationSet.html +++ b/docs/reference/ImplicationSet.html @@ -429,7 +429,7 @@

Examp #> 2.5 2.3

# Simplify the implication set fc_planets$implications$apply_rules("simplification") -
#> Processing batch
#> --> Simplification: from 10 to 10 in 0.201 secs.
#> Batch took 0.205 secs.
+
#> Processing batch
#> --> Simplification: from 10 to 10 in 0.159 secs.
#> Batch took 0.166 secs.
# Print the extracted implications fc_planets$implications
#> Implication set with 10 implications. diff --git a/man/ConceptLattice.Rd b/man/ConceptLattice.Rd index fd603d1..ddf6b3b 100644 --- a/man/ConceptLattice.Rd +++ b/man/ConceptLattice.Rd @@ -13,9 +13,6 @@ fc_planets <- FormalContext$new(planets) # Find the concepts fc_planets$find_concepts() -# Plot the concept lattice -# fc_planets$concepts$plot() - # Find join- and meet- irreducible elements fc_planets$concepts$join_irreducibles() fc_planets$concepts$meet_irreducibles() diff --git a/man/FormalContext.Rd b/man/FormalContext.Rd index 627019a..211950f 100644 --- a/man/FormalContext.Rd +++ b/man/FormalContext.Rd @@ -23,9 +23,6 @@ This class implements the data structure and methods for formal contexts. fc_planets <- FormalContext$new(planets) print(fc_planets) -# Plot the formal context -fc_planets$plot() - # Define a set of attributes S <- SparseSet$new(attributes = fc_planets$attributes) S$assign(moon = 1, large = 1) diff --git a/man/fcaR.Rd b/man/fcaR.Rd index c80bef7..5464bc0 100644 --- a/man/fcaR.Rd +++ b/man/fcaR.Rd @@ -31,9 +31,6 @@ fc_planets <- FormalContext$new(planets) # Find its concepts and implications fc_planets$find_implications() -# Plot the concept lattice -fc_planets$concepts$plot() - # Print the extracted implications fc_planets$implications