def __init__(self):
        '''
		Ope file to data analysis
		'''

        open_ = OpenFile()
        self.data_ = open_.openfile()

        self.X_train, self.X_test, self.y_train, self.y_test = None, None, None, None
        #########################################################################################################
        '''LIST'''
        #########################################################################################################
        self.classifiers = [
            DecisionTreeClassifier(),
            RandomForestClassifier(),
            GradientBoostingClassifier()
        ]
        self.proba_list = []
        self.recall_classifier = []
        self.precision_classifier = []
        self.c_matrix_classifier = []
        self.y_predicted_all = []
        self.fpr_all = []
        self.tpr_all = []
        self.accuracy_score_all = []
        self.auc_all = []
        self.y_predicted_all = []
	def __init__(self):
		'''
		Ope file to data analysis
		'''

		open_ = OpenFile()
		self.data_ = open_.openfile()
		

		self.X_train, self.X_test, self.y_train, self.y_test = None, None, None, None
		#########################################################################################################
		'''LIST'''
		#########################################################################################################
		self.classifiers = [ DecisionTreeClassifier(), RandomForestClassifier(), GradientBoostingClassifier()]
		self.proba_list = []
		self.recall_classifier = []
		self.precision_classifier = []
		self.c_matrix_classifier = []
		self.y_predicted_all =[]
		self.fpr_all = []
		self.tpr_all = []
		self.accuracy_score_all = []
		self.auc_all = []
		self.y_predicted_all =[]
示例#3
0
from flask import Flask
from flask import render_template
from flask import request

import json
import cPickle
import sys

sys.path.append(
    "/home/patanjalichanakya/Documents/Galvanize/find_defaulter/code/")
from data_cleaning import OpenFile
from model_building import ModelBuilding

app = Flask(__name__)

open_ = OpenFile()
df = open_.openfile()

country_code = list(df.country_code)
activity = list(df.activity)
status = list(df.status)
sector = list(df.sector)
lat = list(df.lat)
long_ = list(df.long)
with open(
        "/home/patanjalichanakya/Documents/Galvanize/find_defaulter/data/country_code_list_1638.pickle"
) as f:
    file_read = f.read()
country_name = cPickle.loads(file_read)

示例#4
0
import pandas as pd
from flask import Flask
from flask import render_template
from flask import request
import json
import cPickle
import sys
sys.path.append("/home/patanjalichanakya/Documents/Galvanize/find_defaulter/code/")
from data_cleaning import OpenFile

app = Flask(__name__)

open_ = OpenFile()
df = open_.openfile()

country_code = list(df.country_code)
activity = list(df.activity)
status = list(df.status)
sector = list(df.sector)
lat = list(df.lat)
long_ = list(df.long)
with open("/home/patanjalichanakya/Documents/Galvanize/find_defaulter/data/country_code_list_1638.pickle") as f:
    file_read = f.read()
country_name = cPickle.loads(file_read)


@app.route('/')
def index():
    with open("/home/patanjalichanakya/Documents/Galvanize/find_defaulter/my_app/countries_geo.json") as f:
        f_read = f.read()
    geo_json= json.loads(f_read)