|
Neuroph | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.neuroph.core.Weight
public class Weight
The Weight class represents neuron connection weight.
Connection
,
Serialized FormField Summary | |
---|---|
private double |
previousValue
Previous weight value (used by some learning rules like momentum for backpropagation) |
private static long |
serialVersionUID
The class fingerprint that is set to indicate serialization compatibility with a previous version of the class |
private double |
value
Weight value |
Constructor Summary | |
---|---|
Weight()
Creates an instance of connection weight with random weight value in range [0..1] |
|
Weight(double value)
Creates an instance of connection weight with the specified weight value |
Method Summary | |
---|---|
void |
dec(double amount)
Decreases the weight for specified amount |
double |
getPreviousValue()
Returns previous weight value |
double |
getValue()
Returns weight value |
void |
inc(double amount)
Increases the weight for the specified amount |
void |
randomize()
Sets random weight value |
void |
setPreviousValue(double previousValue)
Sets the previous weight value |
void |
setValue(double value)
Sets the weight value |
java.lang.String |
toString()
Returns weight value as String |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static final long serialVersionUID
private double value
private transient double previousValue
Constructor Detail |
---|
public Weight()
public Weight(double value)
value
- weight valueMethod Detail |
---|
public void inc(double amount)
amount
- amount to add to current weight valuepublic void dec(double amount)
dec_val
- amount to subtract from the current weight valuepublic void setValue(double value)
value
- weight value to setpublic double getValue()
public void setPreviousValue(double previousValue)
previuosValue
- weight value to setpublic double getPreviousValue()
public java.lang.String toString()
toString
in class java.lang.Object
public void randomize()
|
Neuroph | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |