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 pandas as pd | |
import numpy as np | |
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
# Ignore the warnings | |
import warnings | |
warnings.filterwarnings('always') | |
warnings.filterwarnings('ignore') | |
# data visualisation and manipulation | |
import numpy as np | |
import pandas as pd | |
import matplotlib.pyplot as plt | |
from matplotlib import style |
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
train=pd.read_csv("../RandomForest/voice.csv") | |
df=train.copy() |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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.cluster import DBSCAN | |
from sklearn import metrics | |
from sklearn.datasets import make_blobs | |
from sklearn.preprocessing import StandardScaler | |
# Generate sample data | |
centers = [[1, 1], [-1, -1], [1, -1]] | |
X, labels_true = make_blobs(n_samples=750, centers=centers, cluster_std=0.4, | |
random_state=0) |
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 matplotlib.pyplot as plt | |
from sklearn import metrics | |
from sklearn.datasets import make_circles | |
from sklearn.preprocessing import StandardScaler | |
from sklearn.cluster import DBSCAN | |
X, y = make_circles(n_samples=750, factor=0.3, noise=0.1) | |
X = StandardScaler().fit_transform(X) | |
y_pred = DBSCAN(eps=0.3, min_samples=10).fit_predict(X) |
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
from numpy import array | |
from numpy import mean | |
from numpy import cov | |
from numpy.linalg import eig | |
# define a small 3×2 matrix | |
matrix = array([[5, 6], [8, 10], [12, 18]]) | |
print("original Matrix: ") | |
print(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
import warnings | |
import pandas as pd | |
from sklearn import model_selection | |
from sklearn.linear_model import LogisticRegression | |
from sklearn.metrics import confusion_matrix | |
import matplotlib.pyplot as plt | |
%matplotlib inline | |
#ignore warnings | |
warnings.filterwarnings('ignore') |
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 modules | |
import warnings | |
import pandas as pd | |
import numpy as np | |
from sklearn import model_selection | |
from sklearn.linear_model import LogisticRegression | |
from sklearn import datasets | |
from sklearn.metrics import accuracy_score | |
#ignore warnings | |
warnings.filterwarnings('ignore') |
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 LogLoss | |
import warnings | |
import pandas | |
from sklearn import model_selection | |
from sklearn.linear_model import LogisticRegression | |
from sklearn.metrics import log_loss | |
warnings.filterwarnings('ignore') | |
url = "https://raw.githubusercontent.com/jbrownlee/Datasets/master/pima-indians-diabetes.data.csv" | |
dataframe = pandas.read_csv(url) |
OlderNewer