Skip to content

Instantly share code, notes, and snippets.

Avatar

Lakshay lakshay-arora

View GitHub Profile
View comapre_models.py
# compare performance of different classification models
classification.compare_models()
View pycaret_blender.py
# Ensemble: blending
blender = classification.blend_models(estimator_list=[classification_dt, classification_xgb])
View pycaret_boosting.py
# ensemble boosting
boosting = classification.ensemble_model(classification_dt, method= 'Boosting')
View pycaret_5.py
# build and tune the catboost model
tune_catboost = classification.tune_model('catboost')
View pycaret_4.py
# build the xgboost model
classification_xgb = classification.create_model('xgboost')
View pycaret_3.py
# build the decision tree model
classification_dt = classification.create_model('dt')
View pycaret_2.py
# import the classification module
from pycaret import classification
# setup the environment
classification_setup = classification.setup(data= data_classification, target='Personal Loan')
View pycaret_1.py
# importing pandas to read the CSV file
import pandas as pd
# read the data
data_classification = pd.read_csv('datasets/loan_train_data.csv')
# view the top rows of the data
data_classification.head()
View flask_14.py
# start flask
app = Flask(__name__)
# render default webpage
@app.route('/')
def home():
return render_template('home.html')
# when the post method detect, then redirect to success function
@app.route('/', methods=['POST', 'GET'])
View flask_13.py
# importing the required libraries
from flask import Flask, render_template, request, redirect, url_for
from joblib import load
from get_tweets import get_related_tweets
# load the pipeline object
pipeline = load("text_classification.joblib")
# function to get results for a particular text query
def requestResults(name):
You can’t perform that action at this time.