Metadata-Version: 2.4
Name: MemAI
Version: 1.0.0
Summary: Memory based AI. It doesn't require any parameters and also doesn't require huge amount of data. just needs the sufficient
Author: Apan Dan
License-Expression: MIT
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: numpy


# Updates

- Changed Name from ***The-Shaper*** to ***Memai***
- Added the **train** feature

## How to Use

### 1. Install

```bash
pip install memai
```

### 2. Import

```python
import memai
```

### 3. Create a Dataset

Each dataset row contains `[input, output, loss]`. Inputs should be lists, even for a single value.

```python
dataset = [
    [[1], 3, -1],
    [[2], 3, 0],
    [[3], 5, 0]
]
```

### 4. Create a Model

```python
AI = memai.Model("MyModel", dataset, None)
```

The third argument is the modulo. Use `None` for no modulo.

### 5. Make a Prediction

```python
result = AI.think([2])
print(result)
```

### 6. Train                           (Newly Added)

The *train* function allows the model to learn by letting it try to answer a question and then
adding its try to te dataset. For example
```python
AI.train([4])
```
then if you do:
```python
print(AI.dataset)
```
you will see something like:

```consolas
[[[1],3,-1],[[2],3,0],[[3],5,0],[[4],5,0]]
```
                                     |
             Newly Added sublist  -----

in the terminal             
### 7. Get Correct Outputs

```python
print(AI.get_correct_outputs())
```

This returns the reconstructed outputs using `output - loss`.

### 8. Change the Dataset

Use the following code to change the dataset of the model.
*Warning : This fully changes the model. The whole dataset before will be lost after this is done.*

```python
AI.change_dataset([
    [[4], 7, 0],
    [[5], 8, 1]
])
```

## 9.Display the Dataset

Bored of doing ```print(AI.dataset)```to see the dataset all the time? There is a solution.
Use `display()` to print your model's dataset in a neat table. Nothing else

```python
import shaper

dataset = [
    [[1], 3, -1],
    [[2], 3, 0],
    [[3], 5, 0]
]

AI = shaper.Model("MyModel", dataset, None)
AI.display()
```

Example output:

```text
==================================================
 THE SHAPER: MyModel
==================================================
INPUT               OUTPUT         LOSS
--------------------------------------------------
[1]                 3              -1
[2]                 3              0
[3]                 5              0
==================================================
```

Each row shows the input, stored output, and loss.

The model will use the updated dataset for future predictions.



# Note:
This is actually the newer version of The-Shaper. The older vesrion has been archibed
