Lazy binary classifier based on Formal Concept Analysis

## Project description

### Installation

```\$ pip install fca_lazy_clf
```

### Requirements

The train and test datasets must be represented as `pandas.DataFrame`. The classifier uses only attributes of types `numpy.dtype('O')`, `np.dtype('int64')` and attributes with 2 any values. Other attributes will not be used. The target attribute must be binary.

### Example

```>>> import fca_lazy_clf as fca
>>> import pandas as pd
>>> from sklearn import model_selection

TL TM TR ML MM MR BL BM BR  class
0  x  x  x  x  o  o  x  o  o   True
1  x  x  x  x  o  o  o  x  o   True
2  x  x  x  x  o  o  o  o  x   True
3  x  x  x  x  o  o  o  b  b   True
4  x  x  x  x  o  o  b  o  b   True

>>> X = data.iloc[:, :-1] # All attributes except the last one
>>> y = data.iloc[:, -1] # Last attribute
>>> X_train, X_test, y_train, y_test      = model_selection.train_test_split(X, y, test_size=0.33, random_state=0)

>>> clf = fca.LazyClassifier(threshold=0.000001, bias='false')
>>> clf.fit(X_train, y_train)
>>> clf.score(X_test, y_test)

0.9716088328075709
```

## Project details

This version 0.3 0.2 0.1
{"ft_lang_label":"__label__en","ft_lang_prob":0.59731877,"math_prob":0.9006794,"size":1489,"snap":"2021-04-2021-17","text_gpt3_token_len":406,"char_repetition_ratio":0.11986532,"word_repetition_ratio":0.055793993,"special_character_ratio":0.29952988,"punctuation_ratio":0.14851485,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.98891336,"pos_list":[0,1,2,3,4,5,6],"im_url_duplicate_count":[null,null,null,null,null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2021-01-18T19:57:31Z\",\"WARC-Record-ID\":\"<urn:uuid:c9f114c2-2809-41d6-a015-5b40504882a6>\",\"Content-Length\":\"47878\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:981fbe1a-5787-422f-a950-ebae5915f6ea>\",\"WARC-Concurrent-To\":\"<urn:uuid:a3a0d4b6-5649-4c27-ae84-e0822e7c8023>\",\"WARC-IP-Address\":\"151.101.64.223\",\"WARC-Target-URI\":\"https://pypi.org/project/fca-lazy-clf/\",\"WARC-Payload-Digest\":\"sha1:GIZUEFP37JAPQHDWJMVD4NNTAQFCNY7K\",\"WARC-Block-Digest\":\"sha1:DQ7NV4HOSOBNM3X6CNLCYWXZ7FMQQHAH\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2021/CC-MAIN-2021-04/CC-MAIN-2021-04_segments_1610703515235.25_warc_CC-MAIN-20210118185230-20210118215230-00517.warc.gz\"}"}