Metadata-Version: 2.1
Name: randomForestRules-lukassykora
Version: 1.1.0
Summary: Random forest classification rules mining package
Home-page: https://github.com/lukassykora/randomForestRules
Author: Lukas Sykora
Author-email: lukassykora@seznam.cz
License: UNKNOWN
Description: # Random Forest Rules
         [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
        
        Get the representation of all rules found by sklearn RandomForestClassifier. It works in following way:
        
        - On each feature, it applies one-hot encoding that makes each column binary.
        - Random Forest runs on the features and a target attribute.
        - All trees are extracted from the Random Forest Regressor.
        - Decision Trees are split to classification rules.
        
        
        ## GIT repository
        
        https://github.com/lukassykora/randomForestRules
        
        ## Example
        ```python
        from randomForestRules import RandomForestRules
        import pandas as pd
        
        df = pd.read_csv("data/audiology.csv")
        df.columns = df.columns.str.replace("_", "-") # underscore not allowed
        df['target'] = df['binaryClass'].apply(lambda x: 1 if x == "P" else 0) # target musts be numerical
        # All feature columns
        cols=[]
        for col in df.columns:
            if col != 'binaryClass' and col != 'target':
                cols.append(col)
        # Initialize
        randomForest = RandomForestRules()
        # Load data
        randomForest.load_pandas(df)
        # Fit
        randomForest.fit(antecedents = cols, consequent = 'target', supp=0.005, conf=50)
        # Get result
        frame = randomForest.get_frame()
        ```
        
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
