Sinapsis Data Analysis
Module for machine learning model training, analysis, and inference, using the Scikit-learn and XGBoost libraries.
🐍 Installation • 🚀 Features • 📚 Usage Example • 📙 Documentation • 🔍 License
Sinapsis Data Analysis provides a comprehensive set of tools for machine learning model training, evaluation, and inference using industry-standard libraries like scikit-learn and XGBoost.
🐍 Installation
Install using your package manager of choice. We encourage the use of uv
Example with uv:
uv pip install sinapsis-data-analysis --extra-index-url https://pypi.sinapsis.tech
or with raw pip:
pip install sinapsis-data-analysis --extra-index-url https://pypi.sinapsis.tech
🚀 Features
Templates Supported
Sinapsis Data Analysis provides a variety of templates for machine learning workflows:
Scikit-Learn Models
The following model types are supported:
- Linear Models: LinearRegression, Ridge, Lasso, ElasticNet, LogisticRegression, etc.
- Neighbors Models: KNeighborsClassifier, KNeighborsRegressor, RadiusNeighborsClassifier, etc.
- Neural Network Models: MLPClassifier, MLPRegressor, BernoulliRBM
- SVM Models: SVC, SVR, LinearSVC, LinearSVR, NuSVC, NuSVR, OneClassSVM, etc.
- Tree Models: DecisionTreeClassifier, DecisionTreeRegressor, ExtraTreeClassifier, etc.
Each template uses the same base attributes:
generic_field_key(str, required): Key of the generic field where datasets are storedmodel_save_path(str, required): Path where the trained model will be saved
XGBoost Models
XGBoost model templates include:
- XGBClassifier
- XGBRegressor
- XGBRanker
- XGBRFClassifier
- XGBRFRegressor
- Booster
Attributes are the same as those for Scikit-learn templates.
Manifold Learning
Templates for dimensionality reduction using scikit-learn's manifold learning techniques:
- SKLearnManifold: Base class for all manifold learning algorithms
generic_field_key(str, required): Key of the generic field where the input data is stored
Specific algorithms include t-SNE, MDS, Isomap, LocallyLinearEmbedding, and more.
Inference Templates
Templates for using trained models to make predictions on new data:
- SKLearnInference: For inference with scikit-learn models
- XGBoostInference: For inference with XGBoost models
To use these templates, you should replace the model_path to point to the path of the trained model.
[!TIP] Use CLI command
sinapsis info --all-template-namesto show a list with all the available Template names installed with Sinapsis Data Analysis.
[!TIP] Use CLI command
sinapsis info --example-template-config TEMPLATE_NAMEto produce an example Agent config for the Template specified in TEMPLATE_NAME.
For example, for LinearRegression use sinapsis info --example-template-config LinearRegression to produce an example config.
📚 Usage Example
Below is an example configuration for **Sinapsis Data Analysis** using LinearRegressionWrapper for regression.Example config
agent:
name: sklearn_linear_models_agent
description: agent to train a LinearRegression model from scikit-learn using the load_diabetes dataset
templates:
- template_name: InputTemplate
class_name: InputTemplate
attributes: {}
- template_name: load_diabetesWrapper
class_name: load_diabetesWrapper
template_input: InputTemplate
attributes:
split_dataset: true
train_size: 0.8
load_diabetes:
return_X_y: false
as_frame: true
- template_name: LinearRegressionWrapper
class_name: LinearRegressionWrapper
template_input: load_diabetesWrapper
attributes:
generic_field_for_data: load_diabetesWrapper
model_save_path: "artifacts/linear_regression.joblib"
linearregression_init:
fit_intercept: true
copy_X: true
n_jobs: null
positive: false
To run the config, use the CLI:
sinapsis run name_of_config.yml
📙 Documentation
Documentation for this and other sinapsis packages is available on the sinapsis website
Tutorials for different projects within sinapsis are available at sinapsis tutorials page
🔍 License
This project is licensed under the AGPLv3 license, which encourages open collaboration and sharing. For more details, please refer to the LICENSE file.
For commercial use, please refer to our official Sinapsis website for information on obtaining a commercial license.
Metadata
Release files for sinapsis-data-analysis 0.1.16
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| sinapsis_data_analysis-0.1.16.tar.gz | 26.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sinapsis_data_analysis-0.1.16-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 56.5 kB
Release files / sinapsis_data_analysis-0.1.16.tar.gz
| Download URL | sinapsis_data_analysis-0.1.16.tar.gz |
|---|---|
| Size | 26.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
edf0b9aa63d59285ff3484b0141d9ccab2ac0b0a7122aa714ee415af6cf97de2
|
|
BLAKE2b-256 checksum How to use checksums |
a84f72ec6e79338ff6b0c831021c35f255da2e0c28144ae32b166984c4f9a08d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.5.16
|
Release files / sinapsis_data_analysis-0.1.16-py3-none-any.whl
| Download URL | sinapsis_data_analysis-0.1.16-py3-none-any.whl |
|---|---|
| Size | 30.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
25f31c7613773db35c32418aebeed0b717fec928433a91fadadd2b95c3dfe00b
|
|
BLAKE2b-256 checksum How to use checksums |
476b52e479360e8caca236633dd47df29e77c9364d5aaaf1e257bddd34b1e079
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.5.16
|