This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
from datetime import datetime | |
import requests | |
import pickle | |
import os.path | |
from googleapiclient.discovery import build | |
from google_auth_oauthlib.flow import InstalledAppFlow | |
from google.auth.transport.requests import Request |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import groovy.json.JsonOutput | |
import static groovy.io.FileType.FILES | |
pipeline { | |
agent any | |
stages { | |
stage('Build') { | |
steps { | |
catchError { | |
sh '$WORKSPACE/run_collection.sh' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
from sklearn.linear_model import LogisticRegression | |
def build_model_input(): | |
train_df = pd.read_csv('data/train.csv') | |
test_df = pd.read_csv('data/test.csv') | |
df = pd.concat([train_df, test_df]) | |
for col in df.columns: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Source: http://ethen8181.github.io/machine-learning/model_selection/auc/auc.html#Implementation | |
def _binary_clf_curve(y_true, y_score): | |
""" | |
Calculate true and false positives per binary classification | |
threshold (can be used for roc curve or precision/recall curve); | |
the calcuation makes the assumption that the positive case | |
will always be labeled as 1 | |
Parameters | |
---------- |