コード例 #1
0
ファイル: asgd_based_olvf.py プロジェクト: CopperWasp/OLVF
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")
コード例 #2
0
ファイル: olsf_vectorbased.py プロジェクト: CopperWasp/OLVF
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)
コード例 #3
0
ファイル: olsf_vectorbased.py プロジェクト: CopperWasp/OLVF
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")
コード例 #4
0
                                    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")
コード例 #5
0
ファイル: experiment.py プロジェクト: CopperWasp/OLVF
def compareClassifiersOverUCIDatasets():
    compare_classifiers(preprocess2.readGermanNormalized(), "German")
コード例 #6
0
ファイル: benchmark.py プロジェクト: CopperWasp/OLVF
def streamOverUCIDatasets():
    olvf_stream(preprocess2.readGermanNormalized(), "German")