Pareto density estimation (PDE) [Ultsch, 2005] used for a scatter density plot.
PDEscatter(x, y, na.rm = FALSE, PlotIt=TRUE,paretoRadius = 0, sampleSize = round(sqrt(5e+08), -3), NrOfContourLines = 20, Plotter
= "native", DrawTopView = T, xlab = "X", ylab = "Y",
main = "PDEscatter", xlim, ylim, Legendlab_ggplot =
"value")
Numeric vector, first feature (for x axis values)
Numeric vector, second feature (for y axis values)
Function may not work with non finite values. If these cases should be automatically removed, set parameter TRUE
Numeric, the Pareto Radius. If omitted (or 0), calculate by paretoRad.
TRUE: plots with function call
FALSE: Does not plot, plotting can be done using the list element Handle
Numeric, maximum size of the sample used for calculation. High values increase runtime significantly.
Numeric, number of contour lines to be drawn. 20 by default.
String, name of the plotting backend to use. Possible values are: "native", "ggplot", "plotly"
Boolean, True means contur is drawn, otherwise a 3D plot is drawn. Default: TRUE
String, title of the x axis. Default: "X", see plot()
function
String, title of the y axis. Default: "Y", see plot()
function
string, the same as "main" in plot()
function
see plot()
function
see plot()
function
String, in case of Plotter="ggplot"
label for the legend. Default: "value"
List of:
Number of points within the ParetoRadius of each point
ParetoRadius used for PDEscatter
Handle of the plot object. Information-string if native R plot is used.
The PDEscatter
function generates the density of the xy data as a z coordinate. Afterwards xyz will be plotted either as a contour plot or a 3d plot.
This function plots the PDE on top of a scatterplot. Variances of x and y should not differ by extreme numbers, otherwise calculate the percentiles on both first.
The method was succesfully used in [Thrun, 2018; Thrun/Ultsch 2018].
PlotIt=FALSE
is usefull if one likes to perform adjustements like axis scaling prior to plotting with ggplot2 or plotly. In the case of native
the handle return null because the basic R functon plot
()is used
[Thrun, 2018] Thrun, M. C.: Projection Based Clustering through Self-Organization and Swarm Intelligence, (Ultsch, A. & Huellermeier, E. Eds., 10.1007/978-3-658-20540-9), Doctoral dissertation, Heidelberg, Springer, ISBN: 978-3658205393, 2018.
[Thrun/Ultsch, 2018] Thrun, M. C., & Ultsch, A. : Effects of the payout system of income taxes to municipalities in Germany, in Papiez, M. & Smiech,, S. (eds.), Proc. 12th Professor Aleksander Zelias International Conference on Modelling and Forecasting of Socio-Economic Phenomena, pp. 533-542, Cracow: Foundation of the Cracow University of Economics, Cracow, Poland, 2018.
[Ultsch, 2005] Ultsch, A.: Pareto density estimation: A density estimation for knowledge discovery, In Baier, D. & Werrnecke, K. D. (Eds.), Innovations in classification, data science, and information systems, (Vol. 27, pp. 91-100), Berlin, Germany, Springer, 2005.
# NOT RUN {
#taken from [Thrun/Ultsch, 2018]
data("ITS")
data("MTY")
Inds=which(ITS<900&MTY<8000)
plot(ITS[Inds],MTY[Inds],main='Bimodality is not visible in normal scatter plot')
# }
# NOT RUN {
PDEscatter(ITS[Inds],MTY[Inds],xlab = 'ITS in EUR',
ylab ='MTY in EUR' ,main='Pareto Density Estimation indicates Bimodality' )
# }
Run the code above in your browser using DataLab