Public Member Functions | |
int | getIndex () |
void | setIndex (int index) |
Prototype (double[] inputs, double[] outputs) | |
Prototype (Prototype original) | |
void | set (Prototype original) |
double[] | getInputs () |
double | getInput (int i) |
void | setInput (int i, double valor) |
double[] | getOutputs () |
double | getOutput (int i) |
double | firstOutput () |
double | label () |
double | assignedClass () |
int | numberOfInputs () |
void | setFirstOutput (double val) |
void | setClass (double val) |
void | setLabel (double val) |
int | numberOfOutputs () |
Prototype | mul (Prototype other) |
double | mulEscalar (Prototype other) |
Prototype | mul (double weight) |
Prototype | sqrt () |
double | module () |
Prototype | add (double increment) |
Prototype | add (Prototype other) |
Prototype | addMul (Prototype other, double weight) |
Prototype | addDiv (Prototype other, double divisor) |
Prototype | avg (Prototype other) |
Prototype | sub (Prototype other) |
Prototype | subMul (Prototype other, double weight) |
String | toString () |
boolean | equals (Prototype other) |
boolean | equalsInputs (Prototype other) |
void | applyThresholds () |
void | makeNull () |
void | print () |
Prototype | opposite () |
Prototype | opposite (double a, double b) |
Static Public Member Functions | |
static int | getTypeOfAttribute (int i) |
static Prototype | avg (Prototype p1, Prototype p2) |
static Prototype | avg (Prototype p1, double w1, Prototype p2, double w2) |
Static Public Attributes | |
static final int | UNKNOW_INDEX = -1 |
static final int | INTEGER = 0 |
static final int | DOUBLE = 1 |
static final int | NOMINAL = 2 |
Protected Attributes | |
int | index = UNKNOW_INDEX |
double[] | inputs = null |
double[] | outputs = null |
Static Protected Attributes | |
static int[] | type |
Package Attributes | |
boolean | normalized = false |
Representation of a prototype. Contains several inputs an several outputs and common operations.
Definition at line 13 of file Prototype.java.
org.sci2s.eamhco.Prototype.Prototype | ( | double[] | inputs, | |
double[] | outputs | |||
) |
Constructs a Prototype.
inputs | Inputs that will contain the new prototype | |
outputs | Ouputs that will contain the new prototype |
Definition at line 98 of file Prototype.java.
org.sci2s.eamhco.Prototype.Prototype | ( | Prototype | original | ) |
Constructs a Prototype from another protoype.
original | Prototype that will be copied into the new object. |
Definition at line 110 of file Prototype.java.
Performs add operation between two prototypes.
other | A protype to be added to the implicit parameter. |
Definition at line 382 of file Prototype.java.
Prototype org.sci2s.eamhco.Prototype.add | ( | double | increment | ) |
Add an increment to all the inputs of the prototype
increment |
Definition at line 367 of file Prototype.java.
Performs add and divide operation between two prototypes.
other | A protype to be added and divided to the implicit parameter. | |
divisor | Constant that divides each sum. |
Definition at line 431 of file Prototype.java.
Performs add and product operation between two prototypes.
other | A protype to be added and multiplied to the implicit parameter. | |
weight | Constant to be multiplied to each sum. |
Definition at line 407 of file Prototype.java.
void org.sci2s.eamhco.Prototype.applyThresholds | ( | ) |
Change attribute values that are not in [0.0, 1.0]. If an attribute is greater than 1.0, assigns 1.0 to it. If an attribute is smaller than 0.0, assigns 0.0 to it.
Definition at line 621 of file Prototype.java.
double org.sci2s.eamhco.Prototype.assignedClass | ( | ) |
Returns the assigned class of the prototype (same value as the first output of the protoype).
Definition at line 201 of file Prototype.java.
static Prototype org.sci2s.eamhco.Prototype.avg | ( | Prototype | p1, | |
double | w1, | |||
Prototype | p2, | |||
double | w2 | |||
) | [static] |
Performs averaged-based explicit operation between two prototypes.
p1 | One protype to be merged. | |
w1 | Weight of prototype p1. | |
p2 | Other protype to be merged. | |
w2 | Weight of prototype p2. |
Definition at line 481 of file Prototype.java.
Performs average operation between two prototypes.
p1 | One protype to be merged. | |
p2 | Other protype to be merged. |
Definition at line 468 of file Prototype.java.
Performs average operation between two prototypes.
other | A protype to be merged to the implicit parameter. |
Definition at line 445 of file Prototype.java.
boolean org.sci2s.eamhco.Prototype.equals | ( | Prototype | other | ) |
Test if two prototypes are equals
other | The other prototype to be compared with the caller. |
Definition at line 599 of file Prototype.java.
boolean org.sci2s.eamhco.Prototype.equalsInputs | ( | Prototype | other | ) |
Test if two prototypes have the same inputs
other | The other prototype to be compared with the caller. |
Definition at line 610 of file Prototype.java.
double org.sci2s.eamhco.Prototype.firstOutput | ( | ) |
Returns the first output of the protoype.
Definition at line 183 of file Prototype.java.
int org.sci2s.eamhco.Prototype.getIndex | ( | ) |
Informs of the index of the prototype.
Definition at line 52 of file Prototype.java.
double org.sci2s.eamhco.Prototype.getInput | ( | int | i | ) |
Returns a specific input of the protoype.
i | Index of the input attribute. |
Definition at line 144 of file Prototype.java.
double [] org.sci2s.eamhco.Prototype.getInputs | ( | ) |
Returns the inputs of the protoype.
Definition at line 134 of file Prototype.java.
double org.sci2s.eamhco.Prototype.getOutput | ( | int | i | ) |
Returns a specific output of the protoype. Not to be used. Use label() instead.
i | Index of the output attribute. |
Definition at line 174 of file Prototype.java.
double [] org.sci2s.eamhco.Prototype.getOutputs | ( | ) |
Returns the outputs of the protoype.
Definition at line 164 of file Prototype.java.
static int org.sci2s.eamhco.Prototype.getTypeOfAttribute | ( | int | i | ) | [static] |
Return the type of the attribute.
i | ith attribute. |
Definition at line 43 of file Prototype.java.
double org.sci2s.eamhco.Prototype.label | ( | ) |
Returns the label of the prototype (aka first output).
Definition at line 192 of file Prototype.java.
void org.sci2s.eamhco.Prototype.makeNull | ( | ) |
Round integer attributes. Convert the prototype in the null prototype
Definition at line 660 of file Prototype.java.
double org.sci2s.eamhco.Prototype.module | ( | ) |
Definition at line 351 of file Prototype.java.
Prototype org.sci2s.eamhco.Prototype.mul | ( | double | weight | ) |
Performs product operation between one prototype and a double.
weight | Constant to be multiplied to each sum. |
Definition at line 305 of file Prototype.java.
Multiply component by component like a scalar product.
weight | Constant to be multiplied to each sum. |
Definition at line 258 of file Prototype.java.
double org.sci2s.eamhco.Prototype.mulEscalar | ( | Prototype | other | ) |
Multiply component by component like a scalar product.
weight | Constant to be multiplied to each sum. |
Definition at line 282 of file Prototype.java.
int org.sci2s.eamhco.Prototype.numberOfInputs | ( | ) |
Returns the number of attributes that has an input.
Definition at line 210 of file Prototype.java.
int org.sci2s.eamhco.Prototype.numberOfOutputs | ( | ) |
Returns the number of attributes that has an output.
Definition at line 246 of file Prototype.java.
Prototype org.sci2s.eamhco.Prototype.opposite | ( | double | a, | |
double | b | |||
) |
Prototype org.sci2s.eamhco.Prototype.opposite | ( | ) |
void org.sci2s.eamhco.Prototype.print | ( | ) |
Print the prototype.
Definition at line 674 of file Prototype.java.
void org.sci2s.eamhco.Prototype.set | ( | Prototype | original | ) |
Copy the values of a Prototype from another protoype.
original | Prototype that will be copied into the new object. |
Definition at line 123 of file Prototype.java.
void org.sci2s.eamhco.Prototype.setClass | ( | double | val | ) |
Assigns a new class (aka new first output) to the prototype.
val | Value to be assigned to the first output (aka label) of the prototype. |
Definition at line 228 of file Prototype.java.
void org.sci2s.eamhco.Prototype.setFirstOutput | ( | double | val | ) |
Assigns a new value to the first output of the prototype.
val | Value to be assigned to the first output (aka label) of the prototype. |
Definition at line 219 of file Prototype.java.
void org.sci2s.eamhco.Prototype.setIndex | ( | int | index | ) |
Assigns a new index to the prototype.
index | New index to be assigned. |
Definition at line 61 of file Prototype.java.
void org.sci2s.eamhco.Prototype.setInput | ( | int | i, | |
double | valor | |||
) |
Set a input for an attribute
i | Index of the input attribute. | |
valor | Value to set. Isaac. |
Definition at line 156 of file Prototype.java.
void org.sci2s.eamhco.Prototype.setLabel | ( | double | val | ) |
Assigns a new label (aka first output, class) to the prototype.
val | Value to be assigned to the first output (aka class) of the prototype.* |
Definition at line 237 of file Prototype.java.
Prototype org.sci2s.eamhco.Prototype.sqrt | ( | ) |
Performs sqrt operation to all the inputs of the prototype.
Definition at line 329 of file Prototype.java.
Performs substract operation between two prototypes.
other | A protype to be substract to the implicit parameter. |
Definition at line 499 of file Prototype.java.
Performs substract and product operation between two prototypes.
other | A protype to be substract and multiplied to the implicit parameter. | |
weight | Constant to be multiplied to each difference. |
Definition at line 522 of file Prototype.java.
String org.sci2s.eamhco.Prototype.toString | ( | ) |
Converts the prototype to a String object
Definition at line 542 of file Prototype.java.
final int org.sci2s.eamhco.Prototype.DOUBLE = 1 [static] |
Double type of attributes.
Definition at line 26 of file Prototype.java.
int org.sci2s.eamhco.Prototype.index = UNKNOW_INDEX [protected] |
Index of the prototype in the set, used as an identifier.
Definition at line 20 of file Prototype.java.
double [] org.sci2s.eamhco.Prototype.inputs = null [protected] |
Normalized inputs of the prototype (values in [0,1]).
Definition at line 67 of file Prototype.java.
final int org.sci2s.eamhco.Prototype.INTEGER = 0 [static] |
Integer type of attributes.
Definition at line 24 of file Prototype.java.
final int org.sci2s.eamhco.Prototype.NOMINAL = 2 [static] |
Nominal type of attributes.
Definition at line 28 of file Prototype.java.
boolean org.sci2s.eamhco.Prototype.normalized = false [package] |
Informs if the prototype is normalized in [0, 1].
Definition at line 16 of file Prototype.java.
double [] org.sci2s.eamhco.Prototype.outputs = null [protected] |
Normalized outputs of the prototype (values in [0,1]).
Definition at line 70 of file Prototype.java.
int [] org.sci2s.eamhco.Prototype.type [static, protected] |
Type of each attribute of the set.
Definition at line 22 of file Prototype.java.
final int org.sci2s.eamhco.Prototype.UNKNOW_INDEX = -1 [static] |
Informs that the prototype has not got a definided index.
Definition at line 18 of file Prototype.java.