Exemplo n.º 1
0
        // LISTEX COMMAND
        public void ListExs()
        {
            string result = examples.ShowFileList();

            if (result.Length > 0)
            {
                PrintClass.PrintLine(result);
            }
        }
Exemplo n.º 2
0
        // CLEAR EXAMPLES
        public string ClearExamples()
        {
            Examples tmpExamples = Examples.Init();

            if (tmpExamples.SayExamplesNum() == 0)
            {
                return("\n-> Error clearing examples - no examples exist.");
            }

            tmpExamples.ClearExamples();
            PrintClass.PrintLine("\n-> Training and testing examples lists cleared - no examples exist any more.");

            return("");
        }
Exemplo n.º 3
0
        /// <summary>
        /// Prints layer parameters (coefficients and biases) using PrintClass
        /// </summary>
        public void ShowParams(bool showDetails)
        {
            PrintClass.PrintLine("  Neurons number: " + neuronDeltas.Length);
            PrintClass.PrintLine("  Inputs number: " + coeffs[0].Length);
            PrintClass.PrintLine("  Activation function type: " + AFType.ToString().Remove(AFType.ToString().IndexOf("AFType")));

            if (showDetails)
            {
                string tmpString;
                for (int i = 0; i < neuronDeltas.Length; i++)
                {
                    PrintClass.PrintLine("\n    - Neuron " + i.ToString() + ": bias " + biases[i] + ", coefficients :");
                    tmpString = "      ";
                    for (int j = 0; j < coeffs[i].Length; j++)
                    {
                        tmpString += coeffs[i][j].ToString() + "  ";
                    }
                    PrintClass.PrintLine(tmpString);
                }
            }
        }
Exemplo n.º 4
0
        // COST EXAMPLES
        public string Cost()
        {
            if (network == null)
            {
                return("\n-> Error calculating cost - no network exists.");
            }

            if (!network.examples.ExamplesExist())
            {
                return("\n-> Error calculating cost - no examples exists.");
            }

            string result = network.CalcAllCost(out float cost, true);

            if (result.Length > 0)
            {
                return(result);
            }

            PrintClass.PrintLine("\n-> Total cost for existing " + network.examples.SayExamplesNum().ToString() + " examples is: " + cost.ToString() + ".");

            return("");
        }
Exemplo n.º 5
0
 // HELP MESSAGE
 public void Help()
 {
     PrintClass.PrintLine(helpMessage);
 }