semvec/pypi-packages huggingface dataset:
SocraCLV 0.9.9
CLV prediction

# SocraCLV

### Group project within the scope of the course DS223 – Marketing Analytics

The project aims to develop a Python package for predicting a customer's Lifetime Value (CLV) for an Internet package provider that can be applied to similar-scope companies in general. As the name suggests, the package is not just about analytics but involves a philosophically flavoured approach to understanding and predicting Customer Lifetime Value to gain meaningful insights about the long-term relationships between the company and customers.

## SetUp

To get started, run 

```python -m clv.db.schema ``` to create the schema

```python basic_clv.py``` to load the data in the root of the repo

```python calculate_clv.py``` To calculate CLV and put into dataset
OR
```python -m clv.db.schema && python basic_clv.py && python calculate_clv.py```
and ```python -m clv.api.fast``` to run the api

To check the db follow the link https://inloop.github.io/sqlite-viewer/

### POST example of clv prediction table
```bash
curl -X 'GET' \
  'http://127.0.0.1:8000/clv/2' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json'
```

```bash
curl -X 'POST' \
  'http://127.0.0.1:8000/clv/' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
"prediction_id": 9999,
"customer_id": 1,
"clv" :200,
"predicted_customer_type": "Lost Cause",
"is_campaign1_success": true,
"is_campaign2_success": true

}  '
```

### PUT example of clv prediction table
```bash
curl -X 'PUT' \
  'http://127.0.0.1:8000/clv/10' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
"clv" :200,
"predicted_customer_type": "Vulnerable Customer",
"is_campaign1_success": true,
"is_campaign2_success": true
}'
```

### DELETE example data from clv prediction table
```bash
curl -X 'DELETE' \
  'http://127.0.0.1:8000/clv/2' \
  -H 'accept: application/json'

```
gbm-autosplit 0.0.12
LightGBM/XGBoost interface which tunes n_estimator by splitting data, then refit with entire data
Requires Python: >=3.6

# gbm_autosplit

GBM scikit-learn interfaces which performs "early stopping" with single data set during `fit`.

"Early stopping" is great practice to tune the number of estimators for gradient boosting models. 
However it is not difficult to use it in tuning module in scikit-learn such as RandomizedSearchCV / GridSearchCV
because to use early stopping module requires two data sets but scikit learn does not have such interface.

To solve this situation, this interface performs following steps with in `fit`.
1. Split original input data into two randomly
2. Estimate `n_estimators` by using split data set with early stopping
3. Perform `fit` by using entire data set with estimated `n_estimators`


## Install

```
pip install gbm_autosplit
```

## Usage

```
import gbm_autosplit

estimator = gbm_autosplit.LGBMClassifier()
estimator.fit(x, y)
```
GSIBerror 1.1.0
A Python class to read the records and attributes from the background error covariance matrices compatible with the Gridpoint Statistical Interpolation in the .gcv file format.
Requires Python: >=3.9.18

# GSIBerror

GSIBerror is a python package that provides a class to read the records and attributes from the background error covariance matrices compatible with the [Gridpoint Statistical Interpolation](https://dtcenter.org/community-code/gridpoint-statistical-interpolation-gsi) in the `.gcv` file format.

<a href="https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode" target="_blank"><img src="https://mirrors.creativecommons.org/presskit/buttons/88x31/png/by-nc-sa.png" alt="CC-BY-NC-SA" width="100"/></a>
bsonschema 0.0.0
Validation similar to bsonschema using BSON types
Requires Python: >=3.8

# bsonschema

Simple bson validator written similarly to [jsonschema](https://github.com/python-jsonschema/jsonschema) but for BSON types.

### Example of Use

```
import bsonschema;

inst = read_bson_from_disk("./tests/test_bson_for_validation.bson")
valid = bsonschema.Validator(json.load(open("./tests/mdb_schema.json", "r")))
valid.validate(inst)
print('Test file passed validation.')
```