This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.DataInput; | |
import java.io.DataOutput; | |
import java.io.IOException; | |
import org.apache.hadoop.io.Text; | |
import org.apache.hadoop.io.WritableComparable; | |
public class TextPair implements WritableComparable<TextPair>{ | |
public Text first; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Map Class | |
public static class Map extends MapReduceBase implements Mapper<LongWritable, Text, Text, Text> { | |
public void map(LongWritable key, Text value, OutputCollector<Text, Text> output, Reporter reporter) throws IOException { | |
21 | |
} | |
} | |
//Reduce Class | |
public static class Reduce extends MapReduceBase implements Reducer<Text, IntWritable, Text, IntWritable> { | |
public void reduce(Text key, Iterator<IntWritable> values, OutputCollector<Text, IntWritable> output, Reporter reporter) throws IOException { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
%% BEGIN HEADER | |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
%Name: format_tick.m | |
% | |
%Usage: [hx,hy] = ... | |
% format_tick(h,tickx,ticky,tickposx,tickposy,rotx,roty,offset,... | |
% varargin); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function [model, output] = trainCRBM(data, params, oldModel) | |
% TRAINCRBM Trains a convolutional restricted Boltzmann machine | |
% with the specified parameters. | |
% | |
% [model output] = TRAINCRBM(data, params, oldModel) | |
% | |
% data should be a structure, containing: | |
% data.x The input images / pooling states of the previous layer | |
% of CRBM. This matrix is 4-D the first three dimensions | |
% define an image (coloum-stored with a color channel), |