Metadata-Version: 2.4
Name: my727xgb
Version: 0.1.0
Summary: Automated dataset profiling, cleaning, visualization, and XGBoost modeling for tabular datasets.
Author: MY727INFOTECH INDIA PRIVATE LIMITED
License: MIT License
        
        Copyright (c) 2026 MY727INFOTECH INDIA PRIVATE LIMITED
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
Project-URL: Homepage, https://github.com/yourname/my727xgb
Project-URL: Documentation, https://github.com/yourname/my727xgb/tree/main/docs
Project-URL: Repository, https://github.com/yourname/my727xgb
Keywords: xgboost,automl,machine learning,data cleaning,data profiling,tabular data
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Operating System :: Microsoft :: Windows
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: <3.13,>=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pandas>=1.5
Requires-Dist: numpy>=1.23
Requires-Dist: scikit-learn>=1.2
Requires-Dist: xgboost>=1.7
Requires-Dist: matplotlib>=3.7
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: cython>=3.0; extra == "dev"
Requires-Dist: build; extra == "dev"
Dynamic: license-file

# MY727XGB

**Automated dataset profiling, cleaning, XGBoost modeling, evaluation, visualization, and reporting from a CSV file or pandas DataFrame.**

MY727XGB provides an automated machine-learning workflow built around XGBoost. With a single `analyze()` call, the package can inspect a dataset, clean and preprocess features, select or use a target column, detect the machine-learning task, train an XGBoost model, evaluate performance, generate visualizations, and produce HTML and JSON reports.

## Features

`analyze()` accepts a CSV file path or pandas DataFrame and can automatically:

- Profile the dataset, including schema, missing values, duplicates, cardinality, and distributions.
- Select a target column when one is not explicitly provided.
- Detect whether the task is classification or regression.
- Identify potential target-leakage risks.
- Clean duplicate rows, constant columns, ID-like columns, and high-missingness columns.
- Handle missing values and categorical features.
- Expand supported datetime features.
- Train an XGBoost model.
- Optionally perform hyperparameter tuning.
- Evaluate the trained model using task-appropriate metrics.
- Calculate feature importance.
- Generate exploratory data analysis charts.
- Generate target-distribution charts.
- Generate feature-importance charts.
- Generate classification or regression diagnostic charts where applicable.
- Produce HTML and JSON reports.
- Maintain analysis warnings, data-quality information, and an audit log.
- Save and reload trained `AutoXGB` pipelines.
- Generate predictions for new data.

## Supported Platform

MY727XGB version `0.1.0` currently provides a compiled wheel for:

- CPython 3.12
- Windows x86-64

The wheel tag is:

```text
cp312-cp312-win_amd64
```

## Installation

Install MY727XGB using pip:

```bash
pip install my727xgb
```

Verify the installation:

```bash
python -c "import my727xgb; print(my727xgb.__version__); print(my727xgb.__file__)"
```

## Quick Start

```python
import my727xgb


result = my727xgb.analyze(
    "data.csv",
    target="target_column",
)


print(result.summary())
```

MY727XGB automatically runs the analysis pipeline and returns an `AnalysisResult`.

## Analyze a CSV Dataset

```python
import my727xgb


result = my727xgb.analyze(
    r"C:\datasets\customers.csv",
    target="churned",
)


print(result)

print("\nTASK:")
print(result.task_type)

print("\nTARGET:")
print(result.selected_target)

print("\nMETRICS:")
print(result.metrics)
```

## Analyze a pandas DataFrame

```python
import pandas as pd
import my727xgb


df = pd.read_csv(
    r"C:\datasets\customers.csv"
)


result = my727xgb.analyze(
    df,
    target="churned",
)


print(result.summary())
```

## Automatic Target Selection

The `target` argument may be omitted when you want MY727XGB to select a target automatically.

```python
import my727xgb


result = my727xgb.analyze(
    "data.csv"
)


print("SELECTED TARGET:")
print(result.selected_target)

print("SELECTION METHOD:")
print(result.target_selection_method)

print("TARGET CONFIDENCE:")
print(result.target_confidence)

print("TARGET CANDIDATES:")
print(result.target_candidates)
```

For important production analyses, explicitly specifying the intended target column is recommended.

## Configuration

MY727XGB provides configuration objects for controlling model training and report generation.

```python
import my727xgb


config = my727xgb.AutoXGBConfig(
    model=my727xgb.ModelConfig(
        tune=False,
        n_estimators=100,
    ),
    report=my727xgb.ReportConfig(
        output_dir="./my727xgb_output",
    ),
)


result = my727xgb.analyze(
    "customers.csv",
    target="churned",
    config=config,
)


print(result.summary())
```

## Analysis Results

`analyze()` returns an `AnalysisResult`.

Common result attributes include:

```python
print(result.task_type)

print(result.selected_target)

print(result.metrics)

print(result.feature_importance)

print(result.data_quality_summary)

print(result.warnings)

print(result.audit_log)

print(result.artifacts)
```

A formatted text summary is available through:

```python
print(result.summary())
```

## Generated Charts and Reports

MY727XGB automatically generates charts and reports during analysis.

Generated artifact paths are available through:

```python
print(result.artifacts)
```

Depending on the dataset and task, generated visualizations can include:

- Missing-value chart
- Numeric distributions
- Categorical distributions
- Correlation heatmap
- Target distribution
- Feature importance
- Confusion matrix
- ROC curve
- Regression diagnostics

MY727XGB also generates:

```text
report.html
report.json
```

The default output directory is:

```text
./my727xgb_output
```

## Display Generated Charts in Jupyter Notebook

Charts are generated automatically and saved as PNG files.

They are not automatically displayed inline in Jupyter Notebook.

Use the following helper to display all generated visualization artifacts:

```python
import os

from IPython.display import Image, display


def display_charts(value):
    """Display generated PNG charts recursively."""

    if isinstance(value, dict):

        for child in value.values():
            display_charts(child)

    elif isinstance(value, (list, tuple)):

        for child in value:
            display_charts(child)

    elif (
        isinstance(value, str)
        and value.lower().endswith(".png")
    ):

        path = os.path.abspath(value)

        if os.path.isfile(path):

            print(path)

            display(
                Image(filename=path)
            )


display_charts(
    result.artifacts["visualizations"]
)
```

## Open the HTML Report

```python
import os
import webbrowser


report_path = os.path.abspath(
    result.artifacts["html_report"]
)


webbrowser.open(
    "file:///" + report_path.replace("\\", "/")
)
```

## Model Persistence

For reusable prediction pipelines, use `AutoXGB`.

```python
import my727xgb


auto = my727xgb.AutoXGB(
    target="churned",
)


result = auto.fit(
    "customers.csv"
)


saved_path = auto.save(
    "saved_model"
)


print("MODEL SAVED:")
print(saved_path)
```

Load the saved pipeline:

```python
import my727xgb


loaded_auto = my727xgb.AutoXGB.load(
    "saved_model"
)


predictions = loaded_auto.predict(
    "new_customers.csv"
)


print(predictions)
```

MY727XGB's save/load workflow has been tested by comparing predictions before saving and after loading the trained pipeline.

## Credit Card Fraud Classification Example

MY727XGB has been tested on a highly imbalanced credit-card fraud dataset containing 284,807 rows.

```python
import my727xgb


result = my727xgb.analyze(
    r"C:\datasets\creditcard.csv",
    target="Class",
)


print(result.summary())

print(result.metrics)

print(result.artifacts)
```

For highly imbalanced datasets, accuracy should not be interpreted alone. Review ROC AUC, precision, recall, F1 score, and the confusion matrix when evaluating model performance.

## Documentation

For a beginner-focused walkthrough from installation through generated charts and reports, see:

```text
USER_GUIDE.md
```

For detailed API behavior, configuration, preprocessing, model persistence, artifacts, troubleshooting, and other advanced topics, see:

```text
docs/REFERENCE_GUIDE.md
```

## Project Layout

The development repository separates the readable private implementation from the distributed package.

```text
my727xgb/
│
├── README.md
├── USER_GUIDE.md
├── LICENSE
├── pyproject.toml
├── setup.py
│
├── docs/
│   └── REFERENCE_GUIDE.md
│
├── build_tools/
├── private_source/
├── public_src/
├── tests/
└── dist/
```

The readable implementation under `private_source/` is not distributed in the release wheel.

The compiled engine is built into a platform-specific extension module for distribution.

Compilation can make casual source inspection more difficult, but it should not be considered absolute protection against reverse engineering.

## Development

Install development dependencies:

```bash
pip install -e ".[dev]"
```

Run the test suite:

```bash
python -m pytest
```

Verify a built wheel:

```bash
python build_tools/verify_wheel.py dist\my727xgb-0.1.0-cp312-cp312-win_amd64.whl
```

Run the installed-wheel smoke test from outside the repository using the Python interpreter where the wheel was installed:

```bash
python path\to\test_installed_wheel.py
```

## Version

Current release:

```text
0.1.0
```

MY727XGB `0.1.0` is the initial public release. The public API may evolve before version `1.0.0`.

Users deploying MY727XGB in production environments should pin the package version.

## License

MIT License.

See `LICENSE` for details.
