|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--saaps.sapm.Anom002Model
The Anom002Model
implements the neural network
for nowcasting of satellite S001 anomalies on a daily basis.
The input to the network are Kp summed over 24 hour periods
extending over eights days.
The output from the model is a TimeSeries
object
that contain one data field which gives the probability in percent
that an anomaly will occur.
The time stamp of the latest predicted value will always be
the time of the last Kp value minus 24 hours. A prediction like
2001 04 01 18 00 00 1 80
has used Kp values over the period 2001-04-01 18:00 to 2001-04-02
18:00, and the predicted anomaly (1) with 80% probability is valid
over the same time period.
Field Summary | |
private DataNorm |
dataNorm
|
private int[] |
fields
|
private double[] |
inMax
|
private double[] |
inMin
|
private Data |
inputData
|
private TimeSeries |
inputTS
|
private saaps.ann.mlff.Network |
network
|
private double[] |
outMax
|
private double[] |
outMin
|
private Data |
outputData
|
private TimeSeries |
outputTS
|
private int[] |
times
|
private TimeSeriesToDataMap |
tsMap
|
Constructor Summary | |
Anom002Model()
Creates a new Anom002Model by loading the neural network weights. |
Method Summary | |
private void |
createNetwork()
Create the network from the ASCII files. |
private void |
createOutputTimeSeries()
When the neural network has been run the output is available as a saaps.ann.Data object. |
TimeSeries |
getOutput()
Get the predicted output. |
private double |
getProbability(double y)
Return the probability, in percent, that the prediction is an anomaly. |
void |
readTimeSeries()
Read the data for the last 15 days. |
void |
readTimeSeries(java.util.Date d1,
java.util.Date d2)
Read data for the interval given by the two dates. |
void |
run()
Run the model. |
java.lang.String |
toString()
Get a description of the model. |
Methods inherited from class java.lang.Object |
|
Field Detail |
private saaps.ann.mlff.Network network
private int[] times
private int[] fields
private TimeSeriesToDataMap tsMap
private double[] inMin
private double[] inMax
private double[] outMin
private double[] outMax
private DataNorm dataNorm
private TimeSeries inputTS
private Data inputData
private Data outputData
private TimeSeries outputTS
Constructor Detail |
public Anom002Model()
Method Detail |
private void createNetwork()
private void createOutputTimeSeries()
saaps.ann.Data
object. This method creates
a TimeSeries
object. The time field is obtained
from the input time series and the data field is obtained
from the output Data
object. The data field contain
the probability in percent that the predicted event is an anomaly.
The output from the network is a number in the interval -0.8 to 0.8. If the output is less than zero then we have a "no anomaly" event (0), else we have an "anomaly" event (1). The absolute value of the network output is used to determine the probability that the prediction is correct. The table below gives the probabilies for different outputs.
Output range | No anomaly | Anomaly |
0 , 0.125 | 49% | 52% |
0.125 , 0.250 | 64% | 61% |
0.250 , 0.375 | 68% | 70% |
0.375 , 0.500 | 81% | 82% |
Above 0.500 | 89% | 85% |
private double getProbability(double y)
y < -0.500 | 11% |
-0.500 < y < -0.375 | 19% |
-0.375 < y < -0.250 | 32% |
-0.250 < y < -0.125 | 36% |
-0.125 < y < 0.000 | 51% |
0.000 < y < 0.125 | 52% |
0.125 < y < 0.250 | 61% |
0.250 < y < 0.375 | 70% |
0.375 < y < 0.500 | 82% |
0.500 < y | 85% |
public void readTimeSeries()
public void readTimeSeries(java.util.Date d1, java.util.Date d2)
n
days are read then the model will produce
n-8+1
days with predictions.d1
- The start dated2
- The end datepublic void run()
public TimeSeries getOutput()
TimeSeries
object with two data fields. The two data fields
are:
Output range | No anomaly | Anomaly |
0 , 0.125 | 49% | 52% |
0.125 , 0.250 | 64% | 61% |
0.250 , 0.375 | 68% | 70% |
0.375 , 0.500 | 81% | 82% |
Above 0.500 | 89% | 85% |
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |