Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
# Function that plots a Lift Curve using the real label values of a dataset and the probability predictions of a Machine Learning Algorithm/model | |
# @Params: | |
# y_val: real labels of the data | |
# y_pred: probability predictions for such data | |
# step: how big we want the steps in the percentiles to be | |
def plot_Lift_curve(y_val, y_pred, step=0.01): | |
#Define an auxiliar dataframe to plot the curve | |
aux_lift = pd.DataFrame() |
This file contains hidden or 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 the necessary methods from tweepy library | |
from tweepy.streaming import StreamListener | |
from tweepy import OAuthHandler | |
from tweepy import Stream | |
import re | |
# Enter Twitter API Keys | |
access_token = "ENTER ACCESS TOKEN" | |
access_token_secret = "ENTER ACCESS TOKEN SECRET" | |
consumer_key = "ENTER CONSUMER KEY" |
This file contains hidden or 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 the necessary methods from tweepy library | |
from tweepy.streaming import StreamListener | |
from tweepy import OAuthHandler | |
from tweepy import Stream | |
# Enter Twitter API Keys | |
access_token = "ENTER ACCESS TOKEN" | |
access_token_secret = "ENTER ACCESS TOKEN SECRET" | |
consumer_key = "ENTER CONSUMER KEY" | |
consumer_secret = "ENTER CONSUMER SECRET" |