def compareBenchmarksOverUCIDatasets(): compare_benchmarks(preprocess2.readGermanNormalized(), "German") compare_benchmarks(preprocess2.readIonosphereNormalized(), "Ionosphere") compare_benchmarks(preprocess2.readMagicNormalized(), "Magic") compare_benchmarks(preprocess2.readSpambaseNormalized(), "Spambase") compare_benchmarks(preprocess2.readWdbcNormalized(), "WDBC") compare_benchmarks(preprocess2.readWpbcNormalized(), "WPBC") #compare_classifiers(preprocess2.readA8ANormalized(), "A8A") compare_benchmarks(preprocess2.readSvmguide3Normalized(), "svmguide3")
def onlineOverUCIDatasets(shuffle_var): olsf_online(preprocess2.readGermanNormalized(), "German", shuffle_var) olsf_online(preprocess2.readIonosphereNormalized(), "Ionosphere", shuffle_var) olsf_online(preprocess2.readMagicNormalized(), "Magic", shuffle_var) olsf_online(preprocess2.readSpambaseNormalized(), "Spambase", shuffle_var) olsf_online(preprocess2.readWdbcNormalized(), "WDBC", shuffle_var) olsf_online(preprocess2.readWpbcNormalized(), "WPBC", shuffle_var) olsf_online(preprocess2.readA8ANormalized(), "A8A", shuffle_var) olsf_online(preprocess2.readSvmguide3Normalized(), "svmguide3", shuffle_var)
def streamOverUCIDatasets(): olsf_stream(preprocess2.readGermanNormalized(), "German") olsf_stream(preprocess2.readIonosphereNormalized(), "Ionosphere") olsf_stream(preprocess2.readMagicNormalized(), "Magic") olsf_stream(preprocess2.readSpambaseNormalized(), "Spambase") olsf_stream(preprocess2.readWdbcNormalized(), "WDBC") olsf_stream(preprocess2.readWpbcNormalized(), "WPBC") olsf_stream(preprocess2.readA8ANormalized(), "A8A") olsf_stream(preprocess2.readSvmguide3Normalized(), "svmguide3")
np.unique(self.y)) self.weight_dict = misc.numpyArrayToDict(self.classifier.coef_[0], list(self.X[0].keys())) def initialize(self, training_set, training_labels): self.X = training_set self.y = training_labels self.init_classifier = np.zeros(len(self.X[0])).reshape(1, -1) def repackDict(self, values, keys): d = {} #print(len(keys)) #print(len(values)) for i in range(0, len(keys)): d[keys[i]] = values[i] return d data = preprocess2.readGermanNormalized() #data2=preprocess2.removeRandomData(data) X = [] y = [] for row in data: y.append(int(row['class_label'])) del row['class_label'] X.append(row) c = classifier() summary, error_vector = c.fit(X, y) misc.plotError(error_vector, "german")
def compareClassifiersOverUCIDatasets(): compare_classifiers(preprocess2.readGermanNormalized(), "German")
def streamOverUCIDatasets(): olvf_stream(preprocess2.readGermanNormalized(), "German")