Home - Zuntara/HTM.Net GitHub Wiki
Welcome to the world of HTM.Net!
( I will be completing this wiki soon )
Creating a network is very simple!
This is the CLA version
/// <summary>
/// Creates a basic <see cref="Network"/> with 1 <see cref="Region"/> and 1 <see cref="ILayer"/>.
/// However this basic network contains all algorithmic components.
/// </summary>
internal Network.Network CreateBasicNetworkCla()
{
Parameters p = NetworkDemoHarness.GetParameters();
p = p.Union(NetworkDemoHarness.GetNetworkDemoTestEncoderParams());
// This is how easy it is to create a full running Network!
return Network.Network.Create("Network API Demo", p)
.Add(Network.Network.CreateRegion("Region 1")
.Add(Network.Network.CreateLayer("Layer 2/3", p)
.AlterParameter(Parameters.KEY.AUTO_CLASSIFY, true)
.Add(Anomaly.Create())
.Add(new TemporalMemory())
.Add(new Algorithms.SpatialPooler())
.Add(Sensor<FileInfo>.Create(FileSensor.Create,
SensorParams.Create(SensorParams.Keys.Path, "", "rec-center-hourly.csv")))));
}
This is the SDR version
internal Network.Network CreateBasicNetworkSdr()
{
Parameters p = NetworkDemoHarness.GetParameters();
p = p.Union(NetworkDemoHarness.GetNetworkDemoTestEncoderParams());
p.SetParameterByKey(Parameters.KEY.AUTO_CLASSIFY_TYPE, typeof(SDRClassifier));
// This is how easy it is to create a full running Network!
return Network.Network.Create("Network API Demo", p)
.Add(Network.Network.CreateRegion("Region 1")
.Add(Network.Network.CreateLayer("Layer 2/3", p)
.AlterParameter(Parameters.KEY.AUTO_CLASSIFY, true)
.Add(Anomaly.Create())
.Add(new TemporalMemory())
.Add(new Algorithms.SpatialPooler())
.Add(Sensor<FileInfo>.Create(FileSensor.Create,
SensorParams.Create(SensorParams.Keys.Path, "", "rec-center-hourly.csv")))));
}