semvec/pypi-packages huggingface dataset:
mytdf 1.0.0.dev6
A more personalized investment strategy for defined contribution investors
Requires Python: >=3.6

# PIMCO MyTDF

PIMCO’s MyTDF (My Target Date Fund) is a new advisory service offered by PIMCO which creates a more personalized investment strategy for defined contribution investors. The process integrates PIMCO’s software with middleware providers or record-keeper’s systems to consume participant personal data and provide a custom portfolio allocation to a CIT version of Real Path Blend funds (plus an extra fixed income option).  The result is a response which contains an allocation which adds to 100% in addition to some supporting data.
DecisionBorder 0.0.3
Decision Border Visualizer for Classification Algorithms
Requires Python: >=3
Keywords: classification algorithm visualization matplotlib

# **DecisionBorder**
Decision Border Visualizer for Classification Algorithms

*****
![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/sveneschlbeck/dbv)
![PyPI](https://img.shields.io/pypi/v/dbv)
![PyPI - Status](https://img.shields.io/pypi/status/dbv)
![GitHub top language](https://img.shields.io/github/languages/top/sveneschlbeck/dbv)
![GitHub](https://img.shields.io/github/license/sveneschlbeck/dbv)
*****

## Project description

A python package for Machine Learning Engineers who want to visualize a classification algorithm's decision border.

## Installation

Use ``pip`` to install ``DecisionBorder`` by typing or copying the following command.
```python
pip install DecisionBorder
```

## License

This package is licensed under ``GPL-3.0 License``.

## Example usage

If you are working with a classification algorithm and 2-dimensional input data (e.g. tabular data with two input columns) and a target column, you can use the ``plot_classifier`` function to visualize the decision border. The usage of this function inside a Jupyter notebook is recommended.

Step 1: Load the data

```python
import pandas as pd

df = pd.read_csv(<path to .csv file>)
df.head()
```

The dataframe might look like this:

|  age       |  interest | success |
|------------|-----------|---------|
| 23.657801  | 18.859917 |  0.0    |
| 22.573729  | 17.969223 |  0.0    |
| 32.553424  | 29.463651 |  1.0    |

Step 2: Define X, y and split data

```python
from sklearn.model_selection import train_test_split

X = df[["age", "interest"]].values
y = df["success"].values

X_train, X_test, y_train, y_test = train_test_split(X, y, random_state = 0, test_size = 0.25)
```

Step 3: Define model

```python
from sklearn.naive_bayes import GaussianNB

model = GaussianNB()
model.fit(X_train, y_train)

print(model.score(X_test, y_test))
```

Step 4: Visualize Decision Border with ``plot_classifier``

- Import module from package with ``import DecisionBorder``
- Set parameters:
  - model: the model used to classify the data
  - X_train: training input data
  - y_train: training labels
  - proba:
    - True: Show soft decision border
    - False: Show hard decision border
  - xlabel: name of x-axis
  - ylabel: name of y-axis
  - figsize: figsize (in form of ``(width, height)``)

Examples:

```python
import DecisionBorder

# Plotting decision border for train data
plot_classifier(model, X_train, y_train, proba = False, xlabel = "Age", ylabel = "Interest")
```

```python
import DecisionBorder

# Plotting decision border for train data
plot_classifier(model, X_train, y_train, proba = True, xlabel = "Age", ylabel = "Interest")
```

The result looks like this:

![Plotted Decision Border](https://raw.githubusercontent.com/sveneschlbeck/dbv/main/sc.png)

## Source code & further information

The source code is maintained at https://github.com/sveneschlbeck/dbv  
There are also further information concerning the GPL license model, contributing guidelines and more...