metadata
license: apache-2.0
datasets:
- scikit-learn/iris
metrics:
- accuracy
library_name: pytorch
pipeline_tag: tabular-classification
logistic-regression-iris
A logistic regression model trained on the Iris dataset.
It takes two inputs: 'PetalLengthCm'
and 'PetalWidthCm'
. It predicts whether the species is 'Iris-setosa'
.
It is a PyTorch adaptation of the scikit-learn model in Chapter 10 of Aurelien Geron's book 'Hands-On Machine Learning with Scikit-Learn, Keras, and TensorFlow'.
Experiment tracking: https://wandb.ai/sadhaklal/logistic-regression-iris
Metric
The validation set contains 30% of the examples (selected at random using stratification on the target variable):
from sklearn.model_selection import train_test_split
X_train, X_val, y_train, y_val = train_test_split(X.values, y.values, test_size=0.3, stratify=y, random_state=42)
Accuracy on the validation set: 1.0