Skip to main content

A kNN classifier optimized by P systems

Project description

kNN-P Classifier (Under Development)

Licence

Overview

This repository contains an implementation of the kNN-P classifier, an enhanced version of the k-nearest neighbors algorithm utilizing membrane computing. kNN-P is designed for parallel and distributed computing, which can improve the performance of the original k-nearest neighbors algorithm for classification tasks.

Please note that this project is currently under development.

Features

  • Implementation of the kNN-P classifier.
  • Designed for parallel and distributed computing.
  • Improved performance for classification tasks.

Installation

You can install this package using pip:

pip install knnp

Usage

from knnp.p_systems import kNN_P

# Create an instance of kNN-P
knn_p = kNN_P(n=100, d=2, q=10, m=5, k=3, maxstep=100)

# Load your training data (features) and class labels
training_data = ...
class_labels = ...

# Train the classifier
knn_p.fit(training_data, class_labels)

# Load your test data
test_data = ...

# Make predictions
predictions = knn_p.predict(test_data)

# Evaluate the predictions and calculate classification metrics
...

Contributing

Contributions to this project are welcome. Please follow these guidelines for contributing:

  1. Fork the repository.
  2. Create a new branch for your feature or bug fix.
  3. Commit your changes.
  4. Push your branch to your fork.
  5. Create a pull request with a clear description of your changes.

License

This project is open-source and available under the MIT License.

Contact

If you have questions or need further assistance, please feel free to reach out to Khushiyant.


Please note that this project is under development. Use it with caution, and contributions are encouraged.

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

kNNp-0.0.1.tar.gz (5.3 kB view hashes)

Uploaded Source

Built Distribution

kNNp-0.0.1-py3-none-any.whl (5.4 kB view hashes)

Uploaded Python 3

Supported by

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