This file contains hidden or 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 tensorflow as tf | |
| from tensorflow.python.ops.rnn_cell import RNNCell | |
| from tensorflow.python.ops import variable_scope as vs | |
| from tensorflow.python.util import nest | |
| class ResidualRNNCell(RNNCell): | |
| """RNN cell composed sequentially of multiple simple cells with residual connection.""" | |
| def __init__(self, cells, state_is_tuple=False): |
This file contains hidden or 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
| /** | |
| * bisecting <master> <input> <nNodes> <subIterations> | |
| * | |
| * divisive hierarchical clustering using bisecting k-means | |
| * assumes input is a text file, each row is a data point | |
| * given as numbers separated by spaces | |
| * | |
| */ | |
| import org.apache.spark.SparkContext |
This file contains hidden or 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
| from pyspark import SparkContext | |
| import numpy as np | |
| from sklearn.cross_validation import train_test_split, Bootstrap | |
| from sklearn.datasets import make_classification | |
| from sklearn.metrics import accuracy_score | |
| from sklearn.tree import DecisionTreeClassifier | |
| def run(sc): |
This file contains hidden or 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
| /** | |
| * bisecting <master> <input> <nNodes> <subIterations> | |
| * | |
| * divisive hierarchical clustering using bisecting k-means | |
| * assumes input is a text file, each row is a data point | |
| * given as numbers separated by spaces | |
| * | |
| */ | |
| import org.apache.spark.SparkContext |