Training
Configure, run, and monitor model training
MathExec compiles your formula to a PyTorch model and trains it on your connected dataset. Training runs on the backend and streams results in real-time.
Starting Training
Two ways to begin:
- Press Cmd+Enter â starts training if a formula and dataset are connected
- Open the training drawer (Cmd+Shift+T) and click Train
âšī¸Note
Training requires both a recognized formula and a connected dataset. If only a formula exists, Cmd+Enter triggers recognition instead.
Training Drawer
The training drawer slides in from the right and shows configuration and results.
Configuration
| Setting | Options | Default |
|---|---|---|
| Epochs | 1 â 1000 | 100 |
| Learning Rate | 0.0001 â 1.0 | 0.01 |
| Batch Size | 8 â 512 | 32 |
| Optimizer | Adam, AdamW, SGD, RMSprop | Adam |
| Loss Function | Cross-Entropy, MSE, MAE, Huber | Auto-detected |
| Train/Test Split | 50% â 95% | 80% |
đĄTip
The loss function is auto-detected based on your target column. Binary targets â Cross-Entropy. Continuous targets â MSE. You can override this manually.
Live Results
During training, the drawer shows:
- Loss curve â real-time Plotly chart updated each epoch via SSE
- Progress bar â current epoch / total epochs
- ETA â estimated time remaining
Final Metrics
After training completes, metrics depend on the task type:
| Classification | Regression |
|---|---|
| Accuracy | MSE |
| F1 Score | MAE |
| Precision | R2 Score |
| Recall | RMSE |
Background Jobs
Training runs as a background job. You can navigate away from the canvas tab â a toast notification appears when training completes. The experiment is saved automatically.
Exporting Code
Click Export Code in the training results to download a standalone Python file containing:
- The PyTorch model class definition
- Trained weights
- Data loading and preprocessing code
- A prediction function ready for production use