Code Directory
 Visual Basic & VB.NET
New Code
dbForge Studio for PostgreSQL 2.3.212
HTMLPad 2020 16.2
WeBuilder 2020 16.2
Rapid CSS 2020 16.2
Rapid PHP 2020 16.2
C# HTML to PDF 2020.8.1
Vue Injector 3.3
Spectrum Analyzer pro Live 2019
Devart Excel Add-in for HubSpot 2.1
RentALLScript - Airbnb clone 2.2
SuiteCRM Theme Customization 7.11.6
iScripts NetMenus 3.1
iScripts EasyIndex 2.2
iScripts EasySnaps 2.0
Top Code
IcrediBB Bulletin Board System 1.0
Ruby FANN-Fast Artificial Neural Network 1.1.3
Java-2-Pseudo 1.0
Ticket Booking System 1.0
Simplified Fuzzy ARTMAP Neural Network 1.0
Block Matching Algorithms for Motion Estimation 1.0
dbForge Studio for PostgreSQL 2.3.212
Online Betting Exchange & Open API. 1.0
PHP reports generator 1.0
SkaDate Online Dating Software 4.0
Betting system 6.x-1.x-dev
Kalman Filter Tutorial 1.0
Gif4J Light 1.0
Solid File System OS edition 5.1
Auto Screen Capture and Word / PDFDumper 1.0
Top Rated
Uber Clone with Safety Measure Addons 2.0
Answers phpSoftPro 3.12
phpEnter 5.1.
Quick Maps For Dynamics CRM 3.1
Single Leg MLM 1.2.1
Azizi search engine script PHP 4.1.10
Paste phpSoftPro 1.4.1
Extreme Injector 3.7
Apphitect Airbnb Clone Script 1.0
Deals and Discounts Website Script 1.0.2
Solid File System OS edition 5.1
Classified Ad Lister 1.0
Aglowsoft SQL Query Tools 8.2
Invoice Manager by PHPJabbers 3.0
ICPennyBid Penny Auction Script 4.0
Fit GLM with quadratic penalty 1.0
File ID: 83750

Fit GLM with quadratic penalty 1.0
Download Fit GLM with quadratic penalty 1.0http://www.mathworks.comReport Error Link
License: Shareware
File Size: 10.0 KB
Downloads: 7
Submit Rating:
Fit GLM with quadratic penalty 1.0 Description
Description: Generalized linear models (GLMs) are a natural extension of linear regression models in which eta = X*w is related to y by a fixed nonlinearity and a possibly non-Gaussian noise source. Standard linear regression, logistic regression and Poisson regression are all special types of GLMs.

This package fits GLMs with quadratic penalties. That is, if the negative log likelihood of the data with respoect to the model parameters is given by -log(p(y|w)), then glmfitqp solves the problem:

arg min_w (-log(p(y|w)) + .5*w'*qf'w)

This form of penalty naturally arises by assuming a prior on w, p(w) = N(0,qf^-1). Quadratic penalties can be used to impose that the weights are small (qf = lambda*I) or that the weights are smooth (qf = lambda*D).

In general qf is only known up to a multiplicative constant lambda that determines the strength of the regularization and must be determined empirically. The function cvglmfitqp finds this optimal lambda through k-fold cross-validation. The cross-validation can be parallelized through parfor (requires parallel computing toolbox).

Example use:
%Figure out optimal strength of prior through cross validation
%Assume smoothness of the model parameters
qf = blkdiag(qfsmooth1D(16),.01);
rg = (-7.5:7.5)';

%Simulate a model with w = Gabor function
w = exp(-rg.^2/3^2).*sin(rg*2*pi/6);
nobs = 150;
X = [randn(nobs,length(w)),ones(nobs,1)];
r = 3*X*[w;.01];

%output is binary -> logistic regression
r = binornd(1,1./(1+exp(-r)));

%Set up 5-fold CV
folds = getcvfolds(length(r),5,1001);

%Fit the data
clear opts = 'binomlogit';
opts.lambda0 = 1;
results = cvglmfitqp(r,X,qf,folds,opts);


License: Shareware

Related: parallelized, parfor, crossvalidation, kfold, requires, Parallel, figure, Toolbox

O/S:BSD, Linux, Solaris, Mac OS X

File Size: 10.0 KB

Downloads: 7

More Similar Code

This submission facilitates working with quadratic curves (ellipse, parabola, hyperbola, etc.) and quadric surfaces (ellipsoid, elliptic paraboloid, hyperbolic paraboloid, hyperboloid, cone, elliptic cylinder, hyperbolic cylinder, parabolic cylinder, etc.) given with the general quadratic equation

Q(x) = x' * A * x + b' * x + c = 0

where a pseudo-MatLab notation has been used. A is a symmetric N-by-N matrix (N = 2 or N =...

A GUI wich use the matlab core function "fminsearch" to fit data with any multivariable function (with a "live" visualisation of the moving fitted curve). This function can be run with real equations, complex equations,

dbestfit is a complete and fast malloc-replacement that features a best-fit algoritm with special small-block treatment, to maximize memory usage. This is particularly suitable for embedded systems, but can also very well be made in *nix-like...

! Javascript Popup Windows ! is a multi-platform compatible tool that will allow you to easily create DHTML/JavaScript popups that can be personalised to fit in with your web site design.

Arbitrary-order polynomial datum is fit to and extracted from input xy data. Outliers - defined based either on a non-parametric or mutliples-of-standard deviation criteria - are optionally identified and "set aside". The interative...

This weighted nonlinear fit script fulfills the requirements of physicists, chemists and other quantative scientists, who need a fitting script for the everyday use. This script fits and creates nice plots with results and data automatically...

When WordPress 2.7 was released, I was delighted, but in the new admin panels, the comment spam status is colour coded. To me this doesn't fit with the colour scheme, it sticks out too much and I don't find the colours useful. This plugin changes...

A dynamic fundraising thermometer with PayPal integration, customisable height, currency, background colour, transparency and skins.

The background of the thermometer image (the part with the text labels on) can be customised to fit in...

PHP-Update is a php based script.It contains a number of templates which allows to upload the script and run it.It has features like Fixed graphical display in WYSIWYG editor and Fixed bug with apostrophes and quotes in site title.No php knowledge...

If you use [gallery] shortcode without setting the columns value, the default is set to 3. Some WordPress theme can either fit 3 or more column per row or less.

Imagine if you use [gallery] shortcode with default options regularly...

User Review for Fit GLM with quadratic penalty
- required fields

Please enter text on the image