semvec/pypi-packages huggingface dataset:
aitool 0.0.294
useful algorithms
Requires Python: <4,>=3.6

[![AITool logo](https://raw.githubusercontent.com/deepgameai/aitool/main/docs/logo/logo.png)](https://deepgameai.github.io/2020-02-28-test-markdown/)

--------------------------------------------------------------------------------
# 以python库的形式快速复用

`pip install aitool --upgrade`
jrdb-model 0.2.10
ORM for JRDB

# JRDB-Model
ORM for JRDB with flask-sqlalchemy.  
You can store jrdb dataset to your database.  
This repository does not have fetching scripts.

## Setup
set your environmental variable below.  
e.g.  
`DB="sqlite:///tmp/jrdb.db"`  
https://flask-sqlalchemy.palletsprojects.com/en/2.x/config/

## Usage
### Install
```
pip install jrdb_model
```

### Load dataset
```
from  jrdb_model import KaisaiData  
kaisais = KaisaiData.query.filter_by(ymd='20181118').all()  
```
bellameta 1.2.2
Metadata service for digital pathology WSI scans
Requires Python: >=3.10

# Ballatrix Metadata

A microservice managing metadata of whole slide image (WSI) scans for digital pathology applications.

It operates on a storage sqlite database created by the [bellastore](https://github.com/spang-lab/bellastore) package.\
This database is particularly helpful when querying metadata of specific slides for downstream tasks
via our custom digital pathology API `bellapi`.

## Installation

The source code is currently hosted under [https://github.com/spang-lab/bellameta](https://github.com/spang-lab/bellameta).

Binary installers are available at PyPi.

```sh
pip install bellameta
```

## Usage

Under [docs/.env](docs/.env) you find a simple template for an .env file that needs to be located in your current environment and hold
the path to a `yaml` config file. A minimal config file is provided under [docs/bellameta.yaml](docs/bellameta.yaml).
This config defines the valid `Cohort` and `Task` types accesible by the package:

```python
from dotenv import load_dotenv
load_dotenv()

from bellameta.types import Cohort
print(Cohort.list())
```


In order to add metadata to a cohort of scans, a child class of the abstract base class `Metadata` needs to be implemented:

```python
from bellameta.database import Db
from bellameta.types import Cohort, Task
from bellameta.base_metadata import Metadata

class Example(Metadata):
    '''
    An example class inheriting from Metadata.

    We imagine this class to implement the metadata of a new cohort of scans that just arrived from the clinic.
    '''

    def __init__(self, db: Db):
        # here we need to specify the absolute path to the ingress directory as given in the ingress table
        # this serves as the identifier for our cohort
        super().__init__(db, '/tmp/tmpytfd3_47/example_cohort')
    def get_cohort(self, hash):
        # typing for cohorts is provided via bellameta/types
        return Cohort.Example.to_string()
    def get_stain(self, hash):
        # typing for stains is provided via pamly
        return Stain.to_string(Stain('HE'))
    def get_task(self, hash):
        # typing for tasks is provided via bellameta/types
        return [Task.Subtyping.to_string()]
```

In order to write this metadata to the database the class needs to be instantiated:

```python
example = Example(db=db)
example.write_many()
```

## Documentation

Along with the [source code](https://github.com/spang-lab/bellameta), under [docs/demo.ipynb](docs/demo.ipynb), we provide a demo leading you through the features of this package via an application scenario.
tabseq-feature-ordering 0.1.6
Feature Ordering Module from TabSeq (ICPR 2024)
Requires Python: >=3.8

# TabSeq Feature Ordering

[![PyPI version](https://img.shields.io/pypi/v/tabseq-feature-ordering.svg)](https://pypi.org/project/tabseq-feature-ordering/)
[![Python Versions](https://img.shields.io/pypi/pyversions/tabseq-feature-ordering.svg)](https://pypi.org/project/tabseq-feature-ordering/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![ICPR 2024 Paper](https://img.shields.io/badge/Paper-ICPR%202024-blue)](https://link.springer.com/chapter/10.1007/978-3-031-78128-5_27)
[![GitHub Stars](https://img.shields.io/github/stars/zadid6pretam/TabSeq?style=social)](https://github.com/zadid6pretam/TabSeq)

---

This module extracts and packages the feature ordering algorithm used in **TabSeq (ICPR 2024)** as a standalone utility, enabling integration into any tabular deep learning pipeline.



## Key Features

-  Variance-based intra-cluster ordering  
-  KMeans clustering for feature grouping  
-  Weighted global ordering from local cluster orders  
-  Minimal dependencies, flexible integration  

## Installation

```bash
pip install tabseq-feature-ordering
```

## Parameters

- `X_train`: Tabular training data as `pd.DataFrame`
- `cluster_size`: Number of clusters (e.g., 5)
- `sort_order`: Intra-cluster sorting order by variance (`'ascending'` or `'descending'`)

## Output

- `global_ordering`: List of column names in reordered order
- `X_train_reordered`: DataFrame with reordered columns

## Example

```python
import pandas as pd
import numpy as np
from tabseq_feature_ordering import reorder_features

# Example input
X = pd.DataFrame(np.random.rand(40, 80), columns=[f"F{i}" for i in range(80)])

# Run feature ordering (descending = high variance first)
order, X_reordered = reorder_features(X, cluster_size=5, ascending=False)

# Print the full reordered feature list
print("Reordered Features:\n", order)
```

## License

MIT License © 2024 Zadid Habib

## Citation

If you use this module, please cite our paper:

Habib, Al Zadid Sultan Bin, Kesheng Wang, Mary-Anne Hartley, Gianfranco Doretto, and Donald A. Adjeroh. "TabSeq: A Framework for Deep Learning on Tabular Data via Sequential Ordering." In International Conference on Pattern Recognition, pp. 418-434. Cham: Springer Nature Switzerland, 2024.

---

### Bibtex

```bash
@inproceedings{habib2024tabseq,
  title={TabSeq: A Framework for Deep Learning on Tabular Data via Sequential Ordering},
  author={Habib, Al Zadid Sultan Bin and Wang, Kesheng and Hartley, Mary-Anne and Doretto, Gianfranco and A. Adjeroh, Donald},
  booktitle={International Conference on Pattern Recognition},
  pages={418--434},
  year={2024},
  organization={Springer}
}
```