Skip to content

Instantly share code, notes, and snippets.

@shalevy1
shalevy1 / SparkML_DataPrep_BinaryClassification.py
Created September 23, 2022 16:41 — forked from colbyford/SparkML_DataPrep_BinaryClassification.py
SparkML Data Preparation Steps for Binary Classification Models
########################################
## Title: Spark MLlib Classification Data Prep Script
## Language: PySpark
## Author: Colby T. Ford, Ph.D.
########################################
from pyspark.ml import Pipeline
from pyspark.ml.feature import OneHotEncoder, OneHotEncoderEstimator, StringIndexer, VectorAssembler
label = "dependentvar"
@shalevy1
shalevy1 / stanford_heart_transplant_dataset_full.csv
Created April 13, 2021 22:53 — forked from sachinsdate/stanford_heart_transplant_dataset_full.csv
The Stanford heart transplant data set is taken from https://statistics.stanford.edu/research/covariance-analysis-heart-transplant-survival-data and available for personal use/research purposes only.
PATIENT_ID YR_OF_ACCEPTANCE AGE SURVIVAL_STATUS SURVIVAL_TIME PRIOR_SURGERY TRANSPLANT_STATUS WAITING_TIME_FOR_TRANSPLANT MISMATCH_ON_ALLELES MISMATCH_ON_ANTIGEN MISMATCH_SCORE
15 68 53 1 1 0 0
43 70 43 1 2 0 0
61 71 52 1 2 0 0
75 72 52 1 2 0 0
6 68 54 1 3 0 0
42 70 36 1 3 0 0
54 71 47 1 3 0 0
38 70 41 1 5 0 1 5 3 0 0.87
85 73 47 1 5 0 0
@shalevy1
shalevy1 / .block
Created December 4, 2019 19:07 — forked from ialarmedalien/.block
ESLint on dc.js
license: mit
scrolling: yes
height: 600
border: yes
@shalevy1
shalevy1 / .block
Created December 4, 2019 19:07 — forked from nbremer/.block
Brushable Horizontal Bar Chart - IV
height: 540
@shalevy1
shalevy1 / .blocks.json
Created October 24, 2019 19:16 — forked from vasturiano/.blocks.json
3D Force-Directed Graph (ThreeJS)
{"nodes":[{"id":"4062045","user":"mbostock","description":"Force-Directed Graph"},{"id":"1341021","user":"mbostock","description":"Parallel Coordinates"},{"id":"1341281","user":"jasondavies","description":"Parallel Coordinates"},{"id":"b3ff6ae1c120eea654b5","user":"d3noob","description":"Simple d3.js Graph"},{"id":"4963004","user":"calvinmetcalf","description":"Quadtree Madness Round 2"},{"id":"4962892","user":"calvinmetcalf","description":"Quadtree Madness Round 2"},{"id":"4963273","user":"calvinmetcalf","description":"Quadtree Madness Round 2"},{"id":"4967213","user":"calvinmetcalf","description":"Rtree Madness"},{"id":"4060606","user":"mbostock","description":"Choropleth"},{"id":"4686432","user":"dwtkns","description":"Faux-3d Shaded Globe"},{"id":"3757101","user":"mbostock","description":"Lambert Azimuthal Equal-Area"},{"id":"5028304","user":"d3noob","description":"Sankey diagram with horizontal and vertical node movement"},{"id":"4343214","user":"mbostock","description":"Quadtree"},{"id":"1346410","user"
@shalevy1
shalevy1 / README.md
Created October 17, 2019 03:05 — forked from emeeks/README.md
An online tool for interactive teaching of network visualization and representation principles.

The range sliders at the top change the values for the force-directed algorithm and the buttons load new graphs and apply various techniques. This will hopefully serve as a tool for teaching network analysis and visualization principles during my Gephi courses and general Networks in the Humanities presentations.

Notice this includes a pretty straightforward way to load CSV node and edge lists as exported from Gephi.

It also includes a pathfinding algorithm built for the standard data structure of force-directed networks in D3. This requires the addition of .id attributes for the nodes, however.

Now with Clustering Coefficients!

Also, it loads images for nodes but the images are not in the gist. The code also refers to different network types but the data files on Gist only refer to the transportation network.