DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
What's in store for DevOps in 2023? Hear from the experts in our "DZone 2023 Preview: DevOps Edition" on Fri, Jan 27!
Save your seat
  1. DZone
  2. Data Engineering
  3. AI/ML
  4. How a Data Scientist Built a Web-Based Data Application

How a Data Scientist Built a Web-Based Data Application

I’m an algorithms guy, and what I want more than anything else is to be able to effectively communicate the models I’ve built and get them into the hands of other people to see what they can find. Read on to learn more.

Frank Evans user avatar by
Frank Evans
·
Jan. 15, 16 · Analysis
Like (11)
Save
Tweet
Share
10.94K Views

Join the DZone community and get the full member experience.

Join For Free

i’m an algorithms guy. i love exploring data sets, building cool models, and finding interesting patterns that are hidden in that data. once i have a model, then of course i want a great interactive, visual way to communicate it to anyone that will listen. when it comes to interactive visuals there is nothing better than javascript’s d3. it’s smooth and beautiful.

but like i said, i’m an algorithms guy. those machine learning models i’ve tuned are in python and r. and, i don’t want to spend all my time trying to glue them together with web code that i don't understand very well and am not terribly interested in.

here is an interactive data application that was the keystone of a post about building topic models on the presidential state of the union addresses . try it out. you can choose the number of topics, as well as document frequency filters for the maximum and minimum number of documents a word can appear. more topics is like zooming in on the body of text. fewer is like zooming out. a maximum document frequency of 0.75 means that if a word appears in more than 75% of the speeches it is not used since it is “too common”. in the same way, a minimum document frequency of 0.05 means that if a word appears in less than 5% of the speeches, it is “too rare” to contribute to an overall trend. (note: the lda model takes a few seconds to run.)

this "xap"— a data application built on the exaptive platform —relies primarily on three open source technologies: html web inputs, python to build the machine learning model, and javascript d3 for the visuals. plus, the visuals communicate with one another such that hovering over one of the lines in the d3 line plot will dynamically create another d3 word cloud of the most important terms that describe that topic. i didn't have to write any glue code.

here is a behind the curtain look at the exaptive elements that make up this xap:

full_xap.png

the xap is grouped into those same 3 functional areas: user input (html), algorithm (python), and visualization(d3.js)... plus a fourth to show a progress bar when the app is processing a model and control, a universal color scheme across plots. each section is made up of several components. each component takes inputs on the left and outputs to the right. which outputs are connected to which inputs is governed by a drag and drop wire. inside each component, the best technology to accomplish that task is encapsulated. the platform takes care of communications between components.

clicking on the component in the algorithmic layer shows the python code used to build the latent dirichlet allocation topic model .

lda_code.png

this is the part i wrote.  the output is being fed to some javascript in the visualization layer that uses d3:

linechart_code.png

this is the part i did not write. in fact, this is far better and more scalable d3 than i can write. all i have to do now is connect the output data of my topic model component to the inputs of the visualization components. not only that, but the output of one visualization can be used as an input into another one to make the plots dynamic and interactive.

linechart_inputs.png

the same applies to the user input components.  they use javascript to dynamically create the html inputs that lets a user run their own topic model. i didn’t write those either. i just dragged them in from the standard toolbox. even though they are different technologies, with no glue code i wired them together in just a few minutes, and they can supply the inputs for my python topic model component.

i’m an algorithms guy (please stop me if i start repeating myself), and what i want more than anything else is to be able to effectively communicate the models i’ve built and get them into the hands of other people to see what they can find. but somewhere out there is someone who is a great visualization person that would love to have good algorithmic components to wire into their visuals. they built these visualization components i am using. they make my work better, and i hope my algorithms can do the same for them . if i can effectively connect and collaborate with those interested in visualization, design, user experience, subject matter expertise, and even other types of algorithms, then we can amplify the quality of each other’s work.

Data science application Machine learning

Published at DZone with permission of Frank Evans, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • How To Validate Three Common Document Types in Python
  • Mr. Over, the Engineer [Comic]
  • (Deep) Cloning Objects in JavaScript
  • Cloud-Based Transportation Management System

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: