Skip to content

Instantly share code, notes, and snippets.

View JumpingDino's full-sized avatar

Rafael Saraiva JumpingDino

View GitHub Profile
@JumpingDino
JumpingDino / credit_siso.py
Created March 11, 2025 03:51
swap in swap out functionality
import numpy as np
import pandas as pd
from IPython.display import display
class SISOAnalysis:
def __init__(self, input_df, option='equal_volume'):
"""
Initializes the SISOAnalysis class with the given input dataframe and option.
Args:
@JumpingDino
JumpingDino / gini.py
Last active July 25, 2024 09:03
A code to calculate gini coefficient and an example for plotting
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
def gini(y_pred, y_true):
# casting
y_pred = np.array(y_pred)
y_true = np.array(y_true)