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 classification module | |
from pycaret.classification import * | |
# init setup | |
clf1 = setup(data, target = 'name-of-target') | |
# train adaboost model | |
adaboost = create_model('ada') | |
# AUC plot |
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 classification module | |
from pycaret.classification import * | |
# init setup | |
clf1 = setup(data, target = 'name-of-target') | |
# train a decision tree model | |
dt = create_model('dt') | |
# train a bagging classifier on dt |
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 classification module | |
from pycaret.classification import * | |
# init setup | |
clf1 = setup(data, target = 'name-of-target') | |
# return best model | |
best = compare_models() | |
# return best model based on Recall |
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
# Importing dataset | |
from pycaret.datasets import get_data | |
credit = get_data('credit') | |
# Importing module and initializing setup | |
from pycaret.classification import * | |
clf1 = setup(data = credit, target = 'default') | |
# create a model | |
xgboost = create_model('xgboost') |
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
FROM python:3.7 | |
RUN pip install virtualenv | |
ENV VIRTUAL_ENV=/venv | |
RUN virtualenv venv -p python3 | |
ENV PATH="VIRTUAL_ENV/bin:$PATH" | |
WORKDIR /app | |
ADD . /app |
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
# creating a copy of data | |
data2 = data.copy() | |
data2.dropna(axis=0, inplace=True) | |
data2['Converted'] = data2['Converted'].replace({1 : 'Yes', 0 : 'No'}) | |
# plotly visual | |
import plotly.express as px | |
fig = px.scatter(x=data2['Total Time Spent on Website'], y=data2['Asymmetrique Activity Score'], | |
color = data2['Converted'], template = 'plotly_white', |
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
FROM python:3.7 | |
RUN pip install virtualenv | |
ENV VIRTUAL_ENV=/venv | |
RUN virtualenv venv -p python3 | |
ENV PATH="VIRTUAL_ENV/bin:$PATH" | |
WORKDIR /app | |
ADD . /app |
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 os, ast | |
import pandas as pd | |
dataset = os.environ["INPUT_DATASET"] | |
target = os.environ["INPUT_TARGET"] | |
usecase = os.environ["INPUT_USECASE"] | |
dataset_path = "https://raw.githubusercontent.com/" + os.environ["GITHUB_REPOSITORY"] + "/master/" + os.environ["INPUT_DATASET"] + '.csv' | |
data = pd.read_csv(dataset_path) | |
data.head() |
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
name: PyCaret AutoML Git Action | |
on: | |
push : | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: PyCaret AutoML Git Action | |
id: model |
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
name: "PyCaret AutoML Git Action" | |
description: "A simple example of AutoML created using PyCaret 2.0" | |
author: "Moez Ali" | |
inputs: | |
DATASET: | |
description: "Dataset for Training" | |
required: true | |
default: "juice" | |
TARGET: | |
description: "Name of Target variable" |
NewerOlder