Skip to content

Instantly share code, notes, and snippets.

@danieldbower
danieldbower / someClasses.java
Created March 2, 2012 14:50
Serializing BindingResult Errors to JSON
package model;
import java.util.List;
import java.util.Map;
import org.codehaus.jackson.annotate.JsonAutoDetect;
import org.codehaus.jackson.annotate.JsonAutoDetect.Visibility;
import org.codehaus.jackson.annotate.JsonProperty;
import org.springframework.validation.BindingResult;
import org.springframework.validation.FieldError;
@fdomig
fdomig / ci_4_3.m
Created June 9, 2011 12:11 — forked from Wolfy42/ci_4_3.m
CI 4_3
%%%
% Feed forward with back propagation algorithm
%
% @param X ... all possible inputs
% @param Y ... all expected outputs
% @param T ... the network topology
% @param l ... the iteration limit for the error min. func.
% @returns W ... the optimal weight matrix
% @returns Ev ... the error dynamic vector
%%
@Wolfy42
Wolfy42 / ci_4_3.m
Created June 9, 2011 09:54
CI 4_3
clear all;
function y_i = ForwardProp(W, T, X)
n = length(T);
y_i = [X, zeros(1,n-length(X))];
for j= 3:n
s = 0;
for i = 1:n
if (T(i,j) == 1)
s = s + W(i,j)*y_i(i);