Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plans for lattice reduction? #7

Closed
jboynyc opened this issue May 26, 2020 · 4 comments
Closed

Plans for lattice reduction? #7

jboynyc opened this issue May 26, 2020 · 4 comments

Comments

@jboynyc
Copy link
Contributor

jboynyc commented May 26, 2020

Many thanks for your work on this! After playing around with this for a while I inevitably wound up with some messy lattices, so I was wondering whether you have any plans to include simple lattice reduction techniques based on stability, support and the like in concepts.

I came across this repository with an MIT-licensed Python implementation of lattice reduction, and if it's of interest I could try to integrate that in this library.

@xflr6
Copy link
Owner

xflr6 commented May 26, 2020

Thanks for the feedback (happy if this is useful to anyone).

lattice reduction

I think I am not familiar. Do you mean this method?

https://github.com/simplerick/nn_fca/blob/master/local/fca.py#L244-L249

Not sure if it uses the stability currently:

https://github.com/simplerick/nn_fca/blob/master/local/fca.py#L198-L203

Would this be for removing (omitting) arbitrary nodes from the graph when rendering for visualization or rather for keeping the reduced graph structure for further usage? Both Context and Lattice instances are treated as immutable in this library (and they point to each other); so the latter might require introducing a new type for a mutable graph detached from a context/lattice, but maybe there are other options.

@jboynyc
Copy link
Contributor Author

jboynyc commented May 27, 2020

I must admit I'm a novice, all I know about reduction/clarification is from this unit of the Coursera course on FCA. The basic idea, as I understand it, is that you set a cutoff point for stability, support or probability of concepts and eliminate them from the line graph to make it less noisy.

I'm mainly interested in this for the purposes of visualizing overall lattice structure, so mutating the data structures probably wouldn't be necessary.

@xflr6
Copy link
Owner

xflr6 commented Jun 3, 2020

Thanks for the link. IIUC both clarification and reduction are applied to the context (rather than its lattice) creating a new clarified/reduced context. So the reduced_lattice()-method mentioned above looks like a different kind of operation.

Adding e.g. Context.clarified() (or Definition.clarified()) seems straightforward (not sure if you have identical objects/attributes); I suspect .clarified(reduced=True) might require to dig in a bit into possible algorithms.

When it comes to removing nodes from the lattice graph (only for visualization or creating a new graph), I am wondering about the exact semantics: Say we have A < {B, C} < D, then removing B means removing the node and its edges (A, B) and (B, D). Removing C afterwards would additionally involve adding an edge (A, D) to keep the former transitive relations, right? Not sure if reduced_lattice() does that.

@jboynyc
Copy link
Contributor Author

jboynyc commented Jun 11, 2020

I think I need to do some more reading in this area. Since my original question was based on a misunderstanding, I'm going to close this issue. I'll come back to it when I have a better understanding.

@jboynyc jboynyc closed this as completed Jun 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants