ANN class

Constructors

ANN({required List<int> layers, int epochs = 100, double lr = 0.01, int? seed})

Properties

biases List<List<double>>
getter/setter pair
epochs int
final
hashCode int
The hash code for this object.
no setterinherited
lastLoss double?
getter/setter pair
layers List<int>
final
lossHistory List<double>
history of loss values (one entry per epoch)
final
lr double
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
weights List<List<List<double>>>
getter/setter pair

Methods

applyParamsFrom(ANN other) → void
fit(List<List<double>> X, List<List<double>> Y, {int? batchSize, bool verbose = false, String optimizer = 'sgd', double momentum = 0.9, double beta1 = 0.9, double beta2 = 0.999, double epsilon = 1e-8, double l2 = 0.0, String lrSchedule = 'constant', int stepSize = 10, double stepDecay = 0.5, double expDecay = 0.99, int epochsOverride = -1}) → void
Convenience training wrapper that calls the main fit implementation. (This class intentionally exposes a single training API.)
fitAsync(List<List<double>> X, List<List<double>> Y, {int? batchSize, bool verbose = false, String optimizer = 'sgd', double momentum = 0.9, double beta1 = 0.9, double beta2 = 0.999, double epsilon = 1e-8, double l2 = 0.0, String lrSchedule = 'constant', int stepSize = 10, double stepDecay = 0.5, double expDecay = 0.99}) Future<void>
Asynchronous wrapper that runs fit in a Future (not in a separate isolate).
getParams() Map<String, dynamic>
Return a simple params map (weights and biases) without other metadata.
markInitialized() → void
Public utility methods
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
predict(List<List<double>> X) List<List<double>>
saveToFile(String path) Future<void>
toJson() String
JSON helpers
toMap() Map<String, dynamic>
Serialize model parameters to a Map (JSON-ready).
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

fromJson(String s, {int? seed, int? epochs, double? lr}) ANN
fromMap(Map<String, dynamic> m, {int? seed, int? epochs, double? lr}) ANN
Reconstruct an ANN from a previously-serialized Map.
loadFromFile(String path, {int? seed, int? epochs, double? lr}) Future<ANN>