deep-ensemble 0.1
An Wrapper for performing ensembling techniques on deep learning models
Requires Python: >=3.6

<h1 align="center">DEEP ENSEMBLE</h1>

## Description
<p>In the context of deep learning, This library is a wrapper, It allows one to perform ensembling techniques such as Stacked Ensembling, Weighted Ensembling, Ensembling based on Votes.
 This library get in an array of predictions made by different models on which the user wants to perform ensembling and it performs either of the three ensembling technique based on user choice.

- What this does?
    * Gets array of predictions(probabilities)
    * Performs ensembling
- Ensembling Techniques included
    * Weighted Ensembling
    * Ensembling by Voting
    * Stacked Ensembling
    
</p>

## Deep Ensemble

<p>Deep Ensemble is a python package for ensembling the prediciton results. </p>

## How to use:

Step 1:
  Install the libaray

````python
pip install dataprep
````
Step 2:

  Import the library, and specify the path of the csv file. 
````python
from datacleaning import DataPrep

dp = DataPrep(file_uploaded='filename.csv')
cleaned_df = dp.start_cleaning()
````

There are some optional parameters that you can specify as listed below,

## Usage:

````python
from datacleaning import DataPrep

DataPrep(file_uploaded='filename.csv', separator=",", row_threshold=None, col_threshold=None,
         special_character=None, action=None, ignore_columns=None, imputation_type="RDF")
````

## Parameters

------

| Parameter | Default Value | Limit | Example |
| ------ | ------ | ------ | ------ |
| file_uploaded | ***none*** | Provide a CSV file. | filename.csv |
| separator | ***,*** | Separator used in csv file | ****;****
| row_threshold | ***none*** | 0 to 100 | 80 | 
| col_threshold | ***none*** | 0 to 100 | 80 | 
| special_character | Check the list below |Sspecify the character <br> that is not listed in default_list (see below) | [ '$' , '?' ] | 
| action | ***none*** | ***add*** or ***remove*** | add | 
| ignore_columns | ***none*** | Provide list of column names <br> to ignoring the special characters operation. | [ 'column1', 'column2' ] | 
| imputation_type | ***RDF*** | Select your preferred imputation <br> ***RDF***, ***KNN***, ***mean***, ***median***, ***most_frequent***, ***constant*** . | KNN | 


## Examples of using parameters

### - Appending extra special characters to the existing default_list

The DEFAULT SPECIAL CHARACTERS included in the package are shown below,

````python
default_list = ["!", '"', "#", "%", "&", "'", "(", ")",
                  "*", "+", ",", "-", ".", "/", ":", ";", "<",
                  "=", ">", "?", "@", "[", "\\", "]", "^", "_",
                  "`", "{", "|", "}", "~", "â€“", "//", "%*", ":/", ".;", "Ã˜", "Â§",'$',"Â£"]
````
How to remove a special character, say for example if you want to remove "?" and "%".

<i>Note:- Do not forget to give <b> action = 'remove' </b></i>

````python
from datacleaning import DataPrep

dp = DataPrep(file_uploaded='filename.csv', special_character =['?', '%'], action='remove')
cleaned_df = dp.start_cleaning()
````
How to add a special character, say for example if you want to add "Ã©" that is not in the default_list given above.

<i>Note:- Do not forget to give <b> action = 'add' </b></i>

````python
from datacleaning import DataPrep

dp = DataPrep(file_uploaded='filename.csv', special_character =['Ã©'], action='add')
cleaned_df = dp.start_cleaning()
````

### - Ignoring a particular columns and adding a special character
Say for example, column named "timestamp" and "date" needs to be removed and a special character needs to be added 'Ã©'

````python
from datacleaning import DataPrep

dp = DataPrep(file_uploaded='filename.csv', special_character =['Ã©'],
              action='add', ignore_columns=['timestamp', 'date'])
cleaned_df = dp.start_cleaning()
````

### - Changing threshold to remove null rows/columns above this given threshold value

````python
from datacleaning import DataPrep

dp = DataPrep(file_uploaded='filename.csv', row_threshold=50, col_threshold=90)
cleaned_df = dp.start_cleaning()
````    

### - Imputation methods available

  - RDF (RandomForest) -> (DEFAULT)
  - KNN (k-nearest neighbors)
  - mean
  - median
  - most_frequent
  - constant
  
````python
# Example for KNN imputation.
from datacleaning import DataPrep

dp = DataPrep(file_uploaded='filename.csv', imputation_type='KNN')
cleaned_df = dp.start_cleaning()
````

<h2 align="center"> --- THANK YOU, CHEERS --- </h2>