James Martini archive

Tag : math (2)

Plugin testing

Categories: Journal
Tags: ,
Comments: Comments Off
Published on: August 5, 2018

One of the benefits of coming back to an existing wordpress blog rather than continuing to try to roll my own in github.io is that I can easily piggyback on other people writing plugins to solve the same problems. So far, the Crayon and MathJax-Latex plugins seem to fit the bill.

Testing syntax highlighting

# hello_world.py

class HelloWorld():
“””An unnecessarily complex hello world”””
def __init__(self):
print(“Hello world”)

if __name__ == “__main__”:
hello = HelloWorld()

Testing Latex / Math

J(\theta) &= \frac{1}{m}\sum_{i=1}^{m}Cost(h_\theta(x)^{(i)},y^{(i)}) \\
Cost(h_\theta(x),y) &= -log(h_\theta(x))& y=1 \\
Cost(h_\theta(x),y) &= -log(1-h_\theta(x))& y=0

Reading set notation

Categories: Journal
Tags: , ,
Comments: Comments Off
Published on: June 25, 2009

So I’ve been skipping my World of Warcraft time and reviewing calculus and differential equations so I don’t get too rusty. I almost immediately ran into an issue “reading” some of the set notation. It’s great because it’s compact and can communicate a lot of information but that doesn’t help if you can’t read it.

Take for example


Doesn’t say much unless you can read it as “the set of all ordered pair x, f of x such that x is a member of set A”. Here are a few quick rules:

{ } denotes the set
( ) denotes and ordered pair
|  “such that”
: also “such that” just in case things were too clear
∈ “is a member of”
∉ “is not a member of”
∪ union of two sets
∩ intersection of sets

So ℕ = {|a| : a} reads as “The set of natural numbers is equal to the absolute value of a such that a is a member of set ℤ”. Since ℤ is generally the set of ingeters { … ,-2, -1, 0, 1, 2, … } this means that ℕ = {0, 1, 2, … }

So now I can mostly read set notation again. Now I just need to learn MathML.

page 1 of 1
Welcome , today is Monday, August 20, 2018