This file contains 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 -*- | |
""" | |
Regression Metrics | |
Author: Balamurali M | |
""" | |
import numpy as np | |
from sklearn.linear_model import LinearRegression | |
from sklearn.metrics import mean_absolute_error | |
from sklearn.metrics import mean_squared_error |
This file contains 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
""" | |
Classification Metrics | |
Author: Balamurali M | |
""" | |
import numpy as np | |
from sklearn.metrics import confusion_matrix, accuracy_score | |
from sklearn.metrics import cohen_kappa_score, classification_report | |
from sklearn import svm |
This file contains 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 -*- | |
""" | |
Author: Balamurali M | |
Markov Chain Example2 | |
""" | |
import numpy as np | |
#Current state | |
I = np.matrix([[0.5, 0.5]]) | |
#Transition Matrix |
This file contains 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 -*- | |
""" | |
Author: Balamurali M | |
Markov Chain Example | |
""" | |
import numpy as np | |
#Current state | |
I = np.matrix([[1, 0]]) | |
#Transition Matrix |
This file contains 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 -*- | |
""" | |
Standard Normal Distribution | |
Author: Balamurali M | |
""" | |
import numpy as np | |
import matplotlib.pyplot as plt | |
class norm1: |
This file contains 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
""" | |
Normal Distribution | |
Author: Balamurali M | |
""" | |
import numpy as np | |
import matplotlib.pyplot as plt | |
class norm1: | |
def __init__(self, a1, b1, c1): |