Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(3)  |  Call(3)  |  Derive(0)  |  Import(0)

src/a/z/AZOrange-HEAD/azorange/trainingMethods/AZorngCvANN.py   AZOrange(Download)
            nHidden = self.nHidden
        layers = [len(self.trainData.domain.attributes)] + nHidden + [Nout]
        layerSizes = dataUtilities.List2CvMat(layers,"CV_32SC1")
        classifier.create(layerSizes, self.activationFunction, self.sigmoidAlpha, self.sigmoidBeta)
        #Train the model
                if actualClass in priors:
                    sample_weights[idx] = sample_weights[idx] * priors[actualClass]
            CV_sample_weights = dataUtilities.List2CvMat(sample_weights,"CV_32FC1")
        else:
            CV_sample_weights = None

src/a/z/AZOrange-HEAD/azorange/trainingMethods/AZorngCvSVM.py   AZOrange(Download)
            if self.verbose > 0: print "WARNING: The priors will not have any effect. They can only be used with C_SVC SVM-Type."
        elif priors:
            priors = dataUtilities. List2CvMat(priors)
 
        self.params.class_weights = priors