Quantcast
Channel: roman10 » Data Structure & Algorithms
Browsing latest articles
Browse All 15 View Live

How to Calculate Modular Exponentiation

Modular exponentiation is a exponentiation performed over modulus. It is used in many cryptographic algorithms. Modular exponentiation accepts three input integers, say x, y and n and computes...

View Article


Primality Testing — Part 4. Fermat’s Little Theorem and A Probabilistic Approach

Previous posts on primality testing are all trying to factor the input number. For a very large number with few hundreds of bits, it is difficult to compute in that manner. This post introduce a...

View Article


Big Integer Arithmetic

Most of computer applications operates on small integers which can be represented by 32 bit integers. However, there are times we’ll need to deal with extremely big integers which can only be...

View Article

Bit Set

One specific usage of bits is to represent sets. Suppose we have a set of N elements {e1, e2, …, en}, and we want to select a subset of K (K <= N) elements. We can use a bit pattern to represent the...

View Article

Image may be NSFW.
Clik here to view.

Linear Regression

This is some notes taken when I summarize the things learned after taking Andrew Ng’s machine learning course at coursera. Introduction Regression is a technique to model relationships among variables....

View Article


Image may be NSFW.
Clik here to view.

Logistic Regression

This is some notes taken when I summarize the things learned after taking Andrew Ng’s machine learning course at coursera. Introduction Linear regression predicts continuous values. At times, we need...

View Article

Performance Metrics for Binary Classification

Binary classification classifies samples as either 0 (negative) or 1(positive). Depending on which class/label the sample data belongs to and its predication result, each sample fits in a cell of the...

View Article

Naive Bayes

Bayes’ Theorem Let’s start from Bayes’ theorem, also referred as Bayes’ law or Bayes’ rule. P(A|B) = P(B, A) / P(B) = P(B|A) * P(A) / P(B) = P(B|A) * P(A) / (P(B|A) * P(A) + P(B|^A) * P(^A)) P(A):...

View Article


Image may be NSFW.
Clik here to view.

Support Vector Machine Concept: VC Dimension

Given a set of n samples , we want to label them as either -1 or 1. In total, there are possible label combinations. A class of learning machines H can be used to label the samples. If for each label...

View Article

Browsing latest articles
Browse All 15 View Live