-->

Monday, December 19, 2016

Type Casting with Primitives



byte: 8 bits
short: 16 bits
int: 32 bits
long: 64
float: 32
double: 64

In java, through polymorphism, its possible to cast different numerals as different types. Take this for example:
int 45 = new double


This is known as Implicit casting, and the number we casted when done so implicitly is generally preserved.

You can also cast down in reverse. Known as explicit casting:
Double 43.45 = (Int) 43.45


Its important to understand that you can as you do such things however, you are effectively cutting off bits (that is, zeros and ones) from that number to make it fit as a smaller unit.

Using a unit converter online, let's see what really happens to that number.





Wednesday, April 27, 2016

Data Science Basics - Structured

Big data is data that exceeds normal processing techniques because the data is too big, moves too fast, or doesn't plain fit structural architecture requirements.


Clustering is one form of classifying structured datasets. They are useful when you want to know something about a larger subset and just about that larger subset.

Some situations where we might cluster involves automatically tagging someone in a photograph, based on prior photos of that person, or recommending a new song to someone based on prior music selections.

When first utilizing a cluster algorithm, it helps to have a set of training data first, Two of the risks we run with clustering training data is overfitting and overgeneralization with our training data.

"If it walks like a duck and quacks like a duck, it might be a duck."

Overfitting: "It is a duck only if it looks and quacks precisely as I have observed ducks. If a new species of duck is added to the dataset, it can't be a duck."

Overgeneralization: "If it hobbles on two legs and emits a hi pitched noise it must be a duck."