Skip to main content
Yanked

This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Consider using release 1.0.0 instead.
Reason given by maintainers: Has A major bug in importing

Updates

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

How to Use

1. Install

pip install memai

2. Import

import memai

3. Create a Dataset

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

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

4. Create a Model

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

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

5. Make a Prediction

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

AI.train([4])

then if you do:

print(AI.dataset)

you will see something like:

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

in the terminal

7. Get Correct Outputs

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.

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

import shaper

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

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

Example output:

==================================================
 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

Metadata

Release files for MemAI 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for MemAI 0.1.3
File Size Uploaded Provenance Actions
memai-0.1.3.tar.gz 3.6 kB Without provenance Details for memai-0.1.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for MemAI 0.1.3
File Interpreter ABI Platform Actions
memai-0.1.3-py3-none-any.whl Python 3 none any Details for memai-0.1.3-py3-none-any.whl

Total release size: 7.4 kB

Release files / memai-0.1.3.tar.gz

Download URL memai-0.1.3.tar.gz
Size 3.6 kB
Tags Source
SHA-256 checksum
How to use checksums
f4da29deeb578b9e28ba71640f881049a2c3516a43accb3f3637282dec736f02
BLAKE2b-256 checksum
How to use checksums
f4c3c671e93448038e4a0b52177690eb349fe3a6bb64d99105cb2d4ea001c9e6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.9

Release files / memai-0.1.3-py3-none-any.whl

Download URL memai-0.1.3-py3-none-any.whl
Size 3.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7266bff6ee93d60d9f4d2645b5fb91483f3d8a035bbf7ccd4dd87b1cc852b62c
BLAKE2b-256 checksum
How to use checksums
65453e6080d40eba0d940fbe972095182560e6347f0e0078fab390fca5a11ec4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.9

Security for MemAI 0.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page