Custom R Component - Appstam Advanced Graphics
Introduction
Visualization is a key part of every data science project. Exploring the data and its patterns is necessary before running the actual analysis. In addition, graphics support the communication and understanding of insights. Predictive Analytics and Lumira offer a wide set of tools to create visualizations. This extension leverages the graphical capabilities of R and ggplot2 to expand the scope of visualizations in PA . For a detailed description check our user guide and our YouTube tutorial.
How to upload the component in SAP Predictive Analytics
The component can be downloaded as .spar file from GitHub. Then deploy it as described here. You just need to import it through the option "Import/Model Component", which you will find by clicking on the plus-sign at the bottom of the list of the available algorithms.
Visualization is a key part of every data science project. Exploring the data and its patterns is necessary before running the actual analysis. In addition, graphics support the communication and understanding of insights. Predictive Analytics and Lumira offer a wide set of tools to create visualizations. This extension leverages the graphical capabilities of R and ggplot2 to expand the scope of visualizations in PA . For a detailed description check our user guide and our YouTube tutorial.
How to upload the component in SAP Predictive Analytics
The component can be downloaded as .spar file from GitHub. Then deploy it as described here. You just need to import it through the option "Import/Model Component", which you will find by clicking on the plus-sign at the bottom of the list of the available algorithms.
Extension Features
The extension has 5 main features:
The extension has 5 main features:
- Create different plot types: Scatterplots, histograms, density plots, line plots and boxplots
- Grouping Data: Provide additional information by forming subgroups by color or facetting
- Save your plot: Save your plot as png or jpg file
- Smoothing: Add trend lines to your plot
- Annotations: Customize your plots by adding a title and x and y axis label
Usage
These parameters can be set by the user:
These parameters can be set by the user:
Example
For demonstration purposes we use a churn data set, which can be downloaded as a csv file from GitHub. It consists of a sample of 3333 active customers from a telecommunications company, containing contractual details, customer behavior and the information whether the customer discontinued the service of the provider.
As analysts we would like to investigate which factors influence the decision of a customer to churn. In this example we compare the distribution of the used total daily minutes of a customer in connection to his churning behavior and whether he takes plan in an international plan. We choose graphic type density and the x variable total_day_minutes. In order to differentiate between customers who churn and customers who don't, we color the distribution according to the variable churn. Furthermore we compare the two densities by vertically facetting the data set into customers that take part in an international_plan and customers who don't.
For demonstration purposes we use a churn data set, which can be downloaded as a csv file from GitHub. It consists of a sample of 3333 active customers from a telecommunications company, containing contractual details, customer behavior and the information whether the customer discontinued the service of the provider.
As analysts we would like to investigate which factors influence the decision of a customer to churn. In this example we compare the distribution of the used total daily minutes of a customer in connection to his churning behavior and whether he takes plan in an international plan. We choose graphic type density and the x variable total_day_minutes. In order to differentiate between customers who churn and customers who don't, we color the distribution according to the variable churn. Furthermore we compare the two densities by vertically facetting the data set into customers that take part in an international_plan and customers who don't.
The figure below shows the resulting plot. If we compare the distributions for churning behavior, we see that customers who make more calls are also more likely to churn. But if we take into account whether the customer takes part into an international plan it seems that this relationship is not as striking anymore. Offering an international plan to high value customers might provide an incentive for them to continue their contract. A subsequent prediction model should definietly include the attributes total_day_minutes and international_plan.
Disclaimer
Please note that this component is provided as-is without any guarantee or support. Please test the component to ensure it works for your purposes.
Source of telecom churn data set: Lichman, M. (2013). UCI Machine Learning Repository [http://archive.ics.uci.edu/ml]. Irvine, CA: University of California, School of Information and Computer Science.
Please note that this component is provided as-is without any guarantee or support. Please test the component to ensure it works for your purposes.
Source of telecom churn data set: Lichman, M. (2013). UCI Machine Learning Repository [http://archive.ics.uci.edu/ml]. Irvine, CA: University of California, School of Information and Computer Science.
Customized Extensions
Appstam provides numerous additional features to customize the Appstam Advanced Graphics Extension. Possible add-ons include:
|
|
Contact
If you have any suggestions or are interested in a customized version that suits your requirements, feel free to contact us under [email protected].
Take a look on our industry 4.0 forecasting video here (5 min). The first minute is general, if you want to jump to the application part, here it starts.
Thank you for your feedback!
If you have any suggestions or are interested in a customized version that suits your requirements, feel free to contact us under [email protected].
Take a look on our industry 4.0 forecasting video here (5 min). The first minute is general, if you want to jump to the application part, here it starts.
Thank you for your feedback!