Git Product home page Git Product logo

fcalib's Introduction

fcalib — A library for algorithms in Formal Concept Analysis

Overview

FCAlib is an open-source, extensible library for Formal Concept Analysis (FCA) tool developers that implements the FCAAPI. It provides basic functionalities that are needed for building an FCA tool. It supports incomplete contexts and includes efficient implementations of basic FCA algorithms like implicational closure, next-closed set, etc. It implements the attribute exploration algorithm in such a way that it can be used together with a custom implemented expert that supports FCAAPI. Javadoc for FCAlib can be found here. FCAlib is extended by OntoComPlib for using attribute exploration together with OWL ontologies. The following code segment shows how to create a formal context, add attributes to it, create an expert for this context, and start attribute exploration:

  // Create a formal context whose attributes are of type String, and whose objects have
  // identifiers of type String
  FormalContext<String,String> context = new FormalContext<String,String>();
  
  // Create an expert for this context
  MyExpertClass<String> expert = new MyExpertClass<String>(context);
        
  // Add attributes to this context
  context.addAttribute("a");
  context.addAttribute("b");
  context.addAttribute("c");
        
  // Set expert for this context
  context.setExpert(expert);
  // Context listens to the actions of the expert
  expert.addExpertActionListener(context);
        
  // Create an expert action for starting attribute exploration           
  StartExplorationAction<String,String,FullObject<String,String>> action = 
          new StartExplorationAction<String,String,FullObject<String,String>>();
  action.setContext(context);
  // Fire the action, exploration starts...
  expert.fireExpertAction(action);

The following code segment shows how to create a set of implications for the above context, add implications to it, and compute next-closure:

  // Create a set of implications for the above context. Attributes are of type String
  ImplicationSet<String> = new ImplicationSet<String>(context);
          
  // Create a new implication with empty premise and conclusion
  Implication<String> imp = new Implication<String>();
          
  // Add attribute "a" to the premise
  imp.getPremise().add("a");
          
  // Add attribute "b" to the conclusion
  imp.getConclusion().add("b");
          
  // Add this implication to the implication set
  implications.add(imp);
          
  // Compute the next-closed set after mySet, and update mySet
  mySet = implications.nextClosure(mySet);

LICENSE

See LICENSE

Developers

Original Developer: Barış Sertkaya
Additional Developers: Julian Mendez, Francesco Kriegel, Daniel Borchmann

fcalib's People

Contributors

francesco-kriegel avatar julianmendez avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.