Skip to main content

A Python package for training neural networks on 5-dimensional datasets for interpolation tasks

Project description

Interpylate-FLS

A Python package for training neural networks on 5 dimensional datasets for interpolation tasks.

Features

  • NeuralNetwork: PyTorch-based neural network for regression tasks
  • DataLoader: Dataset loading and preprocessing utilities
  • Plotter: Visualization tools for model performance
  • Logger: Logging utilities

Installation

PYPI

pip install interpylate-fls

Local Installation

pip install -e .

Example Usage

from interpylate_fls import NeuralNetwork, DataLoader

# Load and preprocess data
loader = DataLoader('data.pkl')
data = loader.load_dataset()
X_train, X_test, X_val, y_train, y_test, y_val, _, _, _ = loader.inspect_data(data)

# Create and train neural network
nn = NeuralNetwork(
    X_train=X_train,
    y_train=y_train,
    X_val=X_val,
    y_val=y_val,
    X_test=X_test,
    y_test=y_test,
    hidden_layer_sizes=[64, 32],
    learning_rate=0.001,
    epochs=100
)

# Train the model
nn.train(verbose=True)

# Evaluate
mse, r2 = nn.evaluate()
print(f"MSE: {mse:.4f}, R²: {r2:.4f}")

# Make predictions
prediction = nn.predict([0.5, 0.5, 0.5, 0.5, 0.5])
print(f"Prediction: {prediction}")

Requirements

  • Python >= 3.9
  • PyTorch >= 2.2.0
  • scikit-learn >= 1.6.0
  • pandas >= 2.3.0
  • numpy >= 1.26.0, < 2.0.0
  • matplotlib >= 3.9.0
  • seaborn >= 0.13.0

License

MIT License

Author

Funmi Looi-Somoye

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

interpylate_fls-0.0.0.tar.gz (11.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

interpylate_fls-0.0.0-py3-none-any.whl (12.1 kB view details)

Uploaded Python 3

File details

Details for the file interpylate_fls-0.0.0.tar.gz.

File metadata

  • Download URL: interpylate_fls-0.0.0.tar.gz
  • Upload date:
  • Size: 11.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for interpylate_fls-0.0.0.tar.gz
Algorithm Hash digest
SHA256 7474ec86f8f7adb75a43ecfcc3569be3aa64d651e7234f1ed9472646bb28b87c
MD5 08ff63654ec8c54d36e08dcbed5c2909
BLAKE2b-256 1b0bfbae5479d11c7725c90ed405250aa2160dc58afc9de194981e0a4cca30f3

See more details on using hashes here.

File details

Details for the file interpylate_fls-0.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for interpylate_fls-0.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e56e03e82055dc47e4d2c4aea9e5d34cde0f8162e955d7e71b83201b477ccf77
MD5 56700fa29031b55cb049d20b0123d17c
BLAKE2b-256 3a8182c14e2477f727553646c23f634ba735151dd8270b2ed5b23e18c145eb6f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page