semvec/pypi-packages huggingface dataset:
pyMSHRF 0.3.0
This program calculates the high-resolution filter score while doing GC/MS annotation.
Requires Python: >=3.2
Keywords: cheminformatics, GC/MS annotation, metabolomics

# pyMSHRF - HRF Calculator for GC/MS annotation

# Theoritical Background
`High-resolution filtering (HRF)` approach is both feasible and highly specific toward correct identifications, which bridges the gap between unit resolution GC/MS spectra and accurate mass data dubious. [(ref)](https://doi.org/10.1021/acs.analchem.5b01503)

The isotope pattern calculator module is based on pyISOPACh package. [(ref)](https://github.com/AberystwythSystemsBiology/pyISOPACh)


# Installation

pyMSHRF requires Python 3+ and is unfortunately not compatible with Python 2. If you are still using Python 2, a clever workaround is to install Python 3 and use that instead.

The easiest way of installing pyMSHRF is using ```pip```:

```
pip install pyMSHRF
```
# Usage
## Usage of HRF calculation function
```python
import pyMSHRF
import numpy as np

formula = 'C5H7N3O2'
peaks_query = np.array([[191.09071, 14670.0], [124.05742, 3543.0], [141.09334, 6191.0]], dtype = np.float32)

# Add TMS-derived group if desired
formula_derived = pyMSHRF.derivatization(formula, num_tms=1, num_meox=0)

# Calculate HRF score
HRF_score = pyMSHRF.HRF(formula, peaks_query, delta_da = 0.02)
print(f"HRF score is {HRF_score}.")
```
Calculate the `reverse high-resolution filtering (RHRF)` score need reference spectrum:

```python
peaks_reference = np.array([[82, 6.99], [141, 999.0], [124, 562.49]], dtype = np.float32)

# Calculate RHRF score
RHRF_score = pyMSHRF.RHRF(formula, peaks_query, peaks_reference, delta_da = 0.02)
print(f"RHRF score is {RHRF_score}.")
```


## Useful functions
### Reading Spectra from a File
For ease of use, a function named `read_one_spectrum` is provided in the pyMSHRF package, allowing you to easily read spectra from a file.[(ref)](https://github.com/YuanyueLi/MSEntropy) Here is an example of how you can use it:

```python
import pyMSHRF

# Load all spectra from file into python
spectra_list = list(pyMSHRF.read_one_spectrum('path/to/spectrum/file'))

# Get spectrum peak list
for spectrum in spectra_list:
    query_spec = spectrum['peaks']
```
This function returns a dictionary, where each key-value pair corresponds to a specific metadata of the spectrum.

Currently, the `read_one_spectrum` function supports the following file formats: `.mgf`, `.msp`, `.mzML`, and `.lbm2`.

# Reference
1. N. W. Kwiecien et al., High-Resolution Filtering for Improved Small Molecule Identification via GC/MS. Analytical Chemistry 87, 8328-8335 (2015).

2. <https://github.com/AberystwythSystemsBiology/pyISOPACh>

3. <https://github.com/YuanyueLi/MSEntropy>
bonsai-ml 0.0.7
bonsai
Requires Python: >=3.8
Keywords: Decision Tree, DT

# BONSAI: Globally Optimized Shallow Decision Trees via Efficient Search and Modeling

This repository contains the implementation and experiments for the BONSAI algorithm, introduced in our NeurIPS 2025 paper:  
**"BONSAI: Globally Optimized Shallow Decision Trees via Efficient Search and Modeling"**.

BONSAI is an optimization-based decision tree algorithm that supports both numerical and categorical features, enables multi-way splits, and produces compact, interpretable trees under depth constraints.

## 🔗 Paper
You can find the full paper [TBD] (update with actual link if needed).

## 🧠 Key Features
- Supports **multi-way splits** on numerical features.
- Handles **categorical features natively** (no need for one-hot encoding).
- Employs a **slot-node framework** to reduce search space.
- Uses a **MIP formulation** to optimize accuracy and interpretability jointly.
- Scalable to medium-sized datasets via threshold sampling and pruning.

## 📦 Installation

BONSAI is distributed as a Python package. To install:

```bash
pip install bonsai-ml
```

For a detailed walkthrough of the repository, including how to run the
examples and tests, see [FIRST_TIME_USERS.md](FIRST_TIME_USERS.md).
py_template_creator 3.1.0
Generate your python project template with ease.


  

# Py Template Creator

Py Template Creator is a pip package providing an easy way to jump-start a project or a micro-service.

## Installation

  

The project requires cookiecutter installed.

  

Install with pip

  

```pip install py_template_generator```

## Templates

  

- FastAPI monolith skeleton

- Service skeleton
  
  

## Usage

Template generator will create the template in the current directory.


```py_template_generator```

  
## Authors

  

- [@ivke-99](https://www.github.com/ivke-99)
  
  

## Contributing

  

Contributions are always welcome! :)