semvec/pypi-packages huggingface dataset:
ml-packages 1.0
A package for Logistic Regression, KNN, and Decision Linear SVM

## ML Package: Logistic Regression, KNN, and Linear SVM

This package, mlpackage, provides implementations of three popular machine learning algorithms:

- Logistic Regression with Softmax

- K-Nearest Neighbors (KNN) Classifier

- Linear Support Vector Machine (SVM)

It also includes test scripts to validate each module's functionality.

## Usage

# Logistic Regression with Softmax

Example:

```python

from mlpackage.logistic_regression import LogisticRegressionSoftmax
import numpy as np

# Sample data
X = np.array([[1, 2], [2, 3], [3, 4]])
y = np.array([0, 1, 0])

# Train the model
model = LogisticRegressionSoftmax(learning_rate=0.1, epochs=1000)
model.fit(X, y)

# Make predictions
predictions = model.predict(X)
print(predictions)
```
# K-Nearest Neighbors (KNN) Classifier

Example:

```python
from mlpackage.knn import KNNClassifier
import numpy as np

# Sample data
X = np.array([[1, 1], [2, 2], [3, 3]])
y = np.array([0, 1, 0])

# Train and predict
model = KNNClassifier(k=1)
model.fit(X, y)
predictions = model.predict(X)
print(predictions)
```

# Linear Support Vector Machine (SVM)
Example:

```python
from mlpackage.linear_svm import LinearSVM
import numpy as np

# Sample data
X = np.array([[1, 2], [2, 3], [3, 4]])
y = np.array([1, -1, 1])

# Train the model
model = LinearSVM(learning_rate=0.001, epochs=1000, lambda_param=0.01)
model.fit(X, y)

# Make predictions
predictions = model.predict(X)
print(predictions)
```
# Running Tests

To verify the implementation, you can run the unit tests located in the tests/ directory.

# Run All Tests:
```python
python -m unittest discover -s tests -p "*.py" -v

#Example Output
test_fit_predict (tests.test_logistic_regression.TestLogisticRegression) ... ok
test_fit_predict (tests.test_knn.TestKNNClassifier) ... ok
test_fit_predict (tests.test_linear_svm.TestLinearSVM) ... ok

----------------------------------------------------------------------
Ran 3 tests in 0.XXXs

OK
```

# Dependencies

- Python 3.6+

- NumPy
vka 1.2.31
module for the vk api wrapper
Requires Python: >=3.10


<p align="center">
  <a href="https://github.com/MrCreEper002/vka">
    <img height="150px" alt="vka" src="https://raw.githubusercontent.com/MrCreEper002/vka/master/docs/logo.png">
  </a>
</p>
<h1 align="center">
  vka 
</h1>
<p align="center">
    <em><b>инструмент для создания ботов для ВКонтакте на Python</b></em>
</p>

***
[![PyPI](https://img.shields.io/pypi/v/vka.svg)](https://pypi.org/project/vka/) ![Python 3.x](https://img.shields.io/pypi/pyversions/vka.svg)
***
![Static Badge](https://img.shields.io/badge/MrCreEper002-vka-vka)
![GitHub top language](https://img.shields.io/github/languages/top/MrCreEper002/vka)
![GitHub](https://img.shields.io/github/license/MrCreEper002/vka)
![GitHub Repo stars](https://img.shields.io/github/stars/MrCreEper002/vka)
[![Documentation Status](https://readthedocs.org/projects/vka/badge/?version=latest)](https://vka.readthedocs.io/ru/latest/?badge=latest)

#### Модуль сделана по основам [vk_api](https://github.com/python273/vk_api) и [vkquick](https://github.com/deknowny/vkquick)

[//]: # (***)
# Установка 
```shell
pip install vka
```
[//]: # ([![Typing SVG]&#40;https://readme-typing-svg.herokuapp.com?color=%2336BCF7&lines=pip+install+vka&#41;]&#40;https://git.io/typing-svg&#41;)

# Полезная информация
* __Информация о _API___
  * __[API](https://dev.vk.com/ru)__
* __Информация о _vka___
  * __[Документация](https://vka.readthedocs.io/ru/latest/?badge=latest)__
  * __[Официальный канал в Telegram](https://t.me/vka_official)__
***

```python

from vka import API
import asyncio


async def main():
    api = API(token='token')
    await api.async_init()  # открывает сессию для работы, без этого не работает
    # Есть два варианта обращение к API методам отличие лишь в написание
    # первый вариант
    users_get = await api.method('users.get', {'user_ids': 1})
    # второй вариант
    users_get = api.users.get(user_ids=1)

    # обязательно нужно закрыть сессию иначе будет вылезать ошибка о не закрытой сессию
    await api.close()


asyncio.run(main())

```
gisboys-library 0.2.3
Python library used and complemented by GisSense
Requires Python: >=3.12

# gisboys-library
Python library used and complemented by GisSense  
Maintained by GisSense  
https://www.gissense.com  


# LogHelper
Logging class for easy logging

### ILogHelper
Interface for LogHelper (Pythonic way as an abstract class)