- Experiments
- Reorder to put the most important result first
-
Verify: I don’t think BLAS GEMM version kmean will be slower than MLpack and Scikit-learn.
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
// Numa allocate | |
void numa_alloc(double* data) { | |
data = static_cast<double*>(numa_alloc_onnode(data_size, node_id)); | |
} | |
// Numa deallocate | |
void numa_dealloc(double* data, size_t data_size) { | |
numa_free(data, data_size); | |
} |
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
require(FlashR) | |
fgmat <- fm.as.matrix(replicate(100, rnorm(100))) | |
mul = function(mat, extra) fgmat %*% mat | |
res <- fm.eigen(mul, 5, nrow(fgmat)) |
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
class Graph(object): | |
adjacency_matrix = None | |
_num_vertices = None | |
_num_edges = None | |
_directed = None | |
_weighted = None | |
_dangling_nodes = None | |
def __init__(self): | |
pass |
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
class Graph(object): | |
self.adjacency_matrix = None | |
self._num_vertices = None | |
self._num_edges = None | |
self._directed = None | |
self._weighted = None | |
self._dangling_nodes = None | |
def __init__(self,): |
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
""" A class for K-Means clustering """ | |
""" | |
Adapted from Zhang Zhang zhang.zhang@intel.com | |
https://github.com/daaltces/pydaal-tutorials/blob/master/kmeans.py | |
https://github.com/daaltces/pydaal-tutorials/blob/master/kmeans_example.ipynb | |
""" | |
import daal.algorithms.kmeans as kmeans |
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
from os import environ | |
from os.path import join as jp | |
import numpy as np | |
from time import time | |
from sys import argv | |
from daal.data_management import HomogenNumericTable, BlockDescriptor_Float64, readOnly | |
from daal.data_management import ( | |
FileDataSource, DataSourceIface |
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
// gameoflife.c | |
// Name: YOUR NAME HERE | |
// JHED: YOUR JHED HERE | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <assert.h> | |
#include <string.h> | |
#include "mpi.h" |
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
# This script was wholly obtained from: https://spark-summit.org/2013/exercises/machine-learning-with-spark.html. | |
# I take no credit/blame for the implementation. | |
import os | |
import sys | |
import numpy as np | |
from pyspark import SparkContext | |
def setClassPath(): | |
oldClassPath = os.environ.get('SPARK_CLASSPATH', '') |
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
""" | |
Author: YOUR NAME HERE | |
JHED: YOUR JHED HERE | |
Name: triangle_count.py | |
Get the list of cycle triangles in the graph | |
""" | |
from pyspark import SparkContext | |
from time import time |
NewerOlder