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
import seaborn as sn | |
from numpy import newaxis | |
from sklearn.metrics import confusion_matrix, classification_report, accuracy_score, f1_score, average_precision_score, recall_score | |
from sklearn.metrics import precision_recall_fscore_support as score | |
import matplotlib.pyplot as plt | |
from sklearn import preprocessing | |
from sklearn.model_selection import train_test_split | |
def plot_heat_map(ax, X, Y, Z, xlabel, ylabel, format='d', title='Heat Map'): | |
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
import numpy as np | |
NaN = np.nan | |
import pandas as pd | |
# The ratings by users (U) | |
df = pd.DataFrame(np.array([[8,NaN,10,NaN,10], | |
[NaN,2,NaN,3,3], | |
[2,8,NaN,4,1], |
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
import numpy as np | |
import pandas as pd | |
import matplotlib.pyplot as plt | |
import networkx as nx | |
df = pd.DataFrame(np.zeros((5,14)), columns = ['علی','مدرسه', 'را', 'دوست','دار', | |
'برای','او','زندان', 'است', 'کمی','در','درس','خوان', 'بازیگوش']) | |
s1 = 'علی مدرسه را دوست دار' |
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
import numpy as np | |
from scipy.stats import multivariate_normal | |
from sklearn.feature_selection import VarianceThreshold | |
from sklearn.metrics import accuracy_score | |
import seaborn as sn | |
from sklearn.metrics import confusion_matrix, classification_report, accuracy_score, f1_score | |
import matplotlib.pyplot as plt | |
from sklearn import preprocessing |
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
import numpy as np | |
from sklearn import preprocessing | |
from sklearn.metrics import accuracy_score | |
from sklearn.metrics import confusion_matrix | |
import matplotlib.pyplot as plt | |
import itertools | |
import seaborn as sn | |
from sklearn.metrics import confusion_matrix, classification_report, accuracy_score, f1_score | |
import matplotlib.pyplot as plt |
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
import numpy as np | |
import pandas as pd | |
from sklearn.metrics import confusion_matrix | |
from sklearn.metrics import accuracy_score | |
from sklearn import preprocessing | |
from sklearn.neighbors import KNeighborsClassifier | |
from sklearn.neighbors import RadiusNeighborsClassifier | |
from sklearn.naive_bayes import GaussianNB | |
import matplotlib.pyplot as plt |
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
import numpy as np | |
import pandas as pd | |
from sklearn.metrics import confusion_matrix | |
from sklearn.metrics import accuracy_score | |
from sklearn import preprocessing | |
from sklearn.neighbors import KNeighborsClassifier | |
from sklearn.neighbors import RadiusNeighborsClassifier | |
from sklearn.naive_bayes import GaussianNB | |
import matplotlib.pyplot as plt |
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
import numpy as np | |
import pandas as pd | |
from sklearn.metrics import confusion_matrix | |
from sklearn.metrics import accuracy_score | |
from sklearn import preprocessing | |
from sklearn.neighbors import KNeighborsClassifier | |
from sklearn.neighbors import RadiusNeighborsClassifier | |
from sklearn.naive_bayes import GaussianNB | |
import matplotlib.pyplot as plt |
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
import nltk, re, pprint | |
from nltk import word_tokenize | |
import numpy as np | |
import pandas as pd | |
import heapq | |
import string | |
from sklearn.naive_bayes import GaussianNB | |
from sklearn.linear_model import LogisticRegression |
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
import matplotlib.pyplot as plt | |
import numpy as np | |
import pandas as pd | |
from numpy import array | |
from numpy import mean | |
from numpy import cov | |
from numpy.linalg import eig, svd |
OlderNewer