/FCAPS

This library provides a set of modules for working with formal concept analysis (FCA) and patern structures (PS).

Primary LanguageC++GNU General Public License v2.0GPL-2.0

FCAPS

License and copyright

Initial software, Aleksey Buzmakov, Copyright (c) INRIA and University of Lorraine, 2011-2015, Copyright NRU Higher School of Economics, 2016, GPL v2 license, v0.9

Compilation

You will need

Boost libraries should be in the root of the git folder under the name boost. You can put a symbolic (or a hard) link.

$ ln -s "path/to/boost" boost # Linux or MacOS

$ mklink /D boost "path/to/boost" # Windows

Boost library can be install in the system and then the corresponding folder should be linked to boost subfloder, or can be downloaded from the site. In this case some boost libraries (regex, thread, system, filesystem) should be compiled:

  • Go to boost folder and run

$ ./bootstrap.

  • Then build all libraries

$ ./b2 debug stage $ ./b2 release stage

  • If you want a faster compiling please read the instructions from the Boost* library. In particular the following could be used

$ ./b2 --with-system --with-filesystem --with-thread debug stage $ ./b2 --with-system --with-filesystem --with-thread release stage

The next step is to convert the project to your most loved envirement. For that run

$ premake5 {configuration}

The most widely used configurations are

$ premake5 vs2005|vs2008|...|vs2017 # for diferent version of visual studio sln* file

$ premake5 gmake # for GNU make file

$ premake5 codeblocks # for cbp file of code::blocks IDE

$ premake5 clean # for removing the created files

Basically this script fetches rapidjson and apply the file rapidjson.patch. Then it converts the description from the file premake5.lua to the format of your IDE in love. The file is placed in the build subdirectory. Then, I guess, you know what to do with the resulting file.

  • For the moment, on some configurations, e.g., Windows and MS Visual Studio, a manual naming of static linked libraries is needed. These libraries are found in boost/stage/libs, but their names are not fixed. They are named like "lib{BOOST LIB NAME}-bla-bla-bla".{a|lib}, for example 'libboost_regex-gcc34-mt-d-1_36.a'
  • Be careful, the boost libraries should be compiled by the same toolchain as the main program. For instance it is not possible to compile the boost libraries by the MSVS2015 toolchain and the program by the MSVS2013 toolchain. Errors of linkage occur in this case.

Repository content

The repository contains

  • the main executable project in Sofia-PS subfolder

  • library Tools with some shared tools

  • modules for different kind of pattern structures and different algorithms processing a context

    • StdFCA are modules for the standard FCA. There is algorithm AddIntent and the pattern structure processing binary contexts.

    [1] B. Ganter and R. Wille, Formal Concept Analysis: Mathematical Foundations, 1st ed. Springer, 1999.

    [2] D. G. Kourie, S. A. Obiedkov, B. W. Watson, and D. van der Merwe, “An incremental algorithm to construct a lattice of set intersections,” Sci. Comput. Program., vol. 74, no. 3, pp. 128–142, 2009.

    • PS-Modules are modules with diferent kinds of pattern structures

    [3] B. Ganter and S. O. Kuznetsov, “Pattern Structures and Their Projections,” in Conceptual Structures: Broadening the Base, vol. 2120, H. S. Delugach and G. Stumme, Eds. Springer Berlin Heidelberg, 2001, pp. 129–142.

    • SofiaModules are modules for direct search for stable concepts.

    [4] A. Buzmakov, S. O. Kuznetsov, and A. Napoli, “Fast Generation of Best Interval Patterns for Nonmonotonic Constraints,” in Machine Learning and Knowledge Discovery in Databases, vol. 9285, A. Appice, P. P. Rodrigues, V. Santos Costa, J. Gama, A. Jorge, and C. Soares, Eds. Springer International Publishing, 2015, pp. 157–172.

    • GastonGraphPatternEnumeratorModule is a special module for enumerating extents of graphs found by Gaston. It can be used in StabClsPatternProjectionChainModule modules from SofiaModules. This module has external dependency on file ../LibGastonForSofia/inc. That is the interface file of the library wrapping the Gaston code. If you are not going to use it, it can be excluded from the compilation.
    • SharedModulesLib are premodules (not registered modules, that are registered in other dynamic libraries) that can be directly used from other modules.
  • ClassifierModules are very basic modules for classification with pattern structures.

  • StabilityEstimatorContextProcessor is a simple module for computing stability of intents.

  • FCAPS/src/fcaps/premodules are never compiled or used files that probably will be convert to other modules.

This version of the software separates modules dynamic libraries from the executable file. If you are interested in the old version that has all modules inside the executable, the branch Modules-inside-Executable should be of interest for you. However, this branch is not developing any more. Only hotfixes (probably) are added there.

How to use

The examples of usage can be found here. The main executable has two principal parameters: -data is a json file with the context to process; and -CP is a json file with the description of a context processor module that is going to process the context. In particular AddIntent module or Sofia module are examples of such context processors. Ideally, the schemas of json files for any type of json descriptions used by the program should be found here, but the world is not ideal... not yet.