Book Image

Java Data Analysis

By : John R. Hubbard
Book Image

Java Data Analysis

By: John R. Hubbard

Overview of this book

Data analysis is a process of inspecting, cleansing, transforming, and modeling data with the aim of discovering useful information. Java is one of the most popular languages to perform your data analysis tasks. This book will help you learn the tools and techniques in Java to conduct data analysis without any hassle. After getting a quick overview of what data science is and the steps involved in the process, you’ll learn the statistical data analysis techniques and implement them using the popular Java APIs and libraries. Through practical examples, you will also learn the machine learning concepts such as classification and regression. In the process, you’ll familiarize yourself with tools such as Rapidminer and WEKA and see how these Java-based tools can be used effectively for analysis. You will also learn how to analyze text and other types of multimedia. Learn to work with relational, NoSQL, and time-series data. This book will also show you how you can utilize different Java-based libraries to create insightful and easy to understand plots and graphs. By the end of this book, you will have a solid understanding of the various data analysis techniques, and how to implement them using Java.
Table of Contents (20 chapters)
Java Data Analysis
Credits
About the Author
About the Reviewers
www.PacktPub.com
Customer Feedback
Preface
Index

Measuring distances


A metric on a set S of points is a function that satisfies these conditions for all x,y,z S:

  1. d(p,q) = 0 p=q

  2. d(p,q) = d(p,q)

  3. d(p,q) ≤ d(p,r)+d(r,q)

Normally, we think of the number d(p,q) as the distance between p and q. With that interpretation, the three conditions are obvious: the distance from a point to itself is 0; if the distance between two points is 0, then they must be the same point; the distance from p to q is the same as the distance from q to p; the distance from p to q cannot be greater than the sum of the distances from p to r and from r to q. This last property is called the triangle inequality.

In mathematics, a non-empty set S together with a metric d defined on it is called a metric space. The simplest example is n-dimensional Euclidean space , where and d is the Euclidean metric,

In the case of two dimensions, , and . This is just the ordinary distance formula for points in the Cartesian plane, equivalent to the Pythagorean theorem, as Figure...