Skip to content

Commit

Permalink
Multi-level EDA. In-app analytics added.
Browse files Browse the repository at this point in the history
  • Loading branch information
ms8909 committed Jul 8, 2020
1 parent ff5c9cd commit a3cd52c
Show file tree
Hide file tree
Showing 8 changed files with 392 additions and 119 deletions.
Binary file modified __pycache__/explain.cpython-37.pyc
Binary file not shown.
22 changes: 13 additions & 9 deletions explain.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,14 @@
from imports import *
from dashboard import *
from calculate_shap import *
"""
This class calculates feature importance
Input:
"""


class explain():
def __init__(self):
super(explain, self).__init__()
self.param= {}
print("Get you API key here https://www.explainx.ai/.")
self.key=""
self.secret=""

# is classification function?

Expand Down Expand Up @@ -56,6 +51,7 @@ def ai(self, df, y, model, model_name="xgboost", mode=None):
prediction_col=[]

if model_name == "xgboost":
import xgboost
prediction_col = model.predict(xgboost.DMatrix(df))

elif model_name == "catboost":
Expand Down Expand Up @@ -115,7 +111,11 @@ def ai(self, df, y, model, model_name="xgboost", mode=None):

self.param["is_classification"]= is_classification

d= dashboard()
d= dashboard(self.key, self.secret)
allowed= d.increate_counter(model_name)
if allowed==False:
print("API key and secret are not correct. Please signup to access the API key here https://www.explainx.ai/.")
return False
d.find(self.df_final, y_variable, y_variable_predict, mode, self.param)

return True
Expand Down Expand Up @@ -143,6 +143,10 @@ def dataset_heloc(self):
X= dataset.drop("RiskPerformance", axis=1)
return X,y

def init(self, key="", secret=""):
self.key=key
self.secret= secret




Expand Down
Binary file modified lib/__pycache__/dashboard.cpython-37.pyc
Binary file not shown.
Binary file modified lib/__pycache__/imports.cpython-37.pyc
Binary file not shown.
Binary file modified lib/__pycache__/performance_metrics.cpython-37.pyc
Binary file not shown.
Loading

0 comments on commit a3cd52c

Please sign in to comment.