Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

try QDA #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/train.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ jobs:
dvc repro
git fetch --prune
echo "## Metrics: Workspace vs. Main"
dvc metrics diff --show-md master > report.md
# Add figure to the report
echo "## Validating results by region"
echo "## Validating results by region" >> report.md
cml-publish by_region.png --md >> report.md
cml-send-comment report.md
cml-send-comment report.md
4 changes: 2 additions & 2 deletions train.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import pandas as pd
import numpy as np
from sklearn.linear_model import LogisticRegression
from sklearn.discriminant_analysis import QuadraticDiscriminantAnalysis
from sklearn import preprocessing
from sklearn.model_selection import cross_val_predict
from sklearn.metrics import confusion_matrix
Expand Down Expand Up @@ -28,7 +28,7 @@


# Linear model
clf = LogisticRegression()
clf = QuadraticDiscriminantAnalysis()
yhat = cross_val_predict(clf, X, y, cv=5)

acc = np.mean(yhat==y)
Expand Down