-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
27 lines (20 loc) · 659 Bytes
/
main.py
File metadata and controls
27 lines (20 loc) · 659 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#import matplotlib.pyplot as plt
from KNN import Knn
from LDA import lda
from PCA import pca
def main():
# ASSERTS
knn_numeric = Knn.Knn_numeric(0)
filename = 'data/dataset1-1.csv'
comp_number = 1 #Numero de componentes principais
# PCA
#pca_inst = pca.PCA()
#(data, target, all_data) = pca_inst.get_data(filename, comp_number)
# LDA
lda_inst = lda.LDA()
(data, target, all_data) = lda_inst.get_data(filename, comp_number)
# Acuracia
(k, values) = knn_numeric.get_acuraccy_by_neighbor(data, target, all_data)
print(list(zip(k, values)))
if __name__ == '__main__':
main()