AI-Perceptron-Simple
view release on metacpan or search on metacpan
docs/AI-Perceptron-Simple-1.04.html view on Meta::CPAN
<p>For <code>%labels</code>, since <code>0</code>'s and <code>1</code>'s won't make much sense as the output labels in most cases, therefore, the following keys must be specified:</p>
<dl>
<dt id="zero_as-category_zero_name">zero_as => $category_zero_name</dt>
<dd>
</dd>
<dt id="one_as-category_one_name">one_as => $category_one_name</dt>
<dd>
</dd>
</dl>
<p>Please take note that non-ascii characters ie. non-English alphabets <b>might</b> cause the output to go off :)</p>
<p>For the <code>%labels</code>, there is no need to enter "actual X", "predicted X" etc. It will be prefixed with <code>A: </code> for actual and <code>P: </code> for the predicted values by default.</p>
<h2 id="build_matrix-c_matrix-labels">&_build_matrix ( $c_matrix, $labels )</h2>
<p>Builds the matrix using <code>Text::Matrix</code> module.</p>
<p><code>$c_matrix</code> and <code>$labels</code> are the same as the ones passed to <code>display_exam_results</code> and <code></code>display_confusion_matrix.</p>
<p>Returns a list <code>( $matrix, $c_matrix )</code> which can directly be passed to <code>_print_extended_matrix</code>.</p>
<h2 id="print_extended_matrix-matrix-c_matrix">&_print_extended_matrix ( $matrix, $c_matrix )</h2>
<p>Extends and outputs the matrix on the screen.</p>
<p><code>$matrix</code> and <code>$c_matrix</code> are the same as returned by <code>&_build_matrix</code>.</p>
<h1 id="NERVE-DATA-RELATED-SUBROUTINES">NERVE DATA RELATED SUBROUTINES</h1>
<p>This part is about saving the data of the nerve. These subroutines can be imported using the <code>:local_data</code> tag.</p>
<p><b>The subroutines are to be called in the procedural way</b>. No checking is done currently.</p>
<p>See <code>PERCEPTRON DATA</code> and <code>KNOWN ISSUES</code> sections for more details on the subroutines in this section.</p>
<h2 id="preserve">preserve ( ... )</h2>
<p>The parameters and usage are the same as <code>save_perceptron</code>. See the next subroutine.</p>
<h2 id="save_perceptron-nerve-nerve_file">save_perceptron ( $nerve, $nerve_file )</h2>
<p>Saves the <code>AI::Perceptron::Simple</code> object into a <code>Storable</code> file. There shouldn't be a need to call this method manually since after every training process this will be called automatically.</p>
<h2 id="revive">revive (...)</h2>
<p>The parameters and usage are the same as <code>load_perceptron</code>. See the next subroutine.</p>
<h2 id="load_perceptron-nerve_file_to_load">load_perceptron ( $nerve_file_to_load )</h2>
<p>Loads the data and turns it into a <code>AI::Perceptron::Simple</code> object as the return value.</p>
<h1 id="NERVE-PORTABILITY-RELATED-SUBROUTINES">NERVE PORTABILITY RELATED SUBROUTINES</h1>
<p>These subroutines can be imported using the <code>:portable_data</code> tag.</p>
<p>The file type currently supported is YAML. Please be careful with the data as you won't want the nerve data accidentally modified.</p>
<h2 id="preserve_as_yaml">preserve_as_yaml ( ... )</h2>
<p>The parameters and usage are the same as <code>save_perceptron_yaml</code>. See the next subroutine.</p>
<h2 id="save_perceptron_yaml-nerve-yaml_nerve_file">save_perceptron_yaml ( $nerve, $yaml_nerve_file )</h2>
<p>Saves the <code>AI::Perceptron::Simple</code> object into a <code>YAML</code> file.</p>
<h2 id="revive_from_yaml">revive_from_yaml (...)</h2>
<p>The parameters and usage are the same as <code>load_perceptron</code>. See the next subroutine.</p>
<h2 id="load_perceptron_yaml-yaml_nerve_file">load_perceptron_yaml ( $yaml_nerve_file )</h2>
<p>Loads the YAML data and turns it into a <code>AI::Perceptron::Simple</code> object as the return value.</p>
<h1 id="TO-DO">TO DO</h1>
<p>These are the to-do's that <b>MIGHT</b> be done in the future. Don't put too much hope in them please :)</p>
<ul>
<li><p>Clean up and refactor source codes</p>
</li>
<li><p>Add more useful data for confusion matrix</p>
</li>
<li><p>Implement shuffling data feature</p>
</li>
<li><p>Implement fast/smart training feature</p>
</li>
<li><p>Write a tutorial or something for this module</p>
</li>
<li><p>and something yet to be known...</p>
</li>
</ul>
<h1 id="KNOWN-ISSUES">KNOWN ISSUES</h1>
<h2 id="Portability-of-Nerve-Data">Portability of Nerve Data</h2>
<p>Take note that the <code>Storable</code> nerve data is not compatible across different versions.</p>
<p>If you really need to send the nerve data to different computers with different versions of <code>Storable</code> module, see the docs of the following subroutines:</p>
<ul>
<li><p><code>&preserve_as_yaml</code> or <code>&save_perceptron_yaml</code> for storing data.</p>
</li>
<li><p><code>&revive_from_yaml</code> or <code>&load_perceptron_yaml</code> for retrieving the data.</p>
</li>
</ul>
( run in 0.908 second using v1.01-cache-2.11-cpan-39bf76dae61 )