Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Practical Data Analysis
  • Table Of Contents Toc
Practical Data Analysis

Practical Data Analysis - Second Edition

By : Hector Cuesta, Dr. Sampath Kumar
3.5 (2)
close
close
Practical Data Analysis

Practical Data Analysis

3.5 (2)
By: Hector Cuesta, Dr. Sampath Kumar

Overview of this book

Beyond buzzwords like Big Data or Data Science, there are a great opportunities to innovate in many businesses using data analysis to get data-driven products. Data analysis involves asking many questions about data in order to discover insights and generate value for a product or a service. This book explains the basic data algorithms without the theoretical jargon, and you’ll get hands-on turning data into insights using machine learning techniques. We will perform data-driven innovation processing for several types of data such as text, Images, social network graphs, documents, and time series, showing you how to implement large data processing with MongoDB and Apache Spark.
Table of Contents (16 chapters)
close
close

Generating random numbers


While getting truly random numbers is a difficult task, most of the Monte Carlo methods perform well with pseudo-random numbers, and this makes it easier to rerun simulations based in a seed. Practically, all modern programming languages include basic random sequences, or at least sequences good enough to produce accurate simulations.

  • Python includes the random library. In the following code, we can see the basic usage of this library:

    import random as rnd
  • Getting a random float between 0 and 1:

>>>rnd.random()
0.254587458742659
  • Getting a random number between 1 and 100:

>>>rnd.randint(1,100)
56
  • Getting a random float between 10 and 100 using a uniform distribution:

>>>rnd.uniform(10,100)
15.2542689537156

Tip

For a detailed list of methods in the random library, go to: http://docs.python.org/3.2/library/random.html

In the case of JavaScript, a more basic random function is included with the function Math.random(); for the purpose of...

CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Practical Data Analysis
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon