(self, Xtrain, ytrain, Xtest, ytest, description="ExperimentName")
Performs a validation given training data and test data. User is responsible for non-overlapping assignment of indices.

        Args:
            X [dim x num_data] input data to validate on
            y [1 x num_data] classes
def validate(self, Xtrain, ytrain, Xtest, ytest, description="ExperimentName"):
        """

        Performs a validation given training data and test data. User is responsible for non-overlapping assignment of indices.

        Args:
            X [dim x num_data] input data to validate on
            y [1 x num_data] classes
        """
        self.logger.info("Simple Validation.")
       
        self.model.compute(Xtrain, ytrain)

        self.logger.debug("Model computed.")

        true_positives, false_positives, true_negatives, false_negatives = (0,0,0,0)
        count = 0
        for i in ytest:
            self.logger.debug("Predicting %s/%s." % (count, len(ytest)))
            prediction = self.model.predict(Xtest[i])[0]
            if prediction == ytest[i]:
                true_positives = true_positives + 1
            else:
                false_positives = false_positives + 1
            count = count + 1
        self.add(ValidationResult(true_positives, true_negatives, false_positives, false_negatives, description))
def validate ( self , Xtrain , ytrain , Xtest , ytest , description = "ExperimentName" ) : self . logger . info ( "Simple Validation." ) self . model . compute ( Xtrain , ytrain ) self . logger . debug ( "Model computed." ) true_positives , false_positives , true_negatives , false_negatives = ( 0 , 0 , 0 , 0 ) count = 0 for i in ytest : self . logger . debug ( "Predicting %s/%s." % ( count , len ( ytest ) ) ) prediction = self . model . predict ( Xtest [ i ] ) [ 0 ] if prediction == ytest [ i ] : true_positives = true_positives + 1 else : false_positives = false_positives + 1 count = count + 1 self . add ( ValidationResult ( true_positives , true_negatives , false_positives , false_negatives , description ) )