{% extends "base.html" %} {% block title %}Training Results - Data2Model{% endblock %} {% block content %}

Training Complete!

Your machine learning model has been successfully trained

Best Model: {{ pipeline.model_name }}

Problem Type: {{ pipeline.problem_type|title }}

Algorithm: {{ pipeline.model_name }}

Target Variable: {{ pipeline.target_name }}

Features Used: {{ pipeline.feature_names|length }}

Performance Metrics

{% if pipeline.problem_type == 'classification' %}

{{ "%.2f%%"|format(results.results.accuracy * 100) }}

Test Accuracy

{{ "%.2f%%"|format(results.results.precision * 100) }}

Precision

{{ "%.2f%%"|format(results.results.recall * 100) }}

Recall

{{ "%.2f%%"|format(results.results.f1_score * 100) }}

F1 Score

{% if results.results.validation_accuracy %}
Validation Set Accuracy: {{ "%.2f%%"|format(results.results.validation_accuracy * 100) }}
Large dataset detected - used 60% training, 20% testing, 20% validation split
{% endif %} {% elif pipeline.problem_type == 'regression' %}

{{ "%.4f"|format(results.results.r2_score) }}

Test R² Score

{{ "%.4f"|format(results.results.rmse) }}

RMSE

{{ "%.4f"|format(results.results.mae) }}

MAE

{{ "%.4f"|format(results.results.mse) }}

MSE

{% if results.results.validation_r2 %}
Validation Set Metrics: R² = {{ "%.4f"|format(results.results.validation_r2) }}, RMSE = {{ "%.4f"|format(results.results.validation_rmse) }}
Large dataset detected - used 60% training, 20% testing, 20% validation split
{% endif %} {% endif %}
Metrics Explained:
    {% if pipeline.problem_type == 'classification' %}
  • Accuracy: Percentage of correct predictions
  • Precision: Of predicted positives, how many were correct
  • Recall: Of actual positives, how many were found
  • F1 Score: Harmonic mean of precision and recall
  • {% else %}
  • R² Score: Proportion of variance explained (closer to 1 is better)
  • RMSE: Root Mean Square Error (lower is better)
  • MAE: Mean Absolute Error (lower is better)
  • MSE: Mean Squared Error (lower is better)
  • {% endif %}

Preprocessing Steps Applied

    {% for step in pipeline.preprocessing_steps %}
  1. {{ step }}
  2. {% endfor %}
{% if results.use_val %}
3-Way Split Used: {{ results.split_info }}
Model trained, tested, and validated — Prediction is fully unlocked!
{% else %}
2-Way Split Used: {{ results.split_info }}
Model trained and tested — Prediction is fully unlocked!
{% endif %}

Download Your Model

Save the trained model for future predictions

Download Model (.pkl)
🚀

Download Deployable Web App

Get a complete, ready-to-run Flask application with your trained model built-in.

Includes app.py, a beautiful index.html, model artifacts, and requirements.txt.
Just unzip → pip install -r requirements.txt → python app.py and you're live!

Download App (.zip)
app.py index.html model.pkl requirements.txt
{% if model_state.scaling_applied or model_state.encoding_applied %}
Download Preprocessing Artifacts

These fitted preprocessing objects were used during training. Download and reuse them during inference to ensure consistent transformations.

{% if model_state.scaling_applied %} Download Scaler (.pkl) Numeric {% endif %} {% if model_state.encoding_applied %} Download Encoder (.pkl) Categorical {% endif %}
{% endif %}
{% if predict_unlocked %} Make Predictions Unlocked {% else %} {% endif %} Train Another Model
{% endblock %}