Algorithm-Classifier-NaiveBayes

 view release on metacpan or  search on metacpan

lib/Algorithm/Classifier/NaiveBayes.pm  view on Meta::CPAN

	if ( $model->{'priors'} ne 'trained' && $model->{'priors'} ne 'uniform' ) {
		die('"priors" is not "trained" or "uniform"');
	}

	$self->{'model'} = $model;
} ## end sub from_string

=head2 save

Saves the model to the specified file as JSON via to_string. The write
is done atomically, written to a temporary file and then renamed into
place, so the file will never contain a partially written model.

    $nb->save('model.json');

Will die if no file is specified or on failure to write the file.

=cut

sub save {
	my ( $self, $file ) = @_;



( run in 0.438 second using v1.01-cache-2.11-cpan-995e09ba956 )