Categories
Natural computation for intell. sys.

FIT5167 – Natural Computation Week 8

With a unit test and assignment this week, there were no new topics introduced. The research I had to do for SOMs in relation to the assignment did yield a lot of new information.

Implementation of SOM networks has a number variable components:

  • Neighbour updating, neighbour radius
  • Weight decay
  • Random weight initialization (the random weights at initialization will effect clusters)
  • Adjusting learning rate and learning rate decay
  • Adjusting training/test data split
  • Adjusting number of neurons in 2D lattice

Evaluation of the quality of clusters created by a SOM is quite difficult. Weight distances is the best method for checking if like clusters have formed in different sections of the map. Running some clustering in MatLab yielded basic results but I am not familiar enough with the clustering tool to extrapolate all of of the information required to make inference on the results.

Initial results from clustering tool in Matlab on Banding data

The information gained from self-organizing maps may be useful when constructing supervised learning networks.

Categories
Network security

FIT5044 – Network Security Week 8

Week 8 saw a continuation on network layer security. IPsec was discussed in detail throughout the lecture, specifically how the three objectives could be acheived:

  • Integrity
  • Authentication
  • Confidentiality

During the week I had a look at some open source implementation that enable there objectives:

Still working on getting a practical test run going, aiming to do some testing with Wireshark to demonstrate the effectiveness of IPsec.

typicalIpSec
Typical IPsec configuration using Cisco routers
Categories
Intelligent systems

FIT5047 – Intelligent Systems Week 7

This week’s lecture delved further into probabilistic systems, specifically Bayesian networks. We explored the rationale behind the explosion in probabilistic systems in the past 15 years, namely the computational shortcuts achieved via the markov property and real world usefulness of  refining probabilities as known information increases.

We got much more detail about Bayesian network this week, including the components:

  • Random Variables [nodes, represented as binary, ordered, integral or continuous states]
  • Node links
  • Conditional Probability table [Quantifying the affect of parent on a  node]
  • The network is a direct, acyclic graph

Nice simple example of a Bayesian network

With the network seen above, causalities are indicated by the node links. If a node state changes from unknown to know, the Bayesian network can efficiently update the probabilities for all the other nodes. Note that the efficiency of a network relies on finding marginally independent nodes. If in this example all of the nodes were linked, the network would not be very effective.  The Markov property as defined by the lecture notes:

There are no direct dependencies in the system being modeled which are not explicitly shown via arcs

In essences when re-propagating probabilities after information is introduced the Markov model allows for encapsulation when completing calculations, speeding up the process.

With a network we can conduct belief updating, a form of inference. Essential to this process is identifying conditional independence of nodes, again this is closely associated to the Markov property. I will need to do some reading before going into more detail about that one. The lecture came to a close with an introduction to Netica, followed up in the tut with some practical experimentation.

 

Categories
Adv. programming for DB apps.

FIT5059 – Adv. Prog. for DB Applications Week 7

Continuation of previous lecture focusing of multiple forms vs multiple canvasses. This is a major concern for distributed development, an area I don’t think it is a strong point for Oracle forms. The source code from tutorial 7:

Custom Forms, Multiple Form Approach
Form 1: Student Form--------------------
1. Goto Tools/Layout Editor2. Create 6 text items (and labels)   e.g. text_item5, text_item6, text_item7, text_item8, text_item29, text_item303. Create 2 push buttons   e.g. push_button20, push_button21
4. Create a PRE-FORM trigger in the Triggers of the Form   :system.message_level :=25;   -- :text_item4 := :global.sid;
5. Create an Alert object   a. Name: NOT_NULL_ALERT   b. Message: Not null error found   c. Alert Style: Stop   d. Button 1 Label: OK
6. Create a program unit called DISPLAY_ALERT
PROCEDURE Display_NOTNULL_ALERT IS  alert_button NUMBER;BEGIN  alert_button := SHOW_ALERT('NOT_NULL_ALERT');  if alert_button = ALERT_BUTTON1 then  	message('Insertion Cancelled');  end if;END;
 
Categories
Natural computation for intell. sys.

FIT5167 – Natural Computation Week 7

Week 7 introduced Genetic Algorithms, who’s effectiveness is somewhat disputed. In any case, these algorithms are quite interesting in their balance between a kind of hill climbing (fitness function) and stochastic methods (cross over, mutation).

The lecture gave the natural basis for these algorithms and defined the key components:

  • Chromosome (ie 101101101)
  • Reproduction (ie crossover/roulette/tournament)
  • Mutation
  • Fitness functions

GAvHillCimb
Genetic Algorithms can find good solutions in large search spaces quickly

The second half of the lecture was dedicated to assignment and unit test revision.

Categories
Network security

FIT5044 – Network Security Week 7

Unfortunately I missed week 7’s lecture thus will be making only a review of the lecture notes. The topic for week 7 was the IP layer and IP security. Using the simplistic network layering of App, Trans, Network, Data Link and Physical [All trains now depart promptly]. We see that the IP is a network level protocol. It is the most common network layer,  a list of other network layers can be found here: http://en.wikipedia.org/wiki/Network_Layer#Protocols. Importantly the function of the network layer is end-to-end routing of packets through networks. The security concerns listed in the lecture were:

  • Authentication
  • Message reply
  • Message alteration
  • Message delay and denial

Some of the original vulnerabilities associated with the IP layer (ping of death and smurf  attacks) were outlined. Next some of the key components of the IP layer were introduced:

  • Bridge
  • Router
  • Gateway
  • Firewall

With the basics out of the way, notes on how to increase the security of the network layer commenced. Authentication, Integrity and Confidentiality were identified and IPSec posed as a  partial solution. Authentication and confidentiality can be enhanced with IPsec through the Authentication Header [AH] and Encapsulating Security Payload [ESP].

 

AH.ESP
Authentication header and Encapsulating Security Payloads

The application of IPSec comes in two modes:

  • Transport mode: Peer-to-peer communications, generally used in internal network comms. Data packets are encrypted, headers are not.
  • Tunnel mode: Header and payload are encrypted, most commonly seen in remote-access.

The remainder of the lecture notes focussed on an explanation of the encryption and key exchanges. A decent summary video which helped me:

Categories
Random

Pascals Triangle – python

Wrote a quick script that attempts to complete pascals triangle recursively, thanks Feng.
** Note, after getting some feedback made a number of changes, thanks Fry**
see source: pascals.py

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#########################################################
# Python Script: Pascals triangle #
# Enter How many rows you want... #
# Mark Culhane 2011, straightIT.com #
#########################################################

#Initialize
tri =[[1],[1]]
n = 0

def pascals():
if len(tri) rowNum = len(tri) - 1
colCnt = len(tri[rowNum])

if colCnt == rowNum:
tri[rowNum].extend([1])
tri.append([1])
else:
p1 = tri[len(tri)-2][len(tri[len(tri)-1])-1]
p2 = tri[len(tri)-2][len(tri[len(tri)-1])]
tri[rowNum].extend([p1+p2])
pascals()
return

def displaySol():
i = 0
for x in tri:
if i != n:
print(tri[i])
i = i + 1

if __name__ == "__main__":
print "Pascals Triangle"
n = long(raw_input("How many rows do you want?:"))
print "Result: "
pascals()
displaySol()
Categories
Network security

FIT5044 – Network Security Week Addendum

A couple of useful python scripts I made from copying the explanations on wikipedia:

Extended Euclidean algorithm – Used in RSA for determining the public key, once the private is chosen (see wikipage)

Pollard’s rho algorithm – One method for factorizing (see wikipage), try creating a semi prime with 20 digits then one with 60 digits. Time how long it takes for each 😉

Helpful link with some prime numbers for testing

 

Click on the pic if you don't already have python 2.7

 

Categories
Intelligent systems

FIT5047 – Intelligent Systems Week 6

Intelligent systems’ sixth week took a swing into soft computing and probabilistic systems. We had a quick introduction to probability theory which had the usual intuition breaking outcomes. The use of venn diagrams to explain parts of Kolmogorov’s Axioms were particularly useful. The definition of conditional probability did strike me a little of guard however:

 

Conditional Probability
Conditional Probability

Although in review this does seem much clearer. Given the knowledge of B [yellow] what is the probability of A [red].  As per the diagram and axiom, the answer is the intersection of A and B [green].

A revision of elementary probability reminded me that although at first glance it seems a trivial subject probability requires some use of the brain and calculator:

Suppose a “once in a century” flood has probability 0.01 of occuring in a year. How long do we expect to wait for one?

The answer:

(1 – p)^n = .5

log(1 – p)^n = log (.5)

n log(1 – p) = log (.5)

n = log .5 / log(1 – p)

= approx 69 years

Next came some discussion over notation and then, more importantly, and introduction to Bayes’ Theorm. A simple explination of Bayes’ theorm can be seen here:

 

Discussion then continued to some of the silly mistakes in probability theory that litter its past. I’m sure in 20  years many of the financial tools used in present day will appear on the lecture slides in the same category.

Kevin also made the time to add some material about the nature of probability. The suggestion made in Russell and Norvig is that probability is simply used to represent and agents believe state. If this is kept in mind then it is understandable why Bayesian networks have been such a boon over the past 15 years.

Categories
Adv. programming for DB apps.

FIT5059 – Adv. Prog. for DB Applications Week 6

Week 6 saw an introduction to  custom forms. It makes a lot more sense now why we completed the basic introductions to each component in an automated fashion now. All of the elements that we have already put into practice can be added to a window and customized. Using smart triggers in conjunction with stored procedures gives us the tools that we need to make decent database applications.

The properties palette style customization that is used in Oracle forms developer makes it very similar in feel to ASP.NET development.

More advanced error/exception handling was also discussed this week. Due to the event driven nature of Oracle’s forms, generating exceptions is a convenient way to handle the madness users subject programs to. Customizing systems message will also allow the flow of information from the system to the user to be much more decipherable.

The final topic that was introduced in preparation for next week was the juxtaposition between using multiple canvasses or multiple forms for more complex applications. While multiple forms encompasses much stronger encapsulation, message passing needs to be done using global variables D:<

On the other hand using multiple canvasses allows for much easier message passing, distributed development is decidedly more difficult.

Multi form or multi canvas
Multi form or multi canvas

Doing the assignment will be the best way to ensure that the processes for each element have been memorized.