Skip to content
This repository has been archived by the owner on May 11, 2023. It is now read-only.

Commit

Permalink
Redesign (final phase)
Browse files Browse the repository at this point in the history
  • Loading branch information
okozelsk committed Sep 2, 2019
1 parent 3ba20cc commit c60dfa5
Showing 1 changed file with 59 additions and 55 deletions.
114 changes: 59 additions & 55 deletions RCNet/Neural/Network/SM/StateMachine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -357,68 +357,72 @@ public string CreateReport(int margin = 0)
sb.Append(leftMargin + $"Neural preprocessor ({ReservoirStatCollection.Count} {resWording}, {TotalNumOfNeurons} neurons, {TotalNumOfInternalSynapses} internal synapses)" + Environment.NewLine);
foreach (ReservoirStat resStat in ReservoirStatCollection)
{
sb.Append(leftMargin + $" Reservoir instance: {resStat.ReservoirInstanceName} (configuration {resStat.ReservoirSettingsName}, {resStat.TotalNumOfNeurons} neurons, {Math.Round(resStat.ExcitatoryNeuronsRatio * 100, 1).ToString(CultureInfo.InvariantCulture)}% excitatory neurons, {resStat.TotalNumOfInternalSynapses} internal synapses)" + Environment.NewLine);
sb.Append(leftMargin + $" Zero incoming res. stimuli : {resStat.NumOfNoRStimuliNeurons} neurons" + Environment.NewLine);
sb.Append(leftMargin + $" Zero emitted analog signal : {resStat.NumOfNoAnalogOutputSignalNeurons} neurons" + Environment.NewLine);
sb.Append(leftMargin + $" Const emitted analog signal: {resStat.NumOfConstAnalogOutputSignalNeurons} neurons" + Environment.NewLine);
sb.Append(leftMargin + $" Not firing : {resStat.NumOfNotFiringNeurons} neurons" + Environment.NewLine);
sb.Append(leftMargin + $" Const firing: {resStat.NumOfConstFiringNeurons} neurons" + Environment.NewLine);
sb.Append(leftMargin + $" Reservoir instance: {resStat.ReservoirInstanceName} (configuration {resStat.ReservoirSettingsName}, {resStat.TotalNumOfNeurons} neurons, {Math.Round(resStat.ExcitatoryNeuronsRatio * 100, 1).ToString(CultureInfo.InvariantCulture)}% excitatory neurons, {resStat.TotalNumOfInternalSynapses} internal synapses)" + Environment.NewLine);
sb.Append(leftMargin + $" Activity" + Environment.NewLine);
sb.Append(leftMargin + $" {resStat.NumOfNoRStimuliNeurons} neurons receive no stimulation from the reservoir" + Environment.NewLine);
sb.Append(leftMargin + $" {resStat.NumOfNoAnalogOutputSignalNeurons} neurons produce no analog signal" + Environment.NewLine);
sb.Append(leftMargin + $" {resStat.NumOfConstAnalogOutputSignalNeurons} neurons produce constant analog signal" + Environment.NewLine);
sb.Append(leftMargin + $" {resStat.NumOfNotFiringNeurons} neurons don't spike" + Environment.NewLine);
sb.Append(leftMargin + $" {resStat.NumOfConstFiringNeurons} neurons are constantly firing" + Environment.NewLine);
foreach (ReservoirStat.PoolStat poolStat in resStat.PoolStatCollection)
{
sb.Append(leftMargin + $" Pool: {poolStat.PoolName} ({poolStat.NumOfNeurons} neurons, {Math.Round(poolStat.ExcitatoryNeuronsRatio * 100, 1).ToString(CultureInfo.InvariantCulture)}% excitatory neurons, {poolStat.InternalAnalogWeightsStat.NumOfSamples + poolStat.InternalSpikingWeightsStat.NumOfSamples} internal synapses)" + Environment.NewLine);
sb.Append(leftMargin + $" Zero incoming res. stimuli : {poolStat.NumOfNoRStimuliNeurons} neurons" + Environment.NewLine);
sb.Append(leftMargin + $" Zero emitted analog signal : {poolStat.NumOfNoAnalogOutputSignalNeurons} neurons" + Environment.NewLine);
sb.Append(leftMargin + $" Const emitted analog signal: {poolStat.NumOfConstAnalogOutputSignalNeurons} neurons" + Environment.NewLine);
sb.Append(leftMargin + $" Not firing : {poolStat.NumOfNotFiringNeurons} neurons" + Environment.NewLine);
sb.Append(leftMargin + $" Const firing: {poolStat.NumOfConstFiringNeurons} neurons" + Environment.NewLine);
sb.Append(leftMargin + $" Pool: {poolStat.PoolName} ({poolStat.NumOfNeurons} neurons, {Math.Round(poolStat.ExcitatoryNeuronsRatio * 100, 1).ToString(CultureInfo.InvariantCulture)}% excitatory neurons, {poolStat.InternalAnalogWeightsStat.NumOfSamples + poolStat.InternalSpikingWeightsStat.NumOfSamples} internal synapses)" + Environment.NewLine);
sb.Append(leftMargin + $" Activity" + Environment.NewLine);
sb.Append(leftMargin + $" {poolStat.NumOfNoRStimuliNeurons} neurons receive no stimulation from the reservoir" + Environment.NewLine);
sb.Append(leftMargin + $" {poolStat.NumOfNoAnalogOutputSignalNeurons} neurons produce no analog signal" + Environment.NewLine);
sb.Append(leftMargin + $" {poolStat.NumOfConstAnalogOutputSignalNeurons} neurons produce constant analog signal" + Environment.NewLine);
sb.Append(leftMargin + $" {poolStat.NumOfNotFiringNeurons} neurons don't spike" + Environment.NewLine);
sb.Append(leftMargin + $" {poolStat.NumOfConstFiringNeurons} neurons are constantly firing" + Environment.NewLine);
sb.Append(leftMargin + $" Weights of synapses" + Environment.NewLine);
sb.Append(leftMargin + $" Input > {StatLine(poolStat.InputWeightsStat)}" + Environment.NewLine);
sb.Append(leftMargin + $" Int. Analog > {StatLine(poolStat.InternalAnalogWeightsStat)}" + Environment.NewLine);
sb.Append(leftMargin + $" Int. Spiking> {StatLine(poolStat.InternalSpikingWeightsStat)}" + Environment.NewLine);
foreach (ReservoirStat.PoolStat.NeuronGroupStat groupStat in poolStat.NeuronGroupStatCollection)
{
sb.Append(leftMargin + $" Group of neurons: {groupStat.GroupName} ({groupStat.AvgAnalogSignalStat.NumOfSamples} neurons)" + Environment.NewLine);
sb.Append(leftMargin + $" Zero incoming res. stimuli : {groupStat.NumOfNoRStimuliNeurons} neurons" + Environment.NewLine);
sb.Append(leftMargin + $" Zero emitted analog signal : {groupStat.NumOfNoAnalogOutputSignalNeurons} neurons" + Environment.NewLine);
sb.Append(leftMargin + $" Const emitted analog signal: {groupStat.NumOfConstAnalogOutputSignalNeurons} neurons" + Environment.NewLine);
sb.Append(leftMargin + $" Not firing : {groupStat.NumOfNotFiringNeurons} neurons" + Environment.NewLine);
sb.Append(leftMargin + $" Const firing: {groupStat.NumOfConstFiringNeurons} neurons" + Environment.NewLine);
sb.Append(leftMargin + $" Stimulation from Input neurons " + Environment.NewLine);
sb.Append(leftMargin + $" AVG> {StatLine(groupStat.AvgIStimuliStat)}" + Environment.NewLine);
sb.Append(leftMargin + $" MAX> {StatLine(groupStat.MaxIStimuliStat)}" + Environment.NewLine);
sb.Append(leftMargin + $" MIN> {StatLine(groupStat.MinIStimuliStat)}" + Environment.NewLine);
sb.Append(leftMargin + $" SPAN> {StatLine(groupStat.IStimuliSpansStat)}" + Environment.NewLine);
sb.Append(leftMargin + $" Stimulation from Reservoir neurons" + Environment.NewLine);
sb.Append(leftMargin + $" AVG> {StatLine(groupStat.AvgRStimuliStat)}" + Environment.NewLine);
sb.Append(leftMargin + $" MAX> {StatLine(groupStat.MaxRStimuliStat)}" + Environment.NewLine);
sb.Append(leftMargin + $" MIN> {StatLine(groupStat.MinRStimuliStat)}" + Environment.NewLine);
sb.Append(leftMargin + $" SPAN> {StatLine(groupStat.RStimuliSpansStat)}" + Environment.NewLine);
sb.Append(leftMargin + $" Total stimulation (including Bias)" + Environment.NewLine);
sb.Append(leftMargin + $" AVG> {StatLine(groupStat.AvgTStimuliStat)}" + Environment.NewLine);
sb.Append(leftMargin + $" MAX> {StatLine(groupStat.MaxTStimuliStat)}" + Environment.NewLine);
sb.Append(leftMargin + $" MIN> {StatLine(groupStat.MinTStimuliStat)}" + Environment.NewLine);
sb.Append(leftMargin + $" SPAN> {StatLine(groupStat.TStimuliSpansStat)}" + Environment.NewLine);
sb.Append(leftMargin + $" Efficacy of synapses" + Environment.NewLine);
sb.Append(leftMargin + $" AVG> {StatLine(groupStat.AvgSynEfficacyStat)}" + Environment.NewLine);
sb.Append(leftMargin + $" MAX> {StatLine(groupStat.MaxSynEfficacyStat)}" + Environment.NewLine);
sb.Append(leftMargin + $" MIN> {StatLine(groupStat.MinSynEfficacyStat)}" + Environment.NewLine);
sb.Append(leftMargin + $" SPAN> {StatLine(groupStat.SynEfficacySpansStat)}" + Environment.NewLine);
sb.Append(leftMargin + $" Activation" + Environment.NewLine);
sb.Append(leftMargin + $" AVG> {StatLine(groupStat.AvgActivationStatesStat)}" + Environment.NewLine);
sb.Append(leftMargin + $" MAX> {StatLine(groupStat.MaxActivationStatesStat)}" + Environment.NewLine);
sb.Append(leftMargin + $" MIN> {StatLine(groupStat.MinActivationStatesStat)}" + Environment.NewLine);
sb.Append(leftMargin + $" SPAN> {StatLine(groupStat.ActivationStateSpansStat)}" + Environment.NewLine);
sb.Append(leftMargin + $" Analog signal" + Environment.NewLine);
sb.Append(leftMargin + $" AVG> {StatLine(groupStat.AvgAnalogSignalStat)}" + Environment.NewLine);
sb.Append(leftMargin + $" MAX> {StatLine(groupStat.MaxAnalogSignalStat)}" + Environment.NewLine);
sb.Append(leftMargin + $" MIN> {StatLine(groupStat.MinAnalogSignalStat)}" + Environment.NewLine);
sb.Append(leftMargin + $" Spiking signal" + Environment.NewLine);
sb.Append(leftMargin + $" AVG> {StatLine(groupStat.AvgFiringStat)}" + Environment.NewLine);
sb.Append(leftMargin + $" MAX> {StatLine(groupStat.MaxFiringStat)}" + Environment.NewLine);
sb.Append(leftMargin + $" MIN> {StatLine(groupStat.MinFiringStat)}" + Environment.NewLine);
sb.Append(leftMargin + $" Group of neurons: {groupStat.GroupName} ({groupStat.AvgAnalogSignalStat.NumOfSamples} neurons)" + Environment.NewLine);
sb.Append(leftMargin + $" Activity" + Environment.NewLine);
sb.Append(leftMargin + $" {groupStat.NumOfNoRStimuliNeurons} neurons receive no stimulation from the reservoir" + Environment.NewLine);
sb.Append(leftMargin + $" {groupStat.NumOfNoAnalogOutputSignalNeurons} neurons produce no analog signal" + Environment.NewLine);
sb.Append(leftMargin + $" {groupStat.NumOfConstAnalogOutputSignalNeurons} neurons produce constant analog signal" + Environment.NewLine);
sb.Append(leftMargin + $" {groupStat.NumOfNotFiringNeurons} neurons don't spike" + Environment.NewLine);
sb.Append(leftMargin + $" {groupStat.NumOfConstFiringNeurons} neurons are constantly firing" + Environment.NewLine);
sb.Append(leftMargin + $" Stimulation from input neurons" + Environment.NewLine);
sb.Append(leftMargin + $" AVG> {StatLine(groupStat.AvgIStimuliStat)}" + Environment.NewLine);
sb.Append(leftMargin + $" MAX> {StatLine(groupStat.MaxIStimuliStat)}" + Environment.NewLine);
sb.Append(leftMargin + $" MIN> {StatLine(groupStat.MinIStimuliStat)}" + Environment.NewLine);
sb.Append(leftMargin + $" SPAN> {StatLine(groupStat.IStimuliSpansStat)}" + Environment.NewLine);
sb.Append(leftMargin + $" Stimulation from reservoir neurons" + Environment.NewLine);
sb.Append(leftMargin + $" AVG> {StatLine(groupStat.AvgRStimuliStat)}" + Environment.NewLine);
sb.Append(leftMargin + $" MAX> {StatLine(groupStat.MaxRStimuliStat)}" + Environment.NewLine);
sb.Append(leftMargin + $" MIN> {StatLine(groupStat.MinRStimuliStat)}" + Environment.NewLine);
sb.Append(leftMargin + $" SPAN> {StatLine(groupStat.RStimuliSpansStat)}" + Environment.NewLine);
sb.Append(leftMargin + $" Total stimulation (including Bias)" + Environment.NewLine);
sb.Append(leftMargin + $" AVG> {StatLine(groupStat.AvgTStimuliStat)}" + Environment.NewLine);
sb.Append(leftMargin + $" MAX> {StatLine(groupStat.MaxTStimuliStat)}" + Environment.NewLine);
sb.Append(leftMargin + $" MIN> {StatLine(groupStat.MinTStimuliStat)}" + Environment.NewLine);
sb.Append(leftMargin + $" SPAN> {StatLine(groupStat.TStimuliSpansStat)}" + Environment.NewLine);
sb.Append(leftMargin + $" Efficacy of synapses" + Environment.NewLine);
sb.Append(leftMargin + $" AVG> {StatLine(groupStat.AvgSynEfficacyStat)}" + Environment.NewLine);
sb.Append(leftMargin + $" MAX> {StatLine(groupStat.MaxSynEfficacyStat)}" + Environment.NewLine);
sb.Append(leftMargin + $" MIN> {StatLine(groupStat.MinSynEfficacyStat)}" + Environment.NewLine);
sb.Append(leftMargin + $" SPAN> {StatLine(groupStat.SynEfficacySpansStat)}" + Environment.NewLine);
sb.Append(leftMargin + $" Activation" + Environment.NewLine);
sb.Append(leftMargin + $" AVG> {StatLine(groupStat.AvgActivationStatesStat)}" + Environment.NewLine);
sb.Append(leftMargin + $" MAX> {StatLine(groupStat.MaxActivationStatesStat)}" + Environment.NewLine);
sb.Append(leftMargin + $" MIN> {StatLine(groupStat.MinActivationStatesStat)}" + Environment.NewLine);
sb.Append(leftMargin + $" SPAN> {StatLine(groupStat.ActivationStateSpansStat)}" + Environment.NewLine);
sb.Append(leftMargin + $" Analog output" + Environment.NewLine);
sb.Append(leftMargin + $" AVG> {StatLine(groupStat.AvgAnalogSignalStat)}" + Environment.NewLine);
sb.Append(leftMargin + $" MAX> {StatLine(groupStat.MaxAnalogSignalStat)}" + Environment.NewLine);
sb.Append(leftMargin + $" MIN> {StatLine(groupStat.MinAnalogSignalStat)}" + Environment.NewLine);
sb.Append(leftMargin + $" Spiking signal" + Environment.NewLine);
sb.Append(leftMargin + $" AVG> {StatLine(groupStat.AvgFiringStat)}" + Environment.NewLine);
sb.Append(leftMargin + $" MAX> {StatLine(groupStat.MaxFiringStat)}" + Environment.NewLine);
sb.Append(leftMargin + $" MIN> {StatLine(groupStat.MinFiringStat)}" + Environment.NewLine);
}
sb.Append(leftMargin + $" Weights of synapses" + Environment.NewLine);
sb.Append(leftMargin + $" Input > {StatLine(poolStat.InputWeightsStat)}" + Environment.NewLine);
sb.Append(leftMargin + $" Int. Analog > {StatLine(poolStat.InternalAnalogWeightsStat)}" + Environment.NewLine);
sb.Append(leftMargin + $" Int. Spiking > {StatLine(poolStat.InternalSpikingWeightsStat)}" + Environment.NewLine);
}
}
sb.Append(Environment.NewLine);
sb.Append(leftMargin + $"Number of unused (invalid) predictors: {NumOfUnusedPredictors}" + Environment.NewLine);
return sb.ToString();
}
Expand Down

0 comments on commit c60dfa5

Please sign in to comment.