neuroimaginador / fcaR

Tools for Formal Concept Analysis
https://neuroimaginador.github.io/fcaR
GNU General Public License v3.0
15 stars 6 forks source link

Warning message: multiple methods tables found for ‘plot’ #14

Open pattisot opened 4 years ago

pattisot commented 4 years ago

Please briefly describe your problem and what output you expect. If you have a question, please don't use this form. Instead, ask on https://stackoverflow.com/ or https://community.rstudio.com/.

Please include a minimal reproducible example (AKA a reprex). If you've never heard of a reprex before, start by reading https://www.tidyverse.org/help/#reprex.


Brief description of the problem fc$concepts$plot() opens up Quartz window and then crashes R.

R Under development (unstable) (2020-03-08 r77917) -- "Unsuffered Consequences" Platform: x86_64-apple-darwin15.6.0 (64-bit) [R.app GUI 1.70 (7782) x86_64-apple-darwin15.6.0]

> library("fcaR")
Warning message:
multiple methods tables found for ‘plot’

> I <- read.csv(file = 'I.csv', header = FALSE)
> rowNames <- read.csv(file = 'rowNames.csv', header = FALSE)
> colNames <- read.csv(file = 'colNames.csv', header = FALSE)

> colnames(I) <- t(colNames)
> rownames(I) <- t(rowNames)

> library("fcaR")
> fc <- FormalContext$new(I)
> fc$clarify()
> fc$reduce()
> fc$find_concepts()
> fc$concepts$plot()
pattisot commented 4 years ago

Managed to catch the error report(s) ...

One time it complained about recursive calls to gc. Another time, the error message was as follows:

caught segfault address 0x0, cause 'unknown'

Traceback: 1: extractGroups(data) 2: hasse(data = as.matrix(t(private$subconcept_matrix)), labels = labels, parameters = list(arrows = "backward")) 3: fc$concepts$plot()

pattisot commented 4 years ago

This also crashed using RStudio (installed using Anaconda) on Windows.

neuroimaginador commented 4 years ago

Hi,

Perhaps I need some more information to reproduce your issue, since in all the tests I haven't found anything similar. Could you attach simple minimal example files that fcaR fails to process?

Thank you!

pattisot commented 4 years ago

Thanks for looking at this, neuroimaginador, and apologies for not sharing the proprietary data for my example. I did try producing a small data set, and came to suspect that the problem was due to either the (fairly) large size of the concept lattice being plotted, or the long label strings. Using a contranominal scale, I managed to synthesise a lattice which is larger than that for my data set, but which did not trigger the crash, so the number of concepts is not the issue. The length of the labels may be the cause.

Under RStudio Version 1.2.5033, R crashes with the more helpful error message:

Error: Edge length 68984.000000 larger than maximum 65535 allowed. Check for overwide nodes.

I will aim to followup with a MWE data set when time permits.