fastreport


Namefastreport JSON
Version 0.0.6 PyPI version JSON
download
home_pagehttps://github.com/kishore-s-gowda/fastreport
Summary
upload_time2021-05-01 14:28:54
maintainer
docs_urlNone
authorKishore
requires_python
licenseMIT
keywords python regression classification algorithm
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Fastreport

Get report of different metrices  for classification and regression problem for many popular algorithms with single line of code. You have to pass only features(dataframe) and target(series) as arguments


Link to [PyPI](https://pypi.org/project/fastreport/)

Link to [Classification detailed example](https://github.com/kishore-s-gowda/fastreport/blob/master/Classification%20example.ipynb)

Link to [Regression detailed example](https://github.com/kishore-s-gowda/fastreport/blob/master/Regression%20Problem.ipynb)


## Installation

Run the following to install:

```python
pip install fastreport
```
### Install sklearn and xgboost

```python
pip install sklearn
```

```python
pip install xgboost
```


## Usage


### Classification

```python
import report


report.report_classification(df_features,df_target,algorithms='default',test_size=0.3,scaling=None,
                             large_data=False,encode='dummy',average='binary',change_data_type = False,
                             threshold=8,random_state=None):


```
    parameters
    ----------------------------

    df_features : Pandas DataFrame

    df_target : Pandas Series

    algorithms : List ,'default'=
                 [LogisticRegression(),
                 GaussianNB(),
                 DecisionTreeClassifier(),
                 RandomForestClassifier(),
                 GradientBoostingClassifier(),
                 AdaBoostClassifier(),
                 XGBClassifier()]
                 The above are the default algorithms, if one needs any specific algorithms, they have to import
                 libraries then pass the instances of alogorith as list
                 For example, if one needs random forest and adaboost only, then pass 

                 algorithms=[RandomForestClassifier(max_depth=8),AdaBoostClassifier()]
                 But, these libraries must be imported before passing into above list like


    test_size: If float, should be between 0.0 and 1.0 and represent the proportion of the 
               dataset to include in the test split.

    scaling : {'standard-scalar', 'min-max'} or None , default=None

    encode : {'dummy','onehot','label'} ,default='dummy'

    change_data_type : bool, default=False
                       Some columns will be of numerical datatype though there are only 2-3 unique values in that column,
                       so these columns must be converted to object as it is more relevant.
                       By setting change_data_type= True , these columns will be converted into object datatype

    threshold : int ,default=8
                Maximum unique value a column can have

    large_data : bool, default=False
                If the dataset is large then the parameter large_data should be set to True, 
                make sure if your system has enough memory before setting Large_data=True


    average : {'micro', 'macro', 'samples','weighted', 'binary'} or None, default='binary'
    This parameter is required for multiclass/multilabel targets.
    If ``None``, the scores for each class are returned. Otherwise, this
    determines the type of averaging performed on the data:

    ``'binary'``:
        Only report results for the class specified by ``pos_label``.
        This is applicable only if targets (``y_{true,pred}``) are binary.
    ``'micro'``:
        Calculate metrics globally by counting the total true positives,
        false negatives and false positives.
    ``'macro'``:
        Calculate metrics for each label, and find their unweighted
        mean.  This does not take label imbalance into account.
    ``'weighted'``:
        Calculate metrics for each label, and find their average weighted
        by support (the number of true instances for each label). This
        alters 'macro' to account for label imbalance; it can result in an
        F-score that is not between precision and recall.
    ``'samples'``:
        Calculate metrics for each instance, and find their average (only
        meaningful for multilabel classification where this differs from
        :func:`accuracy_score`).

    random_state : int, RandomState instance or None, default=None


### Regression

```python
import report

report.report_regression(df_features,df_target,algorithms='default',test_size=0.3,
                      scaling=None,large_data=False,change_data_type=True,encode='dummy',
                      threshold=8,random_state=None):

```
    parameters
    ----------------------------

    df_features : Pandas DataFrame

    df_target : Pandas Series

     algorithms : List ,'default'=
                 [LinearRegression(),
                 Lasso(),
                 Ridge(),
                 RandomForestRegressor(),
                 GradientBoostingRegressor(),
                 AdaBoostRegressor(),
                 XGBRegressor]
                 The above are the default algorithms, if one needs any specific algorithms, they have to import
                 libraries then pass the instances of alogorith as list
                 For example, if one needs random forest and adaboost only, then pass 

                 algorithms=[RandomForestRegressor(max_depth=8),AdaBoostRegressor()]
                 But, these libraries must be imported before passing into above list like

    test_size: If float, should be between 0.0 and 1.0 and represent the proportion of the 
               dataset to include in the test split.

    scaling : {'Standard-scalar', 'min-max'} or None , default=None

    encode : {'dummy','onehot','label'} ,default='dummy'

    change_data_type : bool, default=False
                       Some columns will be of numerical datatype though there are only 2-3 unique values in that column,
                       so these columns must be converted to object as it is more relevant.
                       By setting change_data_type= True , these columns will be converted into object datatype

    threshold : int ,default=8
                Maximum unique value a column can have

    large_data : bool, default=False
                If the dataset is large then the parameter large_data should be set to True, 
                make sure if your system has enough memory before setting Large_data=True

    random_state : int, RandomState instance or None, default=None


## Future works

1. Optimization
2. Add more functionality

## Drawbacks

1. Not suitable for very large datasets
2. Limited to existing users only

## License

© 2021 KISHORE S
This repository is licensed under the MIT license. See LICENSE for details.



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/kishore-s-gowda/fastreport",
    "name": "fastreport",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "python,regression,classification,algorithm",
    "author": "Kishore",
    "author_email": "<kishoresshankar@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/df/59/5f097f8d2ede8f1b5ccbb927c70d1355ebb9b622f406702ea2ab29ea60c3/fastreport-0.0.6.tar.gz",
    "platform": "",
    "description": "# Fastreport\n\nGet report of different metrices  for classification and regression problem for many popular algorithms with single line of code. You have to pass only features(dataframe) and target(series) as arguments\n\n\nLink to [PyPI](https://pypi.org/project/fastreport/)\n\nLink to [Classification detailed example](https://github.com/kishore-s-gowda/fastreport/blob/master/Classification%20example.ipynb)\n\nLink to [Regression detailed example](https://github.com/kishore-s-gowda/fastreport/blob/master/Regression%20Problem.ipynb)\n\n\n## Installation\n\nRun the following to install:\n\n```python\npip install fastreport\n```\n### Install sklearn and xgboost\n\n```python\npip install sklearn\n```\n\n```python\npip install xgboost\n```\n\n\n## Usage\n\n\n### Classification\n\n```python\nimport report\n\n\nreport.report_classification(df_features,df_target,algorithms='default',test_size=0.3,scaling=None,\n                             large_data=False,encode='dummy',average='binary',change_data_type = False,\n                             threshold=8,random_state=None):\n\n\n```\n    parameters\n    ----------------------------\n\n    df_features : Pandas DataFrame\n\n    df_target : Pandas Series\n\n    algorithms : List ,'default'=\n                 [LogisticRegression(),\n                 GaussianNB(),\n                 DecisionTreeClassifier(),\n                 RandomForestClassifier(),\n                 GradientBoostingClassifier(),\n                 AdaBoostClassifier(),\n                 XGBClassifier()]\n                 The above are the default algorithms, if one needs any specific algorithms, they have to import\n                 libraries then pass the instances of alogorith as list\n                 For example, if one needs random forest and adaboost only, then pass \n\n                 algorithms=[RandomForestClassifier(max_depth=8),AdaBoostClassifier()]\n                 But, these libraries must be imported before passing into above list like\n\n\n    test_size: If float, should be between 0.0 and 1.0 and represent the proportion of the \n               dataset to include in the test split.\n\n    scaling : {'standard-scalar', 'min-max'} or None , default=None\n\n    encode : {'dummy','onehot','label'} ,default='dummy'\n\n    change_data_type : bool, default=False\n                       Some columns will be of numerical datatype though there are only 2-3 unique values in that column,\n                       so these columns must be converted to object as it is more relevant.\n                       By setting change_data_type= True , these columns will be converted into object datatype\n\n    threshold : int ,default=8\n                Maximum unique value a column can have\n\n    large_data : bool, default=False\n                If the dataset is large then the parameter large_data should be set to True, \n                make sure if your system has enough memory before setting Large_data=True\n\n\n    average : {'micro', 'macro', 'samples','weighted', 'binary'} or None, default='binary'\n    This parameter is required for multiclass/multilabel targets.\n    If ``None``, the scores for each class are returned. Otherwise, this\n    determines the type of averaging performed on the data:\n\n    ``'binary'``:\n        Only report results for the class specified by ``pos_label``.\n        This is applicable only if targets (``y_{true,pred}``) are binary.\n    ``'micro'``:\n        Calculate metrics globally by counting the total true positives,\n        false negatives and false positives.\n    ``'macro'``:\n        Calculate metrics for each label, and find their unweighted\n        mean.  This does not take label imbalance into account.\n    ``'weighted'``:\n        Calculate metrics for each label, and find their average weighted\n        by support (the number of true instances for each label). This\n        alters 'macro' to account for label imbalance; it can result in an\n        F-score that is not between precision and recall.\n    ``'samples'``:\n        Calculate metrics for each instance, and find their average (only\n        meaningful for multilabel classification where this differs from\n        :func:`accuracy_score`).\n\n    random_state : int, RandomState instance or None, default=None\n\n\n### Regression\n\n```python\nimport report\n\nreport.report_regression(df_features,df_target,algorithms='default',test_size=0.3,\n                      scaling=None,large_data=False,change_data_type=True,encode='dummy',\n                      threshold=8,random_state=None):\n\n```\n    parameters\n    ----------------------------\n\n    df_features : Pandas DataFrame\n\n    df_target : Pandas Series\n\n     algorithms : List ,'default'=\n                 [LinearRegression(),\n                 Lasso(),\n                 Ridge(),\n                 RandomForestRegressor(),\n                 GradientBoostingRegressor(),\n                 AdaBoostRegressor(),\n                 XGBRegressor]\n                 The above are the default algorithms, if one needs any specific algorithms, they have to import\n                 libraries then pass the instances of alogorith as list\n                 For example, if one needs random forest and adaboost only, then pass \n\n                 algorithms=[RandomForestRegressor(max_depth=8),AdaBoostRegressor()]\n                 But, these libraries must be imported before passing into above list like\n\n    test_size: If float, should be between 0.0 and 1.0 and represent the proportion of the \n               dataset to include in the test split.\n\n    scaling : {'Standard-scalar', 'min-max'} or None , default=None\n\n    encode : {'dummy','onehot','label'} ,default='dummy'\n\n    change_data_type : bool, default=False\n                       Some columns will be of numerical datatype though there are only 2-3 unique values in that column,\n                       so these columns must be converted to object as it is more relevant.\n                       By setting change_data_type= True , these columns will be converted into object datatype\n\n    threshold : int ,default=8\n                Maximum unique value a column can have\n\n    large_data : bool, default=False\n                If the dataset is large then the parameter large_data should be set to True, \n                make sure if your system has enough memory before setting Large_data=True\n\n    random_state : int, RandomState instance or None, default=None\n\n\n## Future works\n\n1. Optimization\n2. Add more functionality\n\n## Drawbacks\n\n1. Not suitable for very large datasets\n2. Limited to existing users only\n\n## License\n\n\u00c2\u00a9 2021 KISHORE S\nThis repository is licensed under the MIT license. See LICENSE for details.\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "",
    "version": "0.0.6",
    "split_keywords": [
        "python",
        "regression",
        "classification",
        "algorithm"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "ad15ccb5379eb59909a01747029adff8",
                "sha256": "07fc68ac44a889ba6fa644e5041766fdace7006b169983a6a58e11ec3bf55be2"
            },
            "downloads": -1,
            "filename": "fastreport-0.0.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ad15ccb5379eb59909a01747029adff8",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 7729,
            "upload_time": "2021-05-01T14:28:52",
            "upload_time_iso_8601": "2021-05-01T14:28:52.442903Z",
            "url": "https://files.pythonhosted.org/packages/3b/b2/d81fa0bde7a4368428655e62fdcf37a49332735f5ea95cc01cd95427878d/fastreport-0.0.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "7bc13e3af665ea1e54636cca070e0e11",
                "sha256": "2d968af523f0f80b2a0a3e388d3c26e951bb9576bd5b610d771dc30717f15046"
            },
            "downloads": -1,
            "filename": "fastreport-0.0.6.tar.gz",
            "has_sig": false,
            "md5_digest": "7bc13e3af665ea1e54636cca070e0e11",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 4529,
            "upload_time": "2021-05-01T14:28:54",
            "upload_time_iso_8601": "2021-05-01T14:28:54.038410Z",
            "url": "https://files.pythonhosted.org/packages/df/59/5f097f8d2ede8f1b5ccbb927c70d1355ebb9b622f406702ea2ab29ea60c3/fastreport-0.0.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2021-05-01 14:28:54",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": null,
    "github_project": "kishore-s-gowda",
    "error": "Could not fetch GitHub repository",
    "lcname": "fastreport"
}
        
Elapsed time: 0.27642s