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
# --- synthetic data for logistic regression # | |
# Sean Chang 2014 | |
# sean.chang@duke.edu | |
# sample size | |
n = 1e4 | |
x <- rnorm(n, -1, 0.5) + rnorm(n,0.5,0.5) | |
# transfer x to [0,1] | |
x = exp(x)/(1+exp(x)) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
{ | |
"metadata": { | |
"name": "classfication.ipynb" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ | |
{ |
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
m0 =5 | |
m1 =18 | |
alpha = 0.05 | |
tau = 1.0 | |
m_arr = sort(list(set(map(lambda x: int(round(x)), np.linspace(m0, m1, 10))))) | |
print m_arr | |
for m in m_arr: | |
kmax = int(round(m/3.)) | |
prior_levels = [1./(m+1)]*(m+1) |
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
<?xml version='1.0' encoding='UTF-8' standalone='yes' ?> | |
<hierarchy rotation="0"> | |
<node index="0" text="" resource-id="" class="android.widget.FrameLayout" package="com.pinterest" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[0,0][1200,1823]"> | |
<node index="0" text="" resource-id="" class="android.widget.LinearLayout" package="com.pinterest" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[0,0][1200,1823]"> | |
<node index="0" text="" resource-id="" class="android.widget.FrameLayout" package="com.pinterest" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds=" |
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
# run foo.py with different date input in parallel | |
# input: sys.argv[1]: starting date ; sys.argv[2]): num of days | |
import sys | |
import os | |
from multiprocessing import Process | |
import pandas as pd | |
children = [] |
OlderNewer