Skip to content

Instantly share code, notes, and snippets.

View radiosilence's full-sized avatar
🔥

James Cleveland radiosilence

🔥
View GitHub Profile
@radiosilence
radiosilence / gist:167464
Created August 13, 2009 21:25 — forked from tcrayford/gist:167461
what the fuck am I doing
def woopfordocstrings():
'''this is a docstring'''
print( "shittin' balls" )
<?php
// Algotest
/*
For PN,
Assign next in line as target
End For
For PN,
If targets available are only self/other target restart
Here we can see a deadlock - All of paris' targets are either already owned by Edward, or are Edward himself. Assignment is impossible!
Solution?
================
Paris hunters
Array
(
[0] => Edward
[1] => Karl
[2] => Ralph
)
void numtest( double learnparas[], int numhid, int emax, int usevalid, int wopt, char *tstr, char *vstr, char *ustr )
{
// test network on the numerical problem
// specified are the learning rate, momentum, number of hidden neurpons
// emax is max number of epochs for learning
// if usevalid then stop training when SSE on validation set starts to rise
// wopt is seed used to initialise random number generators used to initialise weights
// data files names are in tsr, vstr and ustr
int
// Library Module Implementing Layers of Perceptrons for CY2D7
// Dr Richard Mitchell 18/12/06 ... 17/3/08 ...12/8/09
// Adapted by
#include "mlplayer.h"
#include <math.h>
#include <iomanip>
void dcopy (int num, const double fromarray[], double toarray[]) {
/// copy num doubles from the fromarray to the toarray
% NOTES:
% * HAVE AXIS LABELS PLOTTED
% * Put all the working stuff in Appendix 2
% * Talk about Wien bridges in Discussion
\documentclass[a4paper,10pt]{memoir}
\raggedbottom
\setlength{\unitlength}{1cm}
\usepackage{url}
\usepackage{graphicx}
\usepackage{epstopdf}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>author</key>
<string>Michael Sheets, James Cleveland</string>
<key>name</key>
<string>TwilightMod</string>
<key>settings</key>
<array>
if( och == 'V' )
{
learnparas[0] = 0.2; learnparas[1] = 0.5;
numtest (learnparas, 10, 200, 1, wopt, "train.txt", "valid.txt", "unseen.txt");
learnparas[ 0 ] = 0.1; learnparas[ 1 ] = 0.6;
numtest (learnparas, 10, 200, 1, 0, "train.txt", "valid.txt", "unseen.txt");
numtest (learnparas, 10, 200, 1, 10, "train.txt", "valid.txt", "unseen.txt");
numtest (learnparas, 10, 200, 1, 25, "train.txt", "valid.txt", "unseen.txt");
numtest (learnparas, 10, 200, 1, 37, "train.txt", "valid.txt", "unseen.txt");
numtest (learnparas, 15, 200, 1, 0, "train.txt", "valid.txt", "unseen.txt");
// Simple Multi Layer program ... for CY2D7
// Has network with 2 inputs, 1 output, tested on XOR problem
// Can have linear or sigmoidal activation
// Also allows linear problem to be solved
// Dr Richard Mitchell 15/12/06 ... 17/3/08 ... 17/4/08
// Adapted by
#include <iostream>
#include <fstream>
#include "mlplayer.h"