Image for post
Image for post

I quickly fall in love with Streamlit after I tried it out to deploy my models. I like the smart code of Streamlit to make an interactive dashboard for the visual charts. I like its neat interface. My productivity seems boosted ten-fold (or at least I feel). So here I demonstrate a complex project to show how it is done in only a few lines of code. I will also compare and contrast it with Flask, which is a popular light-weight web framework for Python.

First, let me show you the outcome. My simple app lets users to select the…


Image for post
Image for post

In “Learning Object-Orient Programming with Python in 10 Minutes”, I use a cookie-cutter idea to explain the concept of object-oriented programming (OOP). Many readers like that analogy. If you have not read the previous article, I strongly encourage you to read it first. In this article I continue to use the cookie-cutter idea to explain an important technique “Inheritance” in OOP. Once you understand it, you will read other classes comfortably and write your classes more efficiently.

In this article I also introduce the Unified Modeling Language (UML) Diagram. An UML diagram visualizes the relationships between multiple classes and what…


Image for post
Image for post

This wordy title is just to get your attention. If you are not sure what the __name__==”__main__” is, or not sure if object-orient programming (OOP) can be digested in 10 minutes, then this article is for you. My readers come from very diverse backgrounds, but I believe we all have one thing in common: we have seen how cookies are made from a cookie cutter or at least can imagine how it works. So I decided to use the cookie-cutter idea to explain OOP. After reading this article, you will build classes with a Python template that can run and…


Image for post
Image for post

In our daily lives we interact with chatbot customer services, e-mail spam detections, voice recognition, language translation, or stock market predictions. These artificial intelligence products are powered by Recursive Neural Network (RNN), Long Short-Term Model (LSTM) and Gated recurrent unit (GRU), of an important branch of deep learning that deliver superior predictions for sequential data such as time series, language patterns, voice patterns.

It is not so easy to learn RNN, LSTM, GRU like we learn a regression. In my class I often feel there is a knowledge gap between regression and deep learning. The variation in terminology also creates…


Image for post
Image for post

Often deep learning or neural network is presented as its own category with its own jargons. Learners are oriented with a brain-like anatomy to “imagine” how deep learning can function in the context of the brain. Learners are presented with neurons, interconnectivity, and a complex system of neural networks. In my lecture’s transition from regression to deep learning, I somehow feel there is a moment of silence — like jumping over a deep gap. It takes a lot of preparation to jump to deep learning, and those students jumping successfully may not regress back to regression easily (you may like…


Image for post
Image for post

Feature engineering is one of the fun, creative, and essential steps in machine learning. It transforms raw data into a form that very meaningful information for a model to forecast the future. The predictability of a model relies on good features, which in turn relies on your domain knowledge.

Many experienced stock market traders who evaluate trading rules or charts have already engaged in some forms of feature engineering — whether they realized it or not. For example, a moving average is a feature that characterizes the movement of a stock price. All the technical indicators (RSI, MACD, stochastic oscillators…


Image for post
Image for post

Differential Privacy is an important research branch in AI. It has brought a fundamental change to AI, and continues to morph the AI development. That’s the motive for me to write the series of articles on Differential Privacy and Privacy-preserving Machine Learning (ML).

Two emerging trends in AI are “Explainable AI” and “Differential Privacy”. On Explainable AI, Dataman has published a series of articles including “An Explanation for eXplainable AI”, “Explain Your Model with the SHAP Values”, “Explain Your Model with LIME”, and “Explain Your Model with Microsoft’s InterpretML. In this series, Dataman wants to bring Differential Privacy to your…


Image for post
Image for post

Artificial intelligence (AI) has been integrated into every part of our lives. A chatbot, enabled by advanced Natural language processing (NLP), pops to assist you while you surf a webpage. A voice recognition system can authenticate you in order to unlock your account. A drone or driverless car can service operations or access areas that are humanly impossible. Machine-learning (ML) predictions are utilized to all kinds of decision making. A broad range of industries such as manufacturing, healthcare, finance, law enforcement, and education rely more and more on AI-enabled systems.

However, how AI systems make the decisions is not known…


Image for post
Image for post

(A) What Is General Liability Insurance?

You are not required by law to buy general liability insurance. But without it, you may face expensive liability claims. Most businesses cannot afford the expensive liability claims and the consequent legal expenses. In this post I would like to explain what general liability insurance is, and what it covers.

(B) What Does General Liability Insurance Cover?

As a honest and responsible business owner, you have done the best you can to prevent any potential damages to your employees, your clients or any third parties such as passengers. However, issues still happen. General liability…


Image for post
Image for post

Have you been asked to provide prediction intervals besides the mean predictions? Prediction intervals have many use cases because they provide the range of the predicted values to give better guidance. In financial risk management, the prediction intervals for the high range can help risk managers to mitigate risks. In science, a predicted life of a battery between 100 to 110 hours can inform users when to take actions. Please comment which of the following is more applicable?

  • The expected average financial loss is $40M, or
  • We have 95% confidence that the financial loss will be between $10M and $70M…

Dr. Dataman

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store