Skip to content

Instantly share code, notes, and snippets.

@gmyrianthous
Created August 20, 2023 08:34
Show Gist options
  • Save gmyrianthous/82d8a2608e383f36a042d2e190d9073f to your computer and use it in GitHub Desktop.
Save gmyrianthous/82d8a2608e383f36a042d2e190d9073f to your computer and use it in GitHub Desktop.
import numpy as np
from sklearn.linear_model import LogisticRegression
train_X = np.array([
[100, 1.1, 0.8],
[200, 1.0, 6.5],
[150, 1.3, 7.1],
[120, 1.2, 3.0],
[100, 1.1, 4.0],
[150, 1.2, 6.8],
])
train_Y = np.array([1.0, 2.1, 5.6, 7.8, 9.9, 4.5])
clf = LogisticRegression()
clf.fit(train_X, train_Y)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment