False Nearest Neighbor method: A parallel kd-tree approach based on top-down searching. More...
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <limits.h>
#include <math.h>
#include "tsa.h"
#include "tdkdtree.h"
#include "mpi.h"
Go to the source code of this file.
Defines | |
#define | WID_STR |
Functions | |
static void | show_options () |
static void | scan_options () |
static double | standarddeviation () |
static void | makedelayvectors () |
int | main (int argc, char **argv) |
Main function. | |
static double | standarddeviation (double *x, int N) |
Computing standar deviation from a time series. | |
static void | makedelayvectors (int n, int d, double **y) |
static void | scan_options (int argc, char **argv) |
Scanning program options from the command line. | |
static void | show_options (char *progname) |
Showing options of the command line. | |
Variables | |
static FILE * | prgerr = NULL |
Program error stream. | |
static FILE * | prgout = NULL |
Program output stream. | |
static unsigned long | N = ULONG_MAX |
Time series length. | |
static int | med = 1 |
Minimal embedding dimension. | |
static int | m = 5 |
Maximal embedding dimension. | |
static int | tau = 1 |
Delay time. | |
static double | R_tol = 10.0 |
Tolerance factor. | |
static unsigned long | exclude = 0 |
Scalar values that would be exclude. | |
static unsigned int | column = 1 |
Input file columns to be reading. | |
static char * | outfile = NULL |
Output file name pointer. | |
static char * | infile = NULL |
Input file name pointer. | |
static unsigned int | verbosity = 0xff |
Verbose level. | |
static double * | x = NULL |
Time series. |
False Nearest Neighbor method: A parallel kd-tree approach based on top-down searching.
This program implements the False Nearest Neighbor (FNN) method introduced by Kennel et al. (1991). The goal of the method is to obtain the minimal embeding dimension of a dynamical system from a time series.
In this case, the implementation is based on a kd-tree data structure and the nearest neighbors searching is performed using a top-down algorithm. The kd-tree build function produces an unbalanced tree.
Definition in file pkdfnn.10.10.01.c.
#define WID_STR |
"Computing minimal embedding dimension using a\n" \ " false nearest neighbors method by Kennel et al. (1991).\n" \ " This program is a kd-tree data structure approach\n" \ " based on a top-down search algorithm."
Definition at line 326 of file pkdfnn.10.10.01.c.
int main | ( | int | argc, | |
char ** | argv | |||
) |
Main function.
argc | Arguments counter. | |
argv | Arguments vector. |
Definition at line 100 of file pkdfnn.10.10.01.c.
static void makedelayvectors | ( | int | n, | |
int | d, | |||
double ** | y | |||
) | [static] |
Definition at line 250 of file pkdfnn.10.10.01.c.
static void makedelayvectors | ( | ) | [static] |
static void scan_options | ( | int | argc, | |
char ** | argv | |||
) | [static] |
Scanning program options from the command line.
argc | Arguments counter. | |
argv | Arguments vector. |
Definition at line 276 of file pkdfnn.10.10.01.c.
static void scan_options | ( | ) | [static] |
static void show_options | ( | char * | progname | ) | [static] |
Showing options of the command line.
progname | Program name. |
Definition at line 339 of file pkdfnn.10.10.01.c.
static void show_options | ( | ) | [static] |
static double standarddeviation | ( | double * | x, | |
int | N | |||
) | [static] |
Computing standar deviation from a time series.
x | Time series. | |
N | Time series length. |
x
. Definition at line 223 of file pkdfnn.10.10.01.c.
static double standarddeviation | ( | ) | [static] |
unsigned int column = 1 [static] |
Input file columns to be reading.
Definition at line 72 of file pkdfnn.10.10.01.c.
unsigned long exclude = 0 [static] |
Scalar values that would be exclude.
Definition at line 68 of file pkdfnn.10.10.01.c.
char* infile = NULL [static] |
Input file name pointer.
Definition at line 80 of file pkdfnn.10.10.01.c.
int m = 5 [static] |
Maximal embedding dimension.
Definition at line 56 of file pkdfnn.10.10.01.c.
int med = 1 [static] |
Minimal embedding dimension.
Definition at line 52 of file pkdfnn.10.10.01.c.
unsigned long N = ULONG_MAX [static] |
Time series length.
Definition at line 48 of file pkdfnn.10.10.01.c.
char* outfile = NULL [static] |
Output file name pointer.
Definition at line 76 of file pkdfnn.10.10.01.c.
FILE* prgerr = NULL [static] |
Program error stream.
Definition at line 40 of file pkdfnn.10.10.01.c.
FILE* prgout = NULL [static] |
Program output stream.
Definition at line 44 of file pkdfnn.10.10.01.c.
double R_tol = 10.0 [static] |
Tolerance factor.
Definition at line 64 of file pkdfnn.10.10.01.c.
int tau = 1 [static] |
Delay time.
Definition at line 60 of file pkdfnn.10.10.01.c.
unsigned int verbosity = 0xff [static] |
Verbose level.
Definition at line 84 of file pkdfnn.10.10.01.c.
double* x = NULL [static] |
Time series.
Definition at line 88 of file pkdfnn.10.10.01.c.