using Accord.Neuro.Learning;
using Accord.Neuro.ActivationFunctions;
using Accord.Neuro.Networks;
public static void Main()
new double[] { 1,1,1, 0,0,0 },
new double[] { 1,0,1, 0,0,0 },
new double[] { 1,1,1, 0,0,0 },
new double[] { 0,0,1, 1,1,0 },
new double[] { 0,0,1, 1,0,0 },
new double[] { 0,0,1, 1,1,0 },
var function = new BernoulliFunction(alpha: 0.5);
var rbm = new RestrictedBoltzmannMachine(function, inputsCount: 6, hiddenNeurons: 2);
var teacher = new ContrastiveDivergenceLearning(rbm)
for (int i = 0; i < 5000; i++)
teacher.RunEpoch(inputs);
double[] a = rbm.Compute(new double[] { 1, 1, 1, 0, 0, 0 });
double[] b = rbm.Compute(new double[] { 0, 0, 0, 1, 1, 1 });
double[] xa = rbm.GenerateInput(new double[] { 1, 0 });
double[] xb = rbm.GenerateInput(new double[] { 0, 1 });