semvec/pypi-packages huggingface dataset:
bimmm 0.0.3
Package that makes it a bit easier to visualize and analyse Marketing Mix Models
License: MIT

# `bimmm`

The `bimmm` is a package to analyse MMM models and visualize them

## Installation

Use the package manager [pip](https://pip.pypa.io/en/stable/) to install bimmm.

```bash
pip install bimmm
```

## 1. Usage Decomposition for logistic regressions over time

```python

# import modules
import pandas as pd
import numpy as np
from bimmm.analyse_mmm_models import mmm, s_curve, decay
import ssl
import statsmodels.formula.api as smf
import plotly.io as pio
pio.renderers.default = "browser"
import warnings
warnings.filterwarnings("ignore")


# Get some example data (you might need to run ssl._create_default_https_context = ssl._create_unverified_context:
ssl._create_default_https_context = ssl._create_unverified_context
url = 'https://raw.githubusercontent.com/SimonTeg/nlodatascience/master/sales_vs_media.csv'
df_example = pd.read_csv(url)
# make a dataset for the historical data with the sales, and one to forecast the sales
df_train = df_example.iloc[:26]
df_forecast = df_example.iloc[26:]

# Make your model
formule = 'sales ~ s_curve(decay(tv, 0.3), 3) + s_curve(decay(radio, 0.2), 7) + jackpot + jan + apr + dec + ' \
          'sunday_near_drawing + event + competitor + consumer_trust'
model = smf.ols(formula=formule, data=df_train)

# mmm object maken
analyse_model = mmm(model=model, var_date=df_train.maand_jaar, df=df_train)

# Actual vs fit
analyse_model.actual_vs_fit_graph().show()

# Decompositie
analyse_model.decomposition_graph().show()
analyse_model.decompositie_sum()

# Kosten van de kanalen waarvan je de ROI wilt weten
media_dict = {'tv': 10, 'radio': 5}
analyse_model.roi(media_dict, 'sales')

# Model results
analyse_model.model_characteristics()
analyse_model.VIF()

# Analyse for adding variables
analyse_model.select_n_largest_outliers(5)
analyse_model.check_variables_to_add()
``` 

## License

Copyright (c) 2023 Rumiko
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
tfa-python-sdk 2.6.1
Telegram Factor Authentication python library
License: MIT

# Telegram Factor Authentication - Python SDK

[Python SDK document is in docs.tfasoft.com](https://docs.amirhossein.info/sdks/python)

If you are using **TFA** as your authentication service in your python applications, you can use our library.

## How to use the library

So, let's have a quick review of our steps.

- Installation
- Configuration
- Checking result

### Installation

The easiest step is installation. You can install it with `pip` or `pipenv`. Just go ahead and enter the command below:

```shell
$ pip3 install tfa-python-sdk
```

Congratulations! First step is done!

### Configuration

After installation, go to your file and import the library:

```python
from tfa_python_sdk import TFA
```

Second, you need to epecify the **accecc_token**. You can get it in your dashboard panel. So, call the class:

```python
auth = TFA('access_token')
```

Ok, now library know your access token. Now it's time to enter the **user_token**. User token is the code you get it from your form field or a post method. Importent is to get user token. So, we use `authUser` function to pass user token and get the result.

```python
result = auth.authUser('user_token')
```

You are done it this step. Let's move forward and check status codes and check user result.

### Checking result

When you get the result, you can check codes and see what are them. Here is a quick review:

```python
statCode = result['status']
data = result['data']

if (statCode == 200):
    print('Authenticated.')
    user = data['user']
else:
    print(data['message'])
```

Now if your code is 200, it means that you know have user. If it is else, it means your code is 401. For object that returns to you, chesk object below.

## Returned Objects

Here let's know about them in deep.

- ### 200

```json
{
    "user": {
        "_id": "document id",
        "uid": "telegram user id",
        "token": "one time token. Every time become null",
        "createdAt": "when created",
        "updatedAt": "last update",
        "__v": 0
    }
}
```

- ### 401

One is access token is wrong.

```json
{
    "message": "User authentication token is not valid"
}
```

Another is when user token is wrong.

```json
{
    "message": "Admin access token is not valid"
}
```

## Development

If you want to develop the library, it is so simple. Edit library codes and run `test.py` like this:

```shell
$ python3 test.py
```

> Before you start: **Remember the base or codes are stored in `tfa_python_sdk/tfa_python_sdk.py`. You need to edit there.
pydataanalysis 0.0.4
Data Analysis and  Visualization Functions
License: MIT
Keywords: python,data science,eda,data preprocessing,data analysis,machine learning

<h1>Data Analysis CheatSheet (everything you might need )</h1>
<p>
The project include four modules with functions to summarize and analysis dataset in order 
to understand properties and relationships.

[Read Documentation](https://tamer-george.github.io/docs/_build/html/index.html)
</p>
<h2>1. DESCRIPTIVE  MODULE</h2>
<h3>Answer the question (What Happen?)</h3>

Includes two modules:

            
- <i>pyeda.py</i><br>
Includes simple EDA functions that might be useful in general cases.<br><br>
- <i>pydatapreprocessing.py</i><br> 
Useful Functions for data preprocessing.<br>

        For Example:
        from descriptive import pyeda
        pyeda.visualize_different_plots_of_numeric_col(data_frame, column_name: str)


        For Example:
        from descriptive import pydatapreprocessing
        pydatapreprocessing.standardization_numerical_columns(data, numerical_column: list)
  <h2>2. DIAGNOSTIC MODULE</h2>
  <h3>Answer the question (Why did it happen?)</h3>
  <i>pydiagnostic.py</i><br><br>
  Include functions to apply hypothesis testing 
          
          For Example:
          from diagnostic import pydiagnostic
          pydiagnostic.display_test_p_value(p_value: float)   


<h2>3. PREDICTIVE MODULE </h2>
<h3>Answer the question (What is likely to Happen?)</h3>
<i>pypredictive.py</i> <br><br>
The module include functions for:
*    Regression  
*    Forcasting 
*    Classification  
*    Clustering   


        For Example:
        from predictive import pypredictive
        pypredictive.chi_value_plot(data)
<h2>4. PRESCRIPTIVE MODULE</h2> 
<h3>Answer the question (What action should we take?)</h3>

<i>pyprescriptive.py</i><br>

Module include functions that might be useful for classification 

        For Example:
        from prescriptive import pyprescriptive
        pyprescriptive.visualize_confusion_matrix(actual, predicted)