|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.vizzini.util.AbstractBean
org.vizzini.ai.neuralnetwork.AbstractConnector
abstract class AbstractConnector
Provides base functionality for connectors between layers in a neural network.
Field Summary |
---|
Fields inherited from class org.vizzini.util.AbstractBean |
---|
IGNORE_PROPERTIES |
Constructor Summary | |
---|---|
AbstractConnector(ILayer fromLayer,
ILayer toLayer)
Construct this object with the given parameters. |
Method Summary | |
---|---|
Object |
clone()
Return a clone of this instance. |
boolean |
equals(Object object)
Return true if the given object is equal to this. |
void |
fillWeights(double value)
Assign the given value to all weights. |
ILayer |
getFromLayer()
Return the from layer. |
ILayer |
getToLayer()
Return the to layer. |
double |
getWeight(int i,
int j)
Return the weight for the given parameters. |
int |
getWeightCount()
Return a count of the weights. |
protected double[][] |
getWeights()
Return the weights for the given parameters. |
double[] |
getWeights(int i)
Return the weights for the given parameters. |
void |
randomizeWeights()
Assign random weights to the neural network in [-0.1,0.1]. |
void |
randomizeWeights(double range)
Assign random weights to the neural network. |
protected void |
setFromLayer(ILayer fromLayer)
|
protected void |
setToLayer(ILayer toLayer)
|
void |
setWeight(int i,
int j,
double weight)
Set the weight for the given parameters. |
protected void |
setWeights(double[][] weights)
Set the weights. |
String |
toString()
Return a string representation of this object. |
void |
zeroWeights()
Assign zero weights. |
Methods inherited from class org.vizzini.util.AbstractBean |
---|
appendArray, appendCollection, appendList, appendMap, compareBooleans, compareObjects, getIgnoreProperties, hashCode |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.vizzini.ai.neuralnetwork.IConnector |
---|
adjustWeights, hashCode |
Constructor Detail |
---|
public AbstractConnector(ILayer fromLayer, ILayer toLayer)
fromLayer
- From layer.toLayer
- To layer.Method Detail |
---|
public Object clone()
clone
in interface IConnector
clone
in class Object
public boolean equals(Object object)
equals
in interface IConnector
equals
in class AbstractBean
object
- The object to compare.
true
if the objects are equal, otherwise
false
public void fillWeights(double value)
fillWeights
in interface IConnector
public ILayer getFromLayer()
IConnector
getFromLayer
in interface IConnector
public ILayer getToLayer()
IConnector
getToLayer
in interface IConnector
public double getWeight(int i, int j)
getWeight
in interface IConnector
i
- From layer node index.j
- To layer node index.public int getWeightCount()
getWeightCount
in interface IConnector
public double[] getWeights(int i)
getWeights
in interface IConnector
i
- From layer node index.public void randomizeWeights()
randomizeWeights
in interface IConnector
public void randomizeWeights(double range)
randomizeWeights
in interface IConnector
range
- ±Range of random weights around zero.public void setWeight(int i, int j, double weight)
setWeight
in interface IConnector
i
- From layer node index.j
- To layer node index.weight
- New weight.public String toString()
toString
in interface IConnector
toString
in class AbstractBean
public void zeroWeights()
zeroWeights
in interface IConnector
protected double[][] getWeights()
protected void setFromLayer(ILayer fromLayer)
fromLayer
- The fromLayer to set.protected void setToLayer(ILayer toLayer)
toLayer
- The toLayer to set.protected void setWeights(double[][] weights)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2007 Vizzini.org. All Rights Reserved. | 2007.12.25.03.00.02 |