classify_curve: Classifies a planar curve according to its convexity,...

Description Usage Arguments Details Value Note Author(s) References See Also Examples

View source: R/classify_curve.R

Description

Given a planar curve we want to know its convexity ranges, the index for use in ESE or EDE methods, the existence of a maximum or minimum and the classification as tulip or bell.

Usage

1

Arguments

x

A numeric vector for the independent variable without missing values

y

A numeric vector for the dependent variable without missing values

Details

A first check for the existence of infiniteies is performed. If infinities exist, then all outputs are set to 'NA', otherwise main code works.

Value

A list with next members:

  1. ctype the convexity type of curve: convex, concave, convex/concave or concave/convex

  2. index the relevant index for ESE or EDE usage: 0,1,0,1 respectively to 'ctype' previously presented values

  3. asymmetry a classification of asymmetry type, if exists

  4. totalconvexity the overall dominant convexity type of curve if we omit the fact probably has ranges of different types of convexity

  5. ismax logical value, TRUE if a maximum seems to exits, FALSE if a minimum seems to be the case, 'NA' otherwise

  6. shapetype the shape of extreme as tulip, bell or 'NA'

Note

Results of current function have an approximation type, since not all kind of curves can be classified by a given procedure. Caution has been taken in order to be able to infer for the very basic attributes.

Author(s)

Demetris T. Christopoulos

References

[1]Demetris T. Christopoulos (2019). New methods for computing extremes and roots of a planar curve: introducing Noisy Numerical Analysis (2019). ResearchGate. http://dx.doi.org/10.13140/RG.2.2.17158.32324

[2]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

[3]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

symextreme, scan_curve, scan_noisy_curve

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
## Lets create a convex/concave curve and classify it:
f=function(x){5+5*tanh(x-5)}
x=seq(0,8,0.01)
y=f(x)
plot(x,y,pch=19,cex=0.2)
cc=classify_curve(x,y)
cc$ctype
## [1] "convex_concave"
cc$index
## [1] 0
## Use 'index':
ede(x,y,cc$index)
##      j1  j2 chi
## EDE 369 633   5
## Lets create an 'almost convex' curve and see it:
f=function(x){-x^3+5*x-6}
x=seq(-2.5,1.5,0.01)
y=f(x)
plot(x,y,pch=19,cex=0.2)
cc=classify_curve(x,y)
cc$totalconvexity
## [1] "convex"
## Check for existence of a maximum for a noisy curve:
f=function(x){100-(x-5)^2}
x=seq(0,12,by=0.01);
r=1.5;y=f(x)+runif(length(x),-r,r)
plot(x,y,pch=19,cex=0.2)
cc=classify_curve(x,y)
cc$ismax
## [1] TRUE

RootsExtremaInflections documentation built on July 29, 2019, 5:03 p.m.