# findipiterplot: A function to show implementation of BESE and BEDE methods by... In inflection: Finds the Inflection Point of a Curve

## Description

We apply the BESE and BEDE methods, we plot results showing the bisection like convergence to the true inflection point. One plot is created for BESE and another one for BEDE. If it is possible, then we compute 95% confidence intervals for the results. Parallel computing also available under user request.

## Usage

 `1` ```findipiterplot(x, y, index, plots = TRUE, ci = FALSE, doparallel = FALSE) ```

## Arguments

 `x` The numeric vector of x-abscissas, must be of length at least 4. `y` The numeric vector of the noisy or not y-ordinates `index` If data is convex/concave then index=0 If data is concave/convex then index=1 `plots` When plots=TRUE the plot commands are executed (default value = TRUE) `ci` When ci=TRUE the 95% confidence intervals are computed, if sufficient results are available (default value = FALSE) `doparallel` If doparallel=TRUE then parallel computing is applied, based on the available workers of current machine (default value = FALSE)

## Details

It applies iteratively when that is theoretically allowable the methods ESE, EDE, stores all useful results and according to the input computes 95% confidence intervals and plots the two sequences (BESE, BEDE). Useful for a graphical investigation of the inflection point.

## Value

 `ans\$first` The output of first run for ESE and EDE methods `ans\$BESE` The vector of BESE iterations `ans\$BEDE` The vector of BEDE iterations `ans\$aesmout` Mean, Std Deviation and 95 % confidence interval for all BESE iterations, if possible `ans\$aedmout` Mean, Std Deviation and 95 % confidence interval for all BEDE iterations, if possible `ans\$xysl` A list of xy data frames containing the data used for every ESE iteration `ans\$xydl` A list of xy data frames containing the data used for every EDE iteration

## Note

Non direct methods have been removed in version 1.3 due to their limited functionality.

## Author(s)

Demetris T. Christopoulos

## References

[1]Demetris T. Christopoulos (2014). Developing methods for identifying the inflection point of a convex/concave curve. arXiv:1206.5478v2 [math.NA]. https://arxiv.org/pdf/1206.5478v2.pdf

[2]Demetris T. Christopoulos (2016). On the efficient identification of an inflection point.International Journal of Mathematics and Scientific Computing, (ISSN: 2231-5330), vol. 6(1). https://veltech.edu.in/wp-content/uploads/2016/04/Paper-04-2016.pdf

See also `bese` and `bede`.

## Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79``` ```# #Lets create some convex/concave data based on the Fisher-Pry model, without noise f=function(x){5+5*tanh(x-5)};xa=0;xb=15; set.seed(12345);x=sort(runif(5001,xa,xb));y=f(x); # t1=Sys.time(); a<-findipiterplot(x,y,0,TRUE,TRUE,FALSE); t2=Sys.time();print(as.POSIXlt(t2, "GMT")-as.POSIXlt(t1, "GMT"),quote=F); #Time difference of 2.692897 secs #Lets see available results ls(a) # [1] "aedmout" "aesmout" "BEDE" "BESE" "first" "xydl" "xysl" a\$first;#Show first solution # i1 i2 chi_S,D # ESE 1128 2072 4.835633 # EDE 1091 2221 4.999979 a\$BESE;#Show ESE iterations # 1 2 3 4 5 6 7 8 # ESE iterations 4.835633 5.054775 4.978086 5.011331 4.993876 5.003637 4.998145 4.999782 a\$BEDE;#Show EDE iterations # 1 2 3 4 5 6 7 8 # EDE iterations 4.999979 4.996327 4.997657 5.001511 4.996464 5.000629 4.999149 4.999885 # 9 10 # 5.000082 4.999782 a\$aesmout;#Statistics and 95%c c.i. for ESE # mean sdev 95%(l) 95%(r) # ESE method 4.984408 0.0640699 4.930844 5.037972 a\$aedmout;#Statistics and 95%c c.i. for EDE # mean sdev 95%(l) 95%(r) # EDE method 4.999146 0.001753223 4.997892 5.0004 # #Look how bisection based method (BESE) converges in 8 steps... # lapply(a\$xysl,summary); # [[1]] # x y # Min. : 0.006405 Min. : 0.00046 # 1st Qu.: 3.802278 1st Qu.: 0.83521 # Median : 7.583006 Median : 9.94325 # Mean : 7.504537 Mean : 6.68942 # 3rd Qu.:11.240944 3rd Qu.: 9.99996 # Max. :14.994895 Max. :10.00000 # #... # # # [[8]] # x y # Min. :4.978 Min. :4.891 # 1st Qu.:4.988 1st Qu.:4.938 # Median :5.004 Median :5.018 # Mean :4.999 Mean :4.997 # 3rd Qu.:5.009 3rd Qu.:5.043 # Max. :5.018 Max. :5.090 # # and BEDE in 10 steps: # lapply(a\$xydl,summary) # [[1]] # x y # Min. : 0.006405 Min. : 0.00046 # 1st Qu.: 3.802278 1st Qu.: 0.83521 # Median : 7.583006 Median : 9.94325 # Mean : 7.504537 Mean : 6.68942 # 3rd Qu.:11.240944 3rd Qu.: 9.99996 # Max. :14.994895 Max. :10.00000 # # ... # # [[10]] # x y # Min. :4.982 Min. :4.911 # 1st Qu.:4.993 1st Qu.:4.965 # Median :5.004 Median :5.019 # Mean :5.001 Mean :5.007 # 3rd Qu.:5.009 3rd Qu.:5.045 # Max. :5.018 Max. :5.090 # # See also the pdf plots 'ese_iterations.pdf' and 'ede_iterations.pdf' ```

### Example output

```Time difference of 1.87582 secs
[1] "BEDE"    "BESE"    "aedmout" "aesmout" "first"   "xydl"    "xysl"
i1   i2  chi_S,D
ESE 1128 2072 4.835633
EDE 1091 2221 4.999979
1        2        3        4        5        6        7
ESE iterations 4.835633 5.054775 4.978086 5.011331 4.993876 5.003637 4.998145
8
ESE iterations 4.999782
1        2        3        4        5        6        7
EDE iterations 4.999979 4.996327 4.997657 5.001511 4.996464 5.000629 4.999149
8        9       10
EDE iterations 4.999885 5.000082 4.999782
mean      sdev   95%(l)   95%(r)
ESE method 4.984408 0.0640699 4.930844 5.037972
mean        sdev   95%(l) 95%(r)
EDE method 4.999146 0.001753223 4.997892 5.0004
[[1]]
x                   y
Min.   : 0.006405   Min.   : 0.00046
1st Qu.: 3.802278   1st Qu.: 0.83521
Median : 7.583006   Median : 9.94325
Mean   : 7.504537   Mean   : 6.68942
3rd Qu.:11.240944   3rd Qu.: 9.99996
Max.   :14.994895   Max.   :10.00000

[[2]]
x               y
Min.   :3.452   Min.   :0.4325
1st Qu.:4.576   1st Qu.:2.9982
Median :4.958   Median :4.7913
Mean   :4.910   Mean   :4.7112
3rd Qu.:5.287   3rd Qu.:6.3987
Max.   :6.219   Max.   :9.1975

[[3]]
x               y
Min.   :4.462   Min.   :2.543
1st Qu.:4.844   1st Qu.:4.227
Median :4.985   Median :4.925
Mean   :5.003   Mean   :5.004
3rd Qu.:5.104   3rd Qu.:5.520
Max.   :5.648   Max.   :7.850

[[4]]
x               y
Min.   :4.688   Min.   :3.491
1st Qu.:4.913   1st Qu.:4.565
Median :4.982   Median :4.911
Mean   :4.977   Mean   :4.889
3rd Qu.:5.052   3rd Qu.:5.259
Max.   :5.268   Max.   :6.308

[[5]]
x               y
Min.   :4.865   Min.   :4.330
1st Qu.:4.956   1st Qu.:4.781
Median :5.004   Median :5.018
Mean   :4.999   Mean   :4.996
3rd Qu.:5.045   3rd Qu.:5.223
Max.   :5.158   Max.   :5.781

[[6]]
x               y
Min.   :4.921   Min.   :4.605
1st Qu.:4.968   1st Qu.:4.838
Median :5.004   Median :5.018
Mean   :4.997   Mean   :4.987
3rd Qu.:5.023   3rd Qu.:5.115
Max.   :5.067   Max.   :5.334

[[7]]
x               y
Min.   :4.967   Min.   :4.835
1st Qu.:4.982   1st Qu.:4.911
Median :5.004   Median :5.019
Mean   :5.001   Mean   :5.007
3rd Qu.:5.018   3rd Qu.:5.090
Max.   :5.040   Max.   :5.201

[[8]]
x               y
Min.   :4.978   Min.   :4.891
1st Qu.:4.988   1st Qu.:4.938
Median :5.004   Median :5.018
Mean   :4.999   Mean   :4.997
3rd Qu.:5.009   3rd Qu.:5.043
Max.   :5.018   Max.   :5.090

[[1]]
x                   y
Min.   : 0.006405   Min.   : 0.00046
1st Qu.: 3.802278   1st Qu.: 0.83521
Median : 7.583006   Median : 9.94325
Mean   : 7.504537   Mean   : 6.68942
3rd Qu.:11.240944   3rd Qu.: 9.99996
Max.   :14.994895   Max.   :10.00000

[[2]]
x               y
Min.   :3.334   Min.   :0.345
1st Qu.:4.602   1st Qu.:3.110
Median :4.978   Median :4.891
Mean   :4.996   Mean   :4.973
3rd Qu.:5.391   3rd Qu.:6.860
Max.   :6.666   Max.   :9.655

[[3]]
x               y
Min.   :4.192   Min.   :1.659
1st Qu.:4.800   1st Qu.:4.014
Median :4.978   Median :4.891
Mean   :4.991   Mean   :4.950
3rd Qu.:5.166   3rd Qu.:5.824
Max.   :5.800   Max.   :8.321

[[4]]
x               y
Min.   :4.562   Min.   :2.940
1st Qu.:4.898   1st Qu.:4.494
Median :4.985   Median :4.925
Mean   :4.987   Mean   :4.935
3rd Qu.:5.078   3rd Qu.:5.390
Max.   :5.433   Max.   :7.040

[[5]]
x               y
Min.   :4.752   Min.   :3.787
1st Qu.:4.931   1st Qu.:4.655
Median :4.990   Median :4.951
Mean   :4.992   Mean   :4.958
3rd Qu.:5.052   3rd Qu.:5.259
Max.   :5.251   Max.   :6.228

[[6]]
x               y
Min.   :4.854   Min.   :4.275
1st Qu.:4.957   1st Qu.:4.787
Median :5.004   Median :5.018
Mean   :4.998   Mean   :4.988
3rd Qu.:5.040   3rd Qu.:5.201
Max.   :5.139   Max.   :5.690

[[7]]
x               y
Min.   :4.919   Min.   :4.597
1st Qu.:4.968   1st Qu.:4.838
Median :5.004   Median :5.018
Mean   :5.000   Mean   :4.998
3rd Qu.:5.025   3rd Qu.:5.126
Max.   :5.082   Max.   :5.409

[[8]]
x               y
Min.   :4.951   Min.   :4.757
1st Qu.:4.978   1st Qu.:4.891
Median :5.004   Median :5.018
Mean   :4.999   Mean   :4.996
3rd Qu.:5.018   3rd Qu.:5.091
Max.   :5.047   Max.   :5.234

[[9]]
x               y
Min.   :4.971   Min.   :4.854
1st Qu.:4.985   1st Qu.:4.925
Median :5.004   Median :5.019
Mean   :5.002   Mean   :5.009
3rd Qu.:5.013   3rd Qu.:5.067
Max.   :5.029   Max.   :5.144

[[10]]
x               y
Min.   :4.982   Min.   :4.911
1st Qu.:4.993   1st Qu.:4.965
Median :5.004   Median :5.019
Mean   :5.001   Mean   :5.007
3rd Qu.:5.009   3rd Qu.:5.045
Max.   :5.018   Max.   :5.090
```

inflection documentation built on June 28, 2019, 5:03 p.m.