eval command evaluates a trained Neurenix model using specified metrics and test data.
Usage
Options
| Option | Type | Required | Default | Description |
|---|---|---|---|---|
--model | string | Yes | - | Path to the model file (.nrx format) |
--data | string | Yes | - | Path to evaluation data (file or directory) |
--metrics | string | No | accuracy,precision,recall,f1 | Comma-separated list of metrics |
--output | string | No | evaluation.json | Output file for evaluation results |
--batch-size | integer | No | 32 | Batch size for evaluation |
--device | string | No | auto | Device to use (cpu, cuda, auto) |
Available Metrics
The following metrics are supported:Classification Metrics
accuracy- Overall classification accuracyprecision- Precision scorerecall- Recall scoref1- F1 score (harmonic mean of precision and recall)auc- Area under the ROC curveconfusion_matrix- Confusion matrix
Regression Metrics
mse- Mean squared errorrmse- Root mean squared errormae- Mean absolute errorr2- R-squared score
Custom Metrics
You can also specify custom metrics defined in your Neurenix configuration.Examples
Basic evaluation
Specify custom metrics
Evaluate on directory of data
Custom output file
Force CPU evaluation
Regression metrics
Output Format
The evaluation results are saved as JSON:Data Format
CSV Files
For CSV files, the last column is treated as the label:Directory Structure
For image classification, organize data by class:Error Handling
Model not found
Data not found
Invalid metric
Best Practices
1. Use multiple metrics
Evaluate with comprehensive metrics:2. Separate test data
Keep test data completely separate from training:3. Save results with meaningful names
4. Batch size for large datasets
Use appropriate batch sizes:5. Compare multiple models
Integration with Other Commands
After training
Before deployment
See Also
- Run command - Train models
- Export command - Export models
- Serve command - Deploy models
- Monitor command - Monitor training