#C13305. SVM Classifier Evaluation with Hyperparameter Tuning

    ID: 42829 Type: Default 1000ms 256MiB

SVM Classifier Evaluation with Hyperparameter Tuning

SVM Classifier Evaluation with Hyperparameter Tuning

This problem requires you to build a Support Vector Machine (SVM) classifier on the Iris dataset. You are to perform hyperparameter tuning using grid search with cross-validation. After training, evaluate the model using four metrics: accuracy, precision, recall, and F1 score. The evaluation metrics should be output in JSON format. The iris dataset is preloaded from scikit-learn and no user input is required.

Note: All submissions should read input from standard input (stdin) and produce output to standard output (stdout). Even if there's no actual input, your program should be able to handle an empty input.

The evaluation metrics are expected to be greater than 0.9 for a successful model.

inputFormat

The program does not require any input. The standard input (stdin) will either be empty or contain a dummy input which should be safely ignored.

outputFormat

Output a JSON object to standard output (stdout) with the following keys and their corresponding evaluation metric values (floating point numbers):

  • accuracy
  • precision
  • recall
  • f1_score

Each of these metrics should ideally be greater than 0.9.

## sample
{"accuracy":1.0,"precision":1.0,"recall":1.0,"f1_score":1.0}