Skip to content

Instantly share code, notes, and snippets.

View vappiah's full-sized avatar

vincentappiah vappiah

View GitHub Profile
@vappiah
vappiah / max_weight_clique_finder.py
Created March 26, 2022 10:05
This script finds the the clique with the clique with the largest weight
import matplotlib.pyplot as plt
import numpy as np
import networkx as nx
nodes = ["1", "2", "3", "4", "5"]
P = nx.Graph()
P.add_nodes_from(nodes)
weighted_edges = [
import matplotlib.pyplot as plt
import numpy as np
import networkx as nx
nodes=['1', '2', '3', '4', '5']
P=nx.Graph()
P.add_nodes_from(nodes)
weighted_edges=[('1', '2' ,0.11),('1', '3', 3.1),('1','5',2.25),('4','5',0.25),('2','5',0.2),('2','4',0.22),('2','3',0.2)]
@vappiah
vappiah / random forest issue.py
Last active March 4, 2022 19:24
Random Forest unexpected behaviour
import numpy as np
import matplotlib.pyplot as plt
from itertools import cycle
from sklearn import svm, datasets
from sklearn.metrics import roc_curve, auc
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import label_binarize
from sklearn.multiclass import OneVsRestClassifier
from sklearn.metrics import roc_auc_score