This Gist was automatically created by Carbide, a free online programming environment.
Last active
January 13, 2017 17:23
-
-
Save alexchinco/4232ed89ffececb20d0b43b8b283e091 to your computer and use it in GitHub Desktop.
Hard Thresholding is Non-Convex, Scaled
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
var lam = 1.75; | |
var stdDev1 = Math.sqrt(3 + 0.55 * Math.sqrt(3)); | |
var sigma = 0.55/stdDev1; | |
var stdDev2 = Math.sqrt(4 + 0.70 * Math.sqrt(4)); | |
var varsigma = 0.70/stdDev2; | |
var theta = 1/(1 + sigma**2); | |
var vartheta = 1/(1 + varsigma**2); | |
var MSE0 = 1; | |
var MSE1 = (1/2)*(1-theta**2) + (1/2); | |
var MSE2 = (1/6) + (2/3)*(1-vartheta**2) + (1/6); | |
var MSE3 = (1/2) + (1/2)*(1-theta**2); | |
var MSE12 = (1/6)*(1-theta**2) + (1/3)*([1-theta] - [0.5*(2-theta)*vartheta])**2 + (1/3)*(1-vartheta**2) + (1/6); | |
var MSE13 = (1/2)*(1-theta**2) + (1/2)*(1-theta**2); | |
var MSE23 = (1/6) + (1/3)*(1-vartheta**2) + (1/3)*([1-theta] - [0.5*(2-theta)*vartheta])**2 + (1/6)*(1-theta**2); | |
var MSE123 = (1/6)*(1-theta**2) + (2/3)*([1-theta] - [0.5*(2-theta)*vartheta])**2 + (1/6)*(1-theta**2); | |
var PEN0 = 0; | |
var PEN1 = lam; | |
var PEN2 = lam; | |
var PEN3 = lam; | |
var PEN12 = 2*lam; | |
var PEN13 = 2*lam; | |
var PEN23 = 2*lam; | |
var PEN123 = 3*lam; | |
var VAL13 = MSE13 + PEN13; | |
var VAL12 = MSE12 + PEN12; | |
var VAL2 = MSE2 + PEN2; | |
var VAL1 = MSE1 + PEN1; | |
var VAL123 = MSE123 + PEN123; | |
VAL13 < VAL12; | |
VAL2 < VAL1; | |
VAL2 < VAL12; | |
VAL2 < VAL123; | |
VAL2 < 6; | |
var CORR12 = Math.sqrt(theta*vartheta/3); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment