plateform stringclasses 1
value | repo_name stringlengths 13 113 | name stringlengths 3 74 | ext stringclasses 1
value | path stringlengths 12 229 | size int64 23 843k | source_encoding stringclasses 9
values | md5 stringlengths 32 32 | text stringlengths 23 843k |
|---|---|---|---|---|---|---|---|---|
github | atrodack/AOSim2-master | z_m.m | .m | AOSim2-master/AOSim2/utils/z_m.m | 465 | utf_8 | 35e15ee1c7a56f76897f85df9c403d29 | % function m = z_m(n, k)
%
% z_m: Zernike function number m
%
% n - Zernike order number
% k - Zernike function of order m
%
% returns: function number M of Zernike basis function with
% order N and function number K
%
% Norman Mark Milton August 25, 2005
%
function m = z_m(n, k)
if... |
github | atrodack/AOSim2-master | SFneedles.m | .m | AOSim2-master/AOSim2/utils/SFneedles.m | 2,922 | utf_8 | db285f5a9ba62c1134bf552eff42deea | function [spacings,Dphi,rmsDphi] = SFneedles(WAVEFRONT,APER,NPOINTS)
% function [spacings,Dphi,rmsDphi] = SFneedles(WAVEFRONT,Aperture,[NPOINTS])
% This method estimates the structure function by dropping random points
% within a pupil and then computing statistics on the phase value
% differences.
%
% PHI is an AOAT... |
github | atrodack/AOSim2-master | dh_num.m | .m | AOSim2-master/AOSim2/utils/dh_num.m | 735 | utf_8 | 7214069375c2e61e7e31f44410a4f18d | % function [n, k, dhn, dhm] = dh_num(i)
%
% dh_num: disk harmonic function numbers
%
% i - disk harmonic function index number
%
% returns: function numbers disk harmonic basis function with
% index i
% optionally return DH indices (dhn, dhm)
%
% Norman Mark Milton August 2... |
github | atrodack/AOSim2-master | SFneedlesSegments.m | .m | AOSim2-master/AOSim2/utils/SFneedlesSegments.m | 2,544 | utf_8 | 5c4fd5475a6bce38d2167666cc64ed5f | function [spacings,Dphi,rmsDphi] = SFneedlesSegments(PHI,PUPILS,dx,PISTONS,NPOINTS)
% function [spacings,Dphi,rmsDphi] = SFneedlesSegments(PHI,PUPILS,dx,PISTONS,NPOINTS)
%
% PUPILS(:,:,npupils)
% PISTONS(npupils): values to test by adding.
%
% JLC 20060118.
if(nargin<5)
NPOINTS = 1000;
end
Npupils = size(PUPILS,3);... |
github | atrodack/AOSim2-master | dh_dhfast.m | .m | AOSim2-master/AOSim2/utils/dh_dhfast.m | 670 | utf_8 | 2830c25630e49b0763bbbb6005934906 | % function d = dh_dhfast(dhm, l, a, r, theta)
%
% dh_dhfast: disk harmonic function evaluation (fast)
%
% dhm - Bessel order number
% l - disk harmonic spatial frequency
% a - disk harmonic normalization constant
% r - radial coordinate
% theta - azimuthal angle coordinate
%
% returns: value of disk harmo... |
github | atrodack/AOSim2-master | dh_elem.m | .m | AOSim2-master/AOSim2/utils/dh_elem.m | 381 | utf_8 | 930deda5d3b90548b8e848ad6cd961e8 | % function n = dh_elem(o)
%
% dh_elem: disk harmonic elements
%
% o - disk harmonic order number
%
% returns: number of disk harmonic basis functions from
% order 0 through order o
%
% Norman Mark Milton August 25, 2005
%
function n = dh_elem(o)
if o < 0,
error('dh_elem: invalid... |
github | atrodack/AOSim2-master | coords.m | .m | AOSim2-master/AOSim2/@AOGrid/coords.m | 1,922 | utf_8 | 20719f49d3b2c3fdba050e73a04fe401 | function [X,Y] = coords(AOG,local)
% COORDS: Returns a set of vectors representing the coordinates of the
% pixels in the grid.
%
% NOTE: The result is the coordinates in the current domain. That is, if
% the domain is 'x', the result is x and y coordinate vectors. If the
% domain is 'k', the result is kx and ky coo... |
github | atrodack/AOSim2-master | fits_delete_keyword.m | .m | AOSim2-master/mfitsio/fits_delete_keyword.m | 1,590 | utf_8 | ac2e7f118c18ae7fc6a6895ddf54b01f | % Function Name:
% fits_delete_keyword
%
% Description: Deletes a keyword from the header of a FITS file.
%
% Usage:
% fits_delete_keyword(FILENAME, KEYWORD);
%
% Arguments:
% FILENAME: A character array representing the filename.
% KEYWORD: The keyword to delete.
%
% Returns:
% Nothing.
%
% Type 'mfitsi... |
github | atrodack/AOSim2-master | fits_read.m | .m | AOSim2-master/mfitsio/fits_read.m | 1,722 | utf_8 | 39842865af4a0b80f29f0ef121728bd1 | % Function Name:
% fits_read
%
% Description: Reads a FITS file and stores all header information in
% a structure array.
%
% Usage:
% [HEADER, IMAGE] = fits_read(FILENAME);
%
% Arguments:
% FILENAME: A character array representing the filename.
%
% Returns:
% HEADER: The fits header as a structure array.... |
github | atrodack/AOSim2-master | fits_read_image.m | .m | AOSim2-master/mfitsio/fits_read_image.m | 1,554 | utf_8 | 5800313d39548af797d4875f5341f75c | % Function Name:
% fits_read_image
%
% Description: Reads an image from a FITS file.
%
% Usage:
% [IMAGE] = fits_read_image(FILENAME);
%
% Arguments:
% FILENAME: A character array representing the filename.
%
% Returns:
% IMAGE: The image as a MATLAB array.
%
% Type 'mfitsio_license' to display the MFITS... |
github | atrodack/AOSim2-master | fits_write.m | .m | AOSim2-master/mfitsio/fits_write.m | 1,790 | utf_8 | fca2466b881fcb02b88405a551f5395e | % Function Name:
% fits_write
%
% Description: Writes an image and header to a FITS file. 'BITPIX', 'NAXIS',
% and 'SIMPLE' keywords are ignored. This information is automatically
% calculated based on the dimensions and the data type of the input image.
%
% Usage:
% fits_write(FILENAME, HEADER, IMAGE);
%
% Argum... |
github | atrodack/AOSim2-master | fits_read_image_subset.m | .m | AOSim2-master/mfitsio/fits_read_image_subset.m | 1,607 | utf_8 | 7d4e6be2147b45d1e73f689b30f2ff68 | % Function Name:
% fits_read_image_subset
%
% Description: Reads a region of an image from a FITS file. This function
% is particularly useful for programs which must process
% large images.
%
% Usage:
% [IMAGE] = fits_read_image_subset(FILENAME, START, END);
%
% Arguments:
% FILENAME... |
github | atrodack/AOSim2-master | fits_write_image.m | .m | AOSim2-master/mfitsio/fits_write_image.m | 1,664 | utf_8 | ddfef0ddcc3c9aee1a0ee9ad6f2d3bd8 | % Function Name:
% fits_write_image
%
% Description: Writes an image and a header to a FITS file.
%
% Usage:
% fits_write_image(FILENAME, IMAGE);
% fits_write_image(FILENAME, IMAGE, HEADER);
%
% Arguments:
% FILENAME: A character array representing the filename.
% IMAGE: An image array representing the f... |
github | atrodack/AOSim2-master | mfitsio_license.m | .m | AOSim2-master/mfitsio/mfitsio_license.m | 1,230 | utf_8 | 7920b3104784ebffa795f28fcca35eec | % MFITSIO Version 1.2.4 by Damian Ryan Eads
% Copyright (C) The Regents of University of California, 2002-2005.
%
% This software and ancillary information (herein called ``Software'')
% called MFITSIO is made available under the terms described here. The
% SOFTWARE has been approved for release with associated LA-CC n... |
github | atrodack/AOSim2-master | fits_read_header.m | .m | AOSim2-master/mfitsio/fits_read_header.m | 1,610 | utf_8 | d85fa373f6aa739c45438190757bce0e | % Function Name:
% fits_read_header
%
% Description: Reads a FITS file and stores all header information in
% a structure array.
%
% Usage:
% HEADER = fits_read_header(FILENAME);
%
% Arguments:
% FILENAME: A character array representing the filename.
%
% Returns:
% HEADER: The fits header as a structure a... |
github | atrodack/AOSim2-master | fits_write_header.m | .m | AOSim2-master/mfitsio/fits_write_header.m | 1,771 | utf_8 | 916eff93766fbf403c4e4c29c4db2a9f | % Function Name:
% fits_write_header
%
% Description: Write a header to a FITS file. Any 'BITPIX', 'NAXIS', or
% 'SIMPLE' field is ignored. The function does not rewrite the entire header.
% Instead, it only rewrites fields present in the HEADER structure.
%
% Usage:
% fits_write_header(FILENAME, HEADER);
%
% Arg... |
github | atrodack/AOSim2-master | fits_write_image_subset.m | .m | AOSim2-master/mfitsio/fits_write_image_subset.m | 1,683 | utf_8 | 425770bfed2cdb7a608e1cba78dfd869 | % Function Name:
% fits_write_image_subset
%
% Description: Writes an image to a region of a FITS file image.
%
% Usage:
% [IMAGE] = fits_write_image_subset(FILENAME, IMG, START);
% [IMAGE] = fits_write_image_subset(FILENAME, IMG, START, HEADER);
%
% Arguments:
% FILENAME: A character array representing the... |
github | Hamza5/Plateforme-outils-SII-master | cond_indep_fisher_z.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/KPMstats/cond_indep_fisher_z.m | 3,655 | utf_8 | 91a631e2222244ede4df8e595f16adee | function [CI, r, p] = cond_indep_fisher_z(X, Y, S, C, N, alpha)
% COND_INDEP_FISHER_Z Test if X indep Y given Z using Fisher's Z test
% CI = cond_indep_fisher_z(X, Y, S, C, N, alpha)
%
% C is the covariance (or correlation) matrix
% N is the sample size
% alpha is the significance level (default: 0.05)
%
% See p133 of ... |
github | Hamza5/Plateforme-outils-SII-master | logistK.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/KPMstats/logistK.m | 7,253 | utf_8 | 9539c8105ebca14d632373f5f9f4b70d | function [beta,post,lli] = logistK(x,y,w,beta)
% [beta,post,lli] = logistK(x,y,beta,w)
%
% k-class logistic regression with optional sample weights
%
% k = number of classes
% n = number of samples
% d = dimensionality of samples
%
% INPUT
% x dxn matrix of n input column vectors
% y kxn vector of class assignment... |
github | Hamza5/Plateforme-outils-SII-master | multipdf.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/KPMstats/multipdf.m | 1,192 | utf_8 | 1fce56db4c9a59d35960bd25df11b1f9 | function p = multipdf(x,theta)
%MULTIPDF Multinomial probability density function.
% p = multipdf(x,theta) returns the probabilities of
% vector x, under the multinomial distribution
% with parameter vector theta.
%
% Author: David Ross
%--------------------------------------------------------
% Check the arg... |
github | Hamza5/Plateforme-outils-SII-master | metrop.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/netlab3.3/metrop.m | 5,284 | utf_8 | df084b9ad36314e304a99b9b1f3c955e | function [samples, energies, diagn] = metrop(f, x, options, gradf, varargin)
%METROP Markov Chain Monte Carlo sampling with Metropolis algorithm.
%
% Description
% SAMPLES = METROP(F, X, OPTIONS) uses the Metropolis algorithm to
% sample from the distribution P ~ EXP(-F), where F is the first
% argument to METROP. T... |
github | Hamza5/Plateforme-outils-SII-master | hmc.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/netlab3.3/hmc.m | 7,683 | utf_8 | 64c15e958297afe69787b8617dc1a56a | function [samples, energies, diagn] = hmc(f, x, options, gradf, varargin)
%HMC Hybrid Monte Carlo sampling.
%
% Description
% SAMPLES = HMC(F, X, OPTIONS, GRADF) uses a hybrid Monte Carlo
% algorithm to sample from the distribution P ~ EXP(-F), where F is the
% first argument to HMC. The Markov chain starts at the poi... |
github | Hamza5/Plateforme-outils-SII-master | gtminit.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/netlab3.3/gtminit.m | 5,204 | utf_8 | ab76f6114a7e85375ade5e5889d5f6a7 | function net = gtminit(net, options, data, samp_type, varargin)
%GTMINIT Initialise the weights and latent sample in a GTM.
%
% Description
% NET = GTMINIT(NET, OPTIONS, DATA, SAMPTYPE) takes a GTM NET and
% generates a sample of latent data points and sets the centres (and
% widths if appropriate) of NET.RBFNET.
%
% I... |
github | Hamza5/Plateforme-outils-SII-master | mlphess.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/netlab3.3/mlphess.m | 1,633 | utf_8 | b91a15ca11b4886de6c1671c33a735d3 | function [h, hdata] = mlphess(net, x, t, hdata)
%MLPHESS Evaluate the Hessian matrix for a multi-layer perceptron network.
%
% Description
% H = MLPHESS(NET, X, T) takes an MLP network data structure NET, a
% matrix X of input values, and a matrix T of target values and returns
% the full Hessian matrix H corresponding... |
github | Hamza5/Plateforme-outils-SII-master | glmhess.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/netlab3.3/glmhess.m | 4,024 | utf_8 | 2d706b82d25cb35ff9467fe8837ef26f | function [h, hdata] = glmhess(net, x, t, hdata)
%GLMHESS Evaluate the Hessian matrix for a generalised linear model.
%
% Description
% H = GLMHESS(NET, X, T) takes a GLM network data structure NET, a
% matrix X of input values, and a matrix T of target values and returns
% the full Hessian matrix H corresponding to t... |
github | Hamza5/Plateforme-outils-SII-master | rbfhess.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/netlab3.3/rbfhess.m | 3,138 | utf_8 | 0a6ef29c8be32e9991cacfe42bdfa0b3 | function [h, hdata] = rbfhess(net, x, t, hdata)
%RBFHESS Evaluate the Hessian matrix for RBF network.
%
% Description
% H = RBFHESS(NET, X, T) takes an RBF network data structure NET, a
% matrix X of input values, and a matrix T of target values and returns
% the full Hessian matrix H corresponding to the second deriva... |
github | Hamza5/Plateforme-outils-SII-master | enter_soft_ev.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/BNT/inference/dynamic/@pearl_dbn_inf_engine/enter_soft_ev.m | 3,241 | utf_8 | f4daf601e5060f23a786094402246c5f | function [marginal, msg, loglik] = enter_soft_ev(engine, evidence)
% [marginal, msg, loglik] = smooth_evidence(engine, evidence) (pearl_dbn)
[ss T] = size(evidence);
bnet = bnet_from_engine(engine);
bnet2 = dbn_to_bnet(bnet, T);
ns = bnet2.node_sizes;
hnodes = mysetdiff(1:ss, engine.onodes);
hnodes = hnodes(:)';
ono... |
github | Hamza5/Plateforme-outils-SII-master | wrong_smooth.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/BNT/inference/dynamic/@pearl_dbn_inf_engine/Old/wrong_smooth.m | 5,298 | utf_8 | 4087ce7d622e16d402ab14e6cf772493 | function [marginal, msg, loglik] = smooth_evidence(engine, evidence)
% [marginal, msg, loglik] = smooth_evidence(engine, evidence) (pearl_dbn)
disp('warning: pearl_dbn smoothing is broken');
[ss T] = size(evidence);
bnet = bnet_from_engine(engine);
bnet2 = dbn_to_bnet(bnet, T);
ns = bnet2.node_sizes;
hnodes = mysetdi... |
github | Hamza5/Plateforme-outils-SII-master | filter_evidence_obj_oriented.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/BNT/inference/dynamic/@pearl_dbn_inf_engine/Old/filter_evidence_obj_oriented.m | 3,845 | utf_8 | 400f00643cda655c4d77e7b16e51df10 | function [marginal, msg, loglik] = filter_evidence_old(engine, evidence)
% [marginal, msg, loglik] = filter_evidence(engine, evidence) (pearl_dbn)
[ss T] = size(evidence);
bnet = bnet_from_engine(engine);
bnet2 = dbn_to_bnet(bnet, T);
ns = bnet2.node_sizes;
hnodes = mysetdiff(1:ss, engine.onodes);
hnodes = hnodes(:)';... |
github | Hamza5/Plateforme-outils-SII-master | enter_evidence.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/BNT/inference/dynamic/@pearl_dbn_inf_engine/Old/enter_evidence.m | 2,959 | utf_8 | 8720ec914481d209e331eb543bebd5fa | function [engine, loglik] = enter_evidence(engine, evidence, filter)
% ENTER_EVIDENCE Add the specified evidence to the network (pearl_dbn)
% [engine, loglik] = enter_evidence(engine, evidence, filter)
%
% evidence{i,t} = [] if if X(i,t) is hidden, and otherwise contains its observed value (scalar or column vector)
% I... |
github | Hamza5/Plateforme-outils-SII-master | correct_smooth.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/BNT/inference/dynamic/@pearl_dbn_inf_engine/Old/correct_smooth.m | 6,136 | utf_8 | 7cc7cfc2e046387e9365eaa2939c0ced | function [marginal, msg, loglik] = smooth_evidence(engine, evidence)
% [marginal, msg, loglik] = smooth_evidence(engine, evidence) (pearl_dbn)
disp('warning: broken');
[ss T] = size(evidence);
bnet = bnet_from_engine(engine);
bnet2 = dbn_to_bnet(bnet, T);
ns = bnet2.node_sizes;
hnodes = mysetdiff(1:ss, engine.onodes)... |
github | Hamza5/Plateforme-outils-SII-master | cbk_inf_engine.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/BNT/inference/dynamic/@cbk_inf_engine/cbk_inf_engine.m | 4,843 | utf_8 | de028c586a54ed840d1c866fa4b602e1 | function engine = cbk_inf_engine(bnet, varargin)
% Just the same as bk_inf_engine, but you can specify overlapping clusters.
ss = length(bnet.intra);
% set default params
clusters = 'exact';
if nargin >= 2
args = varargin;
nargs = length(args);
for i=1:2:nargs
switch args{i},
case 'clusters', clusters... |
github | Hamza5/Plateforme-outils-SII-master | enter_soft_evidence_trans.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/BNT/inference/dynamic/@jtree_dbn_inf_engine/Old/enter_soft_evidence_trans.m | 4,614 | utf_8 | 7986e7f8b6320c891027079064e798c0 | function [clpot, loglik] = enter_soft_evidence(engine, CPDpot, observed, pot_type)
% ENTER_SOFT_EVIDENCE Add the specified soft evidence to the network (jtree_dbn)
% [clpot, loglik] = enter_soft_evidence(engine, CPDpot, observed, pot_type, filter)
[ss T] = size(CPDpot);
Q = length(engine.jtree_struct.cliques);
clpot =... |
github | Hamza5/Plateforme-outils-SII-master | enter_soft_evidence_nonint.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/BNT/inference/dynamic/@jtree_dbn_inf_engine/Old/enter_soft_evidence_nonint.m | 4,607 | utf_8 | 01e6d2c9ea221c018a8f101e2aa5d19a | function [clpot, loglik] = enter_soft_evidence(engine, CPDpot, observed, pot_type)
% ENTER_SOFT_EVIDENCE Add the specified soft evidence to the network (jtree_dbn)
% [clpot, loglik] = enter_soft_evidence(engine, CPDpot, observed, pot_type, filter)
[ss T] = size(CPDpot);
Q = length(engine.jtree_struct.cliques);
clpot =... |
github | Hamza5/Plateforme-outils-SII-master | enter_soft_evidence2.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/BNT/inference/dynamic/@jtree_dbn_inf_engine/Broken/enter_soft_evidence2.m | 5,080 | utf_8 | 69367ac9bcd0098af7e96b6ef066f88f | function [clpot, loglik] = enter_soft_evidence(engine, CPDpot, observed, pot_type)
% ENTER_SOFT_EVIDENCE Add the specified soft evidence to the network (jtree_dbn)
% [clpot, loglik] = enter_soft_evidence(engine, CPDpot, observed, pot_type, filter)
[ss T] = size(CPDpot);
Q = length(engine.jtree_struct.cliques);
clpot =... |
github | Hamza5/Plateforme-outils-SII-master | enter_soft_evidence4.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/BNT/inference/dynamic/@jtree_dbn_inf_engine/Broken/enter_soft_evidence4.m | 5,315 | utf_8 | f27c5a5ca9ac7f75753260159d8c10ee | function [clpot, loglik] = enter_soft_evidence(engine, CPDpot, observed, pot_type)
% ENTER_SOFT_EVIDENCE Add the specified soft evidence to the network (jtree_dbn)
% [clpot, loglik] = enter_soft_evidence(engine, CPDpot, observed, pot_type, filter)
[ss T] = size(CPDpot);
Q = length(engine.jtree_struct.cliques);
clpot =... |
github | Hamza5/Plateforme-outils-SII-master | enter_soft_evidence3.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/BNT/inference/dynamic/@jtree_dbn_inf_engine/Broken/enter_soft_evidence3.m | 4,158 | utf_8 | 1d1ac9c5acdaec3cd05435afc8850cb2 | function [clpot, loglik] = enter_soft_evidence(engine, CPDpot, observed, pot_type)
% ENTER_SOFT_EVIDENCE Add the specified soft evidence to the network (jtree_dbn)
% [clpot, loglik] = enter_soft_evidence(engine, CPDpot, observed, pot_type, filter)
[ss T] = size(CPDpot);
Q = length(engine.jtree_struct.cliques);
clpot =... |
github | Hamza5/Plateforme-outils-SII-master | enter_soft_evidence1.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/BNT/inference/dynamic/@jtree_dbn_inf_engine/Broken/enter_soft_evidence1.m | 3,926 | utf_8 | 4db7d51f083a4873490360d1c1de35a2 | function [clpot, loglik] = enter_soft_evidence(engine, CPDpot, observed, pot_type)
% ENTER_SOFT_EVIDENCE Add the specified soft evidence to the network (jtree_dbn)
% [clpot, loglik] = enter_soft_evidence(engine, CPDpot, observed, pot_type, filter)
[ss T] = size(CPDpot);
Q = length(engine.jtree_struct.cliques);
clpot =... |
github | Hamza5/Plateforme-outils-SII-master | enter_soft_evidence.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/BNT/inference/dynamic/@frontier_inf_engine/enter_soft_evidence.m | 4,301 | utf_8 | 366aab9bf184fa3ce870076c3f22d31e | function [fwdback, loglik, fwd_frontier, back_frontier] = enter_soft_evidence(engine, CPD, onodes, pot_type, filter)
% ENTER_SOFT_EVIDENCE Add soft evidence to network (frontier)
% [fwdback, loglik] = enter_soft_evidence(engine, CPDpot, onodes, filter)
if nargin < 3, filter = 0; end
[ss T] = size(CPD);
bnet = bnet_fr... |
github | Hamza5/Plateforme-outils-SII-master | frontier_inf_engine.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/BNT/inference/dynamic/@frontier_inf_engine/frontier_inf_engine.m | 4,085 | utf_8 | fb3dba5cc9b17172a85cc10e69d2774b | function engine = frontier_inf_engine(bnet)
% FRONTIER_INF_ENGINE Inference engine for DBNs which which uses the frontier algorithm.
% engine = frontier_inf_engine(bnet)
%
% The frontier algorithm extends the forwards-backwards algorithm to DBNs in the obvious way,
% maintaining a joint distribution (frontier) over all... |
github | Hamza5/Plateforme-outils-SII-master | dbn_to_hmm.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/BNT/inference/dynamic/@bk_ff_hmm_inf_engine/private/dbn_to_hmm.m | 1,318 | utf_8 | 8277037b0d46e82292e9db61fbe50176 | function [prior, transmat] = dbn_to_hmm(bnet)
% DBN_TO_HMM Compute the discrete HMM matrices from a simple DBN
% [prior, transmat] = dbn_to_hmm(bnet)
onodes = bnet.observed;
ss = length(bnet.intra);
evidence = cell(1,2*ss);
hnodes = mysetdiff(1:ss, onodes);
prior = multiply_CPTs(bnet, [], hnodes, evidence);
transmat =... |
github | Hamza5/Plateforme-outils-SII-master | pearl_inf_engine.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/BNT/inference/static/@pearl_inf_engine/pearl_inf_engine.m | 5,265 | utf_8 | 56085cfb4f413e670450edd32158d4a6 | function engine = pearl_inf_engine(bnet, varargin)
% PEARL_INF_ENGINE Pearl's algorithm (belief propagation)
% engine = pearl_inf_engine(bnet, ...)
%
% If the graph has no loops (undirected cycles), you should use the tree protocol,
% and the results will be exact.
% Otherwise, you should use the parallel protocol, and... |
github | Hamza5/Plateforme-outils-SII-master | enter_evidence.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/BNT/inference/static/@pearl_inf_engine/enter_evidence.m | 3,886 | utf_8 | 293aff2bac4c8b841325c62a9d9123f4 | function [engine, loglik, niter] = enter_evidence(engine, evidence, varargin)
% ENTER_EVIDENCE Add the specified evidence to the network (pearl)
% [engine, loglik, num_iter] = enter_evidence(engine, evidence, ...)
% evidence{i} = [] if if X(i) is hidden, and otherwise contains its observed value (scalar or column vecto... |
github | Hamza5/Plateforme-outils-SII-master | tree_protocol.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/BNT/inference/static/@pearl_inf_engine/private/tree_protocol.m | 2,170 | utf_8 | 4ce3a950d12d4cdc2731cfb55375e682 | function msg = tree_protocol(engine, evidence, msg)
bnet = bnet_from_engine(engine);
N = length(bnet.dag);
% Send messages from leaves to root
for i=1:N-1
n = engine.postorder(i);
above = parents(engine.adj_mat, n);
msg = send_msgs_to_some_neighbors(n, msg, above, bnet, engine.child_index, engine.parent_index, ... |
github | Hamza5/Plateforme-outils-SII-master | parallel_protocol.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/BNT/inference/static/@pearl_inf_engine/private/parallel_protocol.m | 3,274 | utf_8 | 92e10905cec8855be1d39aa13a237f85 | function [msg, niter] = parallel_protocol(engine, evidence, msg)
bnet = bnet_from_engine(engine);
N = length(bnet.dag);
ns = bnet.node_sizes(:);
if ~isempty(engine.filename)
fid = fopen(engine.filename, 'w');
if fid == 0
error(['could not open ' engine.filename ' for writing'])
end
else
fid = [];
end
con... |
github | Hamza5/Plateforme-outils-SII-master | enter_evidence.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/BNT/inference/static/@stab_cond_gauss_inf_engine/enter_evidence.m | 8,076 | utf_8 | f4893e4009b07ff10dba9070334e046d | function [engine, loglik] = enter_evidence(engine, evidence, varargin)
% ENTER_EVIDENCE enter evidence to engine including discrete and continuous evidence
% [engine, ll] = enter_evidence(engine, evidence)
%
% ll is always 0, which is wrong.
if ~isempty(engine.evidence)
bnet = bnet_from_engine(engine);
engine ... |
github | Hamza5/Plateforme-outils-SII-master | stab_cond_gauss_inf_engine.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/BNT/inference/static/@stab_cond_gauss_inf_engine/stab_cond_gauss_inf_engine.m | 5,469 | utf_8 | 7a036b455eaff22eba094402831eb64d | function engine = stab_cond_gauss_inf_engine(bnet)
% STAB_COND_GAUSS_INF_ENGINE Junction tree using stable CG potentials
% engine = cond_gauss_inf_engine(bnet)
%
% This class was written by Shan Huang (shan.huang@intel.com) 2001
% and fixed by Rainer Deventer deventer@informatik.uni-erlangen.de March 2003
N = length(b... |
github | Hamza5/Plateforme-outils-SII-master | marginal_difclq_nodes.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/BNT/inference/static/@stab_cond_gauss_inf_engine/marginal_difclq_nodes.m | 1,851 | utf_8 | 8ad6798b7ac768dc27d85a6e642d3d72 | function marginal = marginal_difclq_nodes(engine, query_nodes)
% MARGINAL_DIFCLQ_NODES get the marginal distribution of nodes which is not in a single clique
% marginal = marginal_difclq_nodes(engine, query_nodes)
keyboard
num_clique = length(engine.cliques);
B = engine.cliques_bitv;
clqs_containnodes = [];
for i=1:le... |
github | Hamza5/Plateforme-outils-SII-master | marginal_nodes.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/BNT/inference/static/@likelihood_weighting_inf_engine/marginal_nodes.m | 1,572 | utf_8 | 621bc58d92416d8267e0c46c7aa5064b | function marginal = marginal_nodes(engine, nodes)
% MARGINAL_NODES Compute the marginal on the specified query nodes (likelihood_weighting)
% marginal = marginal_nodes(engine, nodes)
bnet = bnet_from_engine(engine);
ddom = myintersect(nodes, bnet.dnodes);
cdom = myintersect(nodes, bnet.cnodes);
nsamples = size(engine.... |
github | Hamza5/Plateforme-outils-SII-master | jtree_inf_engine.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/BNT/inference/static/@jtree_inf_engine/jtree_inf_engine.m | 4,313 | utf_8 | 6715ae9db2cd68ebb4047f09473ce616 | function engine = jtree_inf_engine(bnet, varargin)
% JTREE_INF_ENGINE Junction tree inference engine
% engine = jtree_inf_engine(bnet, ...)
%
% The following optional arguments can be specified in the form of name/value pairs:
% [default value in brackets]
%
% clusters - a cell array of sets of nodes we want to ensure... |
github | Hamza5/Plateforme-outils-SII-master | jtree_sparse_inf_engine.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/BNT/inference/static/@jtree_sparse_inf_engine/jtree_sparse_inf_engine.m | 4,120 | utf_8 | 7bdc66e6ea81927626ff56e811cfaace | function engine = jtree_sparse_inf_engine(bnet, varargin)
% JTREE_SPARSE_INF_ENGINE Junction tree inference engine when CPTs and Potentials are sparse
% engine = jtree_sparse_inf_engine(bnet, ...)
% It differs from jtree_inf_engine with all CPTs and potentials are 1D sparse arrays.
%
% The following optional arguments ... |
github | Hamza5/Plateforme-outils-SII-master | marginal_family.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/BNT/inference/static/@jtree_limid_inf_engine/marginal_family.m | 1,542 | utf_8 | 64d6c199cfd4410b4b4e4f52efdb3fbb | function [m, pot] = marginal_family(engine, query)
% MARGINAL_NODES Compute the marginal on the family of the specified node (jtree_limid)
% [m, pot] = marginal_family(engine, query)
%
% query should be a single decision node
bnet = bnet_from_engine(engine);
d = query;
assert(myismember(d, bnet.decision_nodes));
fam =... |
github | Hamza5/Plateforme-outils-SII-master | marginal_family.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/BNT/inference/static/@jtree_limid_inf_engine/Old/marginal_family.m | 1,782 | utf_8 | 0f3c9069c8fdb6812e3e2f86794eed3e | function [m, pot] = marginal_family(engine, query)
% MARGINAL_NODES Compute the marginal on the family of the specified node (jtree_limid)
% [m, pot] = marginal_family(engine, query)
%
% query should be a single decision node, or [] (to compute global max expected utility)
bnet = bnet_from_engine(engine);
if isempty(q... |
github | Hamza5/Plateforme-outils-SII-master | belprop_inf_engine.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/BNT/inference/static/@belprop_inf_engine/belprop_inf_engine.m | 2,706 | utf_8 | 670b1b74e425bf1d593f4b8979d76e7e | function engine = belprop_inf_engine(bnet, varargin)
% BELPROP_INF_ENGINE Make a loopy belief propagation inference engine
% engine = belprop_inf_engine(bnet, ...)
%
% This is like pearl_inf_engine, except it uses potential objects,
% instead of lambda/pi structs. Hence it is slower.
%
% The following optional argumen... |
github | Hamza5/Plateforme-outils-SII-master | belprop_gdl_inf_engine.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/BNT/inference/static/@belprop_inf_engine/Old/belprop_gdl_inf_engine.m | 2,039 | utf_8 | c5b2c938f8adc9ac28951067d6ba99ed | function engine = belprop_gdl_inf_engine(gdl, varargin)
% BELPROP_GDL_INF_ENGINE Make a belief propagation inference engine for a GDL graph
% engine = belprop_gdl_inf_engine(gdl_graph, ...)
%
% If the GDL graph is a tree, this will give exact results.
%
% The following optional arguments can be specified in the form o... |
github | Hamza5/Plateforme-outils-SII-master | jtree_mnet_inf_engine.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/BNT/inference/static/@jtree_mnet_inf_engine/jtree_mnet_inf_engine.m | 3,019 | utf_8 | 46c577db38f7d5f5fd1b43e8ecfe3d8a | function engine = jtree_mnet_inf_engine(model, varargin)
% JTREE_MNET_INF_ENGINE Junction tree inference engine for Markov nets
% engine = jtree_inf_engine(mnet, ...)
%
% set default params
N = length(mnet.graph);
root = N;
engine = init_fields;
engine = class(engine, 'jtree_mnet_inf_engine', inf_engine(bnet));
onod... |
github | Hamza5/Plateforme-outils-SII-master | find_mpe.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/BNT/inference/static/@var_elim_inf_engine/find_mpe.m | 4,403 | utf_8 | daacf22bb6b08a0131035ca0eb737780 | function mpe = find_mpe(engine, new_evidence, max_over)
% FIND_MPE Find the most probable explanation of the data (assignment to the hidden nodes)
% function mpe = find_mpe(engine, evidence, order)
%
% PURPOSE:
% CALC_MPE Computes the most probable explanation to the network nodes
% given the evidence.
% ... |
github | Hamza5/Plateforme-outils-SII-master | marginal_nodes.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/BNT/inference/static/@var_elim_inf_engine/marginal_nodes.m | 2,130 | utf_8 | 7ff7d3df7ee59223eaacc254a750cfb5 | function [marginal, loglik] = marginal_nodes(engine, query, add_ev)
% MARGINAL_NODES Compute the marginal on the specified query nodes (var_elim)
% [marginal, loglik] = marginal_nodes(engine, query)
if nargin < 3, add_ev = 0; end
assert(length(query)>=1);
evidence = engine.evidence;
bnet = bnet_from_engine(engine);... |
github | Hamza5/Plateforme-outils-SII-master | enter_evidence.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/BNT/inference/static/@gaussian_inf_engine/enter_evidence.m | 1,302 | utf_8 | a5db2f5e198974b28f50fe79543e9100 | function [engine, loglik] = enter_evidence(engine, evidence, varargin)
% ENTER_EVIDENCE Add the specified evidence to the network (gaussian_inf_engine)
% [engine, loglik] = enter_evidence(engine, evidence, ...)
%
% evidence{i} = [] if if X(i) is hidden, and otherwise contains its observed value (scalar or column vector... |
github | Hamza5/Plateforme-outils-SII-master | belprop_fg_inf_engine.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/BNT/inference/static/@belprop_fg_inf_engine/belprop_fg_inf_engine.m | 1,358 | utf_8 | fe73bb979eda7fb25628f8e0eb32ea77 | function engine = belprop_fg_inf_engine(fg, varargin)
% BELPROP_FG_INF_ENGINE Make a belief propagation inference engine for factor graphs
% engine = belprop_fg_inf_engine(factor_graph, ...)
%
% The following optional arguments can be specified in the form of name/value pairs:
% [default in brackets]
% e.g., engine = ... |
github | Hamza5/Plateforme-outils-SII-master | boolean_CPD.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/BNT/CPDs/@boolean_CPD/boolean_CPD.m | 4,856 | utf_8 | c29fa8d4c5983d4a1de00a334c27aa41 | function CPD = boolean_CPD(bnet, self, ftype, fname, pfail)
% BOOLEAN_CPD Make a tabular CPD representing a (noisy) boolean function
%
% CPD = boolean_cpd(bnet, self, 'inline', f) uses the inline function f
% to specify the CPT.
% e.g., suppose X4 = X2 AND (NOT X3). Then we can write
% bnet.CPD{4} = boolean_CPD(bnet... |
github | Hamza5/Plateforme-outils-SII-master | learn_params.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/BNT/CPDs/@tree_CPD/learn_params.m | 28,952 | utf_8 | de4aaa36a3672022ff563b6bca2c7587 | function CPD = learn_params(CPD, fam, data, ns, cnodes, varargin)
% LEARN_PARAMS Construct classification/regression tree given complete data
% CPD = learn_params(CPD, fam, data, ns, cnodes)
%
% fam(i) is the node id of the i-th node in the family of nodes, self node is the last one
% data(i,m) is the value of node i i... |
github | Hamza5/Plateforme-outils-SII-master | tree_CPD.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/BNT/CPDs/@tree_CPD/tree_CPD.m | 882 | utf_8 | 6a2c80420f18f1edddf686ec8424dd55 | function CPD = tree_CPD(varargin)
%DTREE_CPD Make a conditional prob. distrib. which is a decision/regression tree.
%
% CPD =dtree_CPD() will create an empty tree.
if nargin==0
% This occurs if we are trying to load an object from a file.
CPD = init_fields;
clamp = 0;
CPD = class(CPD, 'tree_CPD', discrete_CPD(... |
github | Hamza5/Plateforme-outils-SII-master | noisyor_CPD.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/BNT/CPDs/@noisyor_CPD/noisyor_CPD.m | 2,143 | utf_8 | 54258f71eb11b1b21f6199600e4a191a | function CPD = noisyor_CPD(bnet, self, leak_inhibit, inhibit)
% NOISYOR_CPD Make a noisy-or CPD
% CPD = NOISYOR_CPD(BNET, NODE_NUM, LEAK_INHIBIT, INHIBIT)
%
% A noisy-or node turns on if any of its parents are on, provided they are not inhibited.
% The prob. that the i'th parent gets inhibited (flipped from 1 to 0) is ... |
github | Hamza5/Plateforme-outils-SII-master | tabular_kernel.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/BNT/CPDs/@tabular_kernel/tabular_kernel.m | 883 | utf_8 | 6b89c317cab83f7797c18b314914be95 | function K = tabular_kernel(sz, table)
% TABULAR_KERNEL Make a table-based local kernel (discrete potential)
% K = tabular_kernel(sz, table)
%
% sz(i) is the number of values the i'th member of this kernel can have
% table is an optional array of size sz[1] x sz[2] x... [default: random]
if nargin==0
% This occurs i... |
github | Hamza5/Plateforme-outils-SII-master | tabular_kernel.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/BNT/CPDs/@tabular_kernel/Old/tabular_kernel.m | 1,123 | utf_8 | 4e7e960045eaf49fa04c54acc6ede453 | function K = tabular_kernel(fg, self)
% TABULAR_KERNEL Make a table-based local kernel (discrete potential)
% K = tabular_kernel(fg, self)
%
% fg is a factor graph
% self is the number of a representative domain
%
% Use 'set_params_kernel' to adjust the following fields
% table - a q[1]xq[2]x... array, where q[i] is ... |
github | Hamza5/Plateforme-outils-SII-master | mlp_CPD.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/BNT/CPDs/@mlp_CPD/mlp_CPD.m | 4,666 | utf_8 | c8a13bfd84571a5701e3b032bf1e5e8b | function CPD = mlp_CPD(bnet, self, nhidden, w1, b1, w2, b2, clamped, max_iter, verbose, wthresh, llthresh)
% MLP_CPD Make a CPD from a Multi Layer Perceptron (i.e., feedforward neural network)
%
% We use a different MLP for each discrete parent combination (if there are any discrete parents).
% We currently assume thi... |
github | Hamza5/Plateforme-outils-SII-master | gmux_CPD.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/BNT/CPDs/@gmux_CPD/gmux_CPD.m | 2,857 | utf_8 | e5027e327f6f059a2861551655a57fa0 | function CPD = gmux_CPD(bnet, self, varargin)
% GMUX_CPD Make a Gaussian multiplexer node
%
% CPD = gmux_CPD(bnet, node, ...) is used similarly to gaussian_CPD,
% except we assume there is exactly one discrete parent (call it M)
% which is used to select which cts parent to pass through to the output.
% i.e., we define... |
github | Hamza5/Plateforme-outils-SII-master | gmux_CPD.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/BNT/CPDs/@gmux_CPD/Old/gmux_CPD.m | 2,607 | utf_8 | cdc313821c136163e04296666db2e09d | function CPD = gmux_CPD(bnet, self, varargin)
% GMUX_CPD Make a Gaussian multiplexer node
%
% CPD = gmux_CPD(bnet, node, ...) is used similarly to gaussian_CPD,
% except we assume there is exactly one discrete parent (call it M)
% which is used to select which cts parent to pass through to the output.
% i.e., we define... |
github | Hamza5/Plateforme-outils-SII-master | softmax_CPD.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/BNT/CPDs/@softmax_CPD/softmax_CPD.m | 7,879 | utf_8 | 24edbef7ca699c9271e998f8b8a90af9 | function CPD = softmax_CPD(bnet, self, varargin)
% SOFTMAX_CPD Make a softmax (multinomial logit) CPD
%
% To define this CPD precisely, let W be an (m x n) matrix with W(i,:) = {i-th row of B}
% => we can define the following vectorial function:
%
% softmax: R^n |--> R^m
% ... |
github | Hamza5/Plateforme-outils-SII-master | gaussian_CPD.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/BNT/CPDs/@gaussian_CPD/gaussian_CPD.m | 4,877 | utf_8 | 7ba4153253ca75d4d5daa0c9394f4a54 | function CPD = gaussian_CPD(bnet, self, varargin)
% GAUSSIAN_CPD Make a conditional linear Gaussian distrib.
%
% CPD = gaussian_CPD(bnet, node, ...) will create a CPD with random parameters,
% where node is the number of a node in this equivalence class.
% To define this CPD precisely, call the continuous (cts) parent... |
github | Hamza5/Plateforme-outils-SII-master | CPD_to_scgpot.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/BNT/CPDs/@gaussian_CPD/CPD_to_scgpot.m | 1,920 | utf_8 | ea86672b41504850fc06915db06e3447 | function pot = CPD_to_scgpot(CPD, domain, ns, cnodes, evidence)
% CPD_TO_CGPOT Convert a Gaussian CPD to a CG potential, incorporating any evidence
% pot = CPD_to_cgpot(CPD, domain, ns, cnodes, evidence)
self = CPD.self;
dnodes = mysetdiff(1:length(ns), cnodes);
odom = domain(~isemptycell(evidence(domain)));
cdom =... |
github | Hamza5/Plateforme-outils-SII-master | maximize_params_debug.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/BNT/CPDs/@gaussian_CPD/maximize_params_debug.m | 5,447 | utf_8 | edfdf7f0113cbf741ab911503b9ef9cc | function CPD = maximize_params(CPD, temp)
% MAXIMIZE_PARAMS Set the params of a CPD to their ML values (Gaussian)
% CPD = maximize_params(CPD, temperature)
%
% Temperature is currently ignored.
if ~adjustable_CPD(CPD), return; end
CPD1 = struct(new_maximize_params(CPD));
CPD2 = struct(old_maximize_params(CPD));
asser... |
github | Hamza5/Plateforme-outils-SII-master | gaussian_CPD.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/BNT/CPDs/@gaussian_CPD/Old/gaussian_CPD.m | 6,044 | utf_8 | 165da67f4b1f04edcef667fd773c7dcc | function CPD = gaussian_CPD(varargin)
% GAUSSIAN_CPD Make a conditional linear Gaussian distrib.
%
% To define this CPD precisely, call the continuous (cts) parents (if any) X,
% the discrete parents (if any) Q, and this node Y. Then the distribution on Y is:
% - no parents: Y ~ N(mu, Sigma)
% - cts parents : Y|X=x ~ N... |
github | Hamza5/Plateforme-outils-SII-master | update_tied_ess.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/BNT/CPDs/@gaussian_CPD/Old/update_tied_ess.m | 3,364 | utf_8 | 743789d92ed78500c73f1a37eca069df | function CPD = update_tied_ess(CPD, domain, engine, evidence, ns, cnodes)
if ~adjustable_CPD(CPD), return; end
nCPDs = size(domain, 2);
fmarginal = cell(1, nCPDs);
for l=1:nCPDs
fmarginal{l} = marginal_family(engine, nodes(l));
end
[ss cpsz dpsz] = size(CPD.weights);
if const_evidence_pattern(engine)
dom = domain... |
github | Hamza5/Plateforme-outils-SII-master | root_CPD.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/BNT/CPDs/@root_CPD/root_CPD.m | 1,146 | utf_8 | 3b5e37505fdde599188be9aa07190d01 | function CPD = root_CPD(bnet, self, val)
% ROOT_CPD Make a conditional prob. distrib. which has no parameters.
% CPD = ROOT_CPD(BNET, NODE_NUM, VAL)
%
% The node must not have any parents and is assumed to always be observed.
% It is a way of modelling exogenous inputs to a model.
% VAL is the value to which the root i... |
github | Hamza5/Plateforme-outils-SII-master | tabular_chance_node.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/BNT/CPDs/Old/@tabular_chance_node/tabular_chance_node.m | 942 | utf_8 | d91ddf1670368ef6fbda9d19489a7402 | function CPD = tabular_chance_node(sz, CPT)
% TABULAR_CHANCE_NODE Like tabular_CPD, but simplified
% CPD = tabular_chance_node(sz, CPT)
%
% sz(1:end-1) is the sizes of the parents, sz(end) is the size of this node
% By default, CPT is a random stochastic matrix.
if nargin==0
% This occurs if we are trying to load an... |
github | Hamza5/Plateforme-outils-SII-master | linear_gaussian_CPD.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/BNT/CPDs/Old/@linear_gaussian_CPD/linear_gaussian_CPD.m | 2,477 | utf_8 | 28cb5154aa4e3b83aa3650a7ae3cc2ca | function CPD = linear_gaussian_CPD(bnet, self, theta, sigma, theta0, n0, alpha0, beta0)
% LINEAR_GAUSSIAN_CPD Make a linear Gaussian distrib.
%
% CPD = linear_gaussian_CPD(bnet, self, theta, lambda)
% This defines the distribution P(Y|X) = N(y | theta'*x, sigma),
% where y (self) is a scalar, theta is a regression vec... |
github | Hamza5/Plateforme-outils-SII-master | root_gaussian_CPD.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/BNT/CPDs/Old/@root_gaussian_CPD/root_gaussian_CPD.m | 2,095 | utf_8 | 302ba47ded3bfd835da01d469ce22f2e | function CPD = root_gaussian_CPD(bnet, self, mu, Sigma, mu0, n0, alpha0, beta0)
% ROOT_GAUSSIAN_CPD Make an unconditional Gaussian distrib.
%
% CPD = root_gaussian_CPD(bnet, self, mu, Sigma)
% This defines the distribution Y ~ N(mu, Sigma),
% Pass in [] to generate a default random value for a parameter.
%
% CPD = root... |
github | Hamza5/Plateforme-outils-SII-master | tabular_CPD.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/BNT/CPDs/@tabular_CPD/tabular_CPD.m | 5,404 | utf_8 | a0b6fb8834694dcd25e49b494205c3a3 | function CPD = tabular_CPD(bnet, self, varargin)
% TABULAR_CPD Make a multinomial conditional prob. distrib. (CPT)
%
% CPD = tabular_CPD(bnet, node) creates a random CPT.
%
% The following arguments can be specified [default in brackets]
%
% CPT - specifies the params ['rnd']
% - T means use table T; it will be resha... |
github | Hamza5/Plateforme-outils-SII-master | tabular_CPD.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/BNT/CPDs/@tabular_CPD/Old/tabular_CPD.m | 5,968 | utf_8 | 42dbc37b729883996560a8ef8eeb7d58 | function CPD = tabular_CPD(bnet, self, varargin)
% TABULAR_CPD Make a multinomial conditional prob. distrib. (CPT)
%
% CPD = tabular_CPD(bnet, node) creates a random CPT.
%
% The following arguments can be specified [default in brackets]
%
% CPT - specifies the params ['rnd']
% - T means use table T; it will be resha... |
github | Hamza5/Plateforme-outils-SII-master | tabular_utility_node.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/BNT/CPDs/@tabular_utility_node/tabular_utility_node.m | 1,135 | utf_8 | eb4333c512d7699adf100fcaaf822159 | function CPD = tabular_utility_node(bnet, node, T)
% TABULAR_UTILITY_NODE Represent a utility function as a table
% CPD = tabular_utility_node(bnet, node, T)
%
% node is the number of a node in this equivalence class.
% T is an optional argument (same shape as the CPT in tabular_CPD, but missing the last (child)
% dime... |
github | Hamza5/Plateforme-outils-SII-master | tabular_decision_node.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/BNT/CPDs/@tabular_decision_node/tabular_decision_node.m | 1,246 | utf_8 | 1ef6ac0e859febbb22bec7653e350321 | function CPD = tabular_decision_node(bnet, self, CPT)
% TABULAR_DECISION_NODE Represent a stochastic policy over a discrete decision/action node as a table
% CPD = tabular_decision_node(bnet, self, CPT)
%
% node is the number of a node in this equivalence class.
% CPT is an optional argument (see tabular_CPD for detail... |
github | Hamza5/Plateforme-outils-SII-master | tabular_decision_node.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/BNT/CPDs/@tabular_decision_node/Old/tabular_decision_node.m | 1,005 | utf_8 | e3de469fc1461470622b342c9de46724 | function CPD = tabular_decision_node(sz, CPT)
% TABULAR_DECISION_NODE Represent the randomized policy over a discrete decision/action node as a table
% CPD = tabular_decision_node(sz, CPT)
%
% sz(1:end-1) is the sizes of the parents, sz(end) is the size of this node
% By default, CPT is set to the uniform random policy... |
github | Hamza5/Plateforme-outils-SII-master | learn_params_dbn_em.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/BNT/learning/learn_params_dbn_em.m | 5,697 | utf_8 | 9621929d4fe7db0fbe53613dd4ce0a7f | function [bnet, LL, engine] = learn_params_dbn_em(engine, evidence, varargin)
% LEARN_PARAMS_DBN Set the parameters in a DBN to their ML/MAP values using batch EM.
% [bnet, LLtrace, engine] = learn_params_dbn_em(engine, data, ...)
%
% data{l}{i,t} = value of node i in slice t of time-series l, or [] if hidden.
% Supp... |
github | Hamza5/Plateforme-outils-SII-master | learn_struct_mcmc.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/BNT/learning/learn_struct_mcmc.m | 8,247 | utf_8 | 4135e82535000ff09b87f5fcd1c4ff18 | function [sampled_graphs, accept_ratio, num_edges] = learn_struct_mcmc(data, ns, varargin)
% MY_LEARN_STRUCT_MCMC Monte Carlo Markov Chain search over DAGs assuming fully observed data
% [sampled_graphs, accept_ratio, num_edges] = learn_struct_mcmc(data, ns, ...)
%
% data(i,m) is the value of node i in case m.
% ns(i... |
github | Hamza5/Plateforme-outils-SII-master | kpm_learn_struct_mcmc.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/BNT/learning/kpm_learn_struct_mcmc.m | 7,475 | utf_8 | 3903f157afe9b7192513ac1c83933c46 | function [sampled_graphs, accept_ratio, num_edges] = learn_struct_mcmc(data, ns, varargin)
% LEARN_STRUCT_MCMC Monte Carla Markov Chain search over DAGs assuming fully observed data
% [sampled_graphs, accept_ratio, num_edges] = learn_struct_mcmc(data, ns, ...)
%
% data(i,m) is the value of node i in case m.
% ns(i) i... |
github | Hamza5/Plateforme-outils-SII-master | learn_params_em.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/BNT/learning/learn_params_em.m | 2,700 | utf_8 | 1ec9f9720784bcc4666ab04179bf62a8 | function [bnet, LL, engine] = learn_params_em(engine, evidence, max_iter, thresh)
% LEARN_PARAMS_EM Set the parameters of each adjustable node to their ML/MAP values using batch EM.
% [bnet, LLtrace, engine] = learn_params_em(engine, data, max_iter, thresh)
%
% data{i,l} is the value of node i in case l, or [] if hidde... |
github | Hamza5/Plateforme-outils-SII-master | learn_struct_pdag_ic_star.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/BNT/learning/learn_struct_pdag_ic_star.m | 4,448 | utf_8 | 702585a2b1db4316da95a9bda50208b5 | function [pdag, G] = learn_struct_pdag_ic_star(cond_indep, n, k, varargin)
% LEARN_STRUCT_PDAG_IC_STAR Learn a partially oriented DAG (pattern) with latent
% variables using the IC* algorithm
% P = learn_struct_pdag_ic_star(cond_indep, n, k, ...)
%
% n is the number of nodes.
% k is an optional upper bound on the fan-... |
github | Hamza5/Plateforme-outils-SII-master | cmp_inference_dbn.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/BNT/examples/dynamic/cmp_inference_dbn.m | 2,546 | utf_8 | c70a264f33252693aaec5f3c836f00ff | function [time, engine] = cmp_inference_dbn(bnet, engine, T, varargin)
% CMP_INFERENCE_DBN Compare several inference engines on a DBN
% function [time, engine] = cmp_inference_dbn(bnet, engine, T, ...)
%
% engine{i} is the i'th inference engine.
% time(e) = elapsed time for doing inference with engine e
%
% The list be... |
github | Hamza5/Plateforme-outils-SII-master | fhmm_infer.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/BNT/examples/dynamic/fhmm_infer.m | 7,792 | utf_8 | d26293ef48727d0a3466bd14824c0344 | function [loglik, gamma] = fhmm_infer(inter, CPTs_slice1, CPTs, obsmat, node_sizes)
% FHMM_INFER Exact inference for a factorial HMM.
% [loglik, gamma] = fhmm_infer(inter, CPTs_slice1, CPTs, obsmat, node_sizes)
%
% Inputs:
% inter - the inter-slice adjacency matrix
% CPTs_slice1{s}(j) = Pr(Q(s,1) = j) where Q(s,t) = hi... |
github | Hamza5/Plateforme-outils-SII-master | cmp_online_inference.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/BNT/examples/dynamic/cmp_online_inference.m | 2,564 | utf_8 | 720fc63a72fe3edc763ce9a165226e7a | function [time, engine] = cmp_online_inference(bnet, engine, T, varargin)
% CMP_ONLINE_INFERENCE Compare several online inference engines on a DBN
% function [time, engine] = cmp_online_inference(bnet, engine, T, ...)
%
% engine{i} is the i'th inference engine.
% time(e) = elapsed time for doing inference with engine e... |
github | Hamza5/Plateforme-outils-SII-master | ho1.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/BNT/examples/dynamic/ho1.m | 5,919 | utf_8 | ba9082012f7c4d907086e64b8e334442 | function ho1()
% Example of how to create a higher order DBN
% Written by Rainer Deventer <deventer@informatik.uni-erlangen.de> 3/28/03
bnet = createBNetNL();
%%%%%%%%%%%%
function bnet = createBNetNL(varargin)
% Generate a Bayesian network, which is able to model nonlinearities at
% the input. The only input... |
github | Hamza5/Plateforme-outils-SII-master | pretty_print_hhmm_parse.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/BNT/examples/dynamic/HHMM/pretty_print_hhmm_parse.m | 1,631 | utf_8 | c40a9fca3ed672ef7af2909da58f0ed4 | function pretty_print_hhmm_parse(mpe, Qnodes, Fnodes, Onode, alphabet)
% function pretty_print_hhmm_parse(mpe, Qnodes, Fnodes, Onode, alphabet)
%
% mpe(i,t) is the most probable value of node i at time t
% Qnodes(1:D), Fnodes = [F2 .. FD], Onode contain the node ids
% alphabet(i) is the i'th output symbol, or [] if don... |
github | Hamza5/Plateforme-outils-SII-master | cmp_inference_static.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/BNT/examples/static/cmp_inference_static.m | 3,019 | utf_8 | 7867b7d980d0b9ab777d28e534cd273e | function [time, engine] = cmp_inference_static(bnet, engine, varargin)
% CMP_INFERENCE Compare several inference engines on a BN
% function [time, engine] = cmp_inference_static(bnet, engine, ...)
%
% engine{i} is the i'th inference engine.
% time(e) = elapsed time for doing inference with engine e
%
% The list below g... |
github | Hamza5/Plateforme-outils-SII-master | gibbs_test1.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/BNT/examples/static/gibbs_test1.m | 1,739 | utf_8 | d376a324a570360863925c161274363d | function gibbs_test1()
disp('gibbs test 1')
rand('state', 0);
randn('state', 0);
%[bnet onodes hnodes qnodes] = gibbs_ex_1;
[bnet onodes hnodes qnodes] = gibbs_ex_2;
je = jtree_inf_engine(bnet);
ge = gibbs_sampling_inf_engine (bnet, 'T', 50, 'burnin', 0, ...
'order', [2 2 1 2 1]);
ev = sample_bnet(bnet);
evid... |
github | Hamza5/Plateforme-outils-SII-master | mixexp_graddesc.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/BNT/examples/static/Misc/mixexp_graddesc.m | 1,420 | utf_8 | 0db020ff0ff33d3bebb71d2344763346 |
%%%%%%%%%%
function [theta, eta] = mixture_of_experts(q, data, num_iter, theta, eta)
% MIXTURE_OF_EXPERTS Fit a piecewise linear regression model using stochastic gradient descent.
% [theta, eta] = mixture_of_experts(q, data, num_iter)
%
% Inputs:
% q = number of pieces (experts)
% data(l,:) = input example l
%
% O... |
github | Hamza5/Plateforme-outils-SII-master | rprod.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/BNT/examples/static/Zoubin/rprod.m | 227 | utf_8 | 4b44cedcf984b401ebfc72812e08402c | % row product
% function Z=rprod(X,Y)
function Z=rprod(X,Y)
if(length(X(:,1)) ~= length(Y(:,1)) | length(Y(1,:)) ~=1)
disp('Error in RPROD');
return;
end
Z=zeros(size(X));
for i=1:length(X(1,:))
Z(:,i)=X(:,i).*Y;
end
|
github | Hamza5/Plateforme-outils-SII-master | csum.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/BNT/examples/static/Zoubin/csum.m | 110 | utf_8 | 224860b0cfa5fd16a501f97c71cac280 | % column sum
% function Z=csum(X)
function Z=csum(X)
N=length(X(:,1));
if (N>1)
Z=sum(X);
else
Z=X;
end; |
github | Hamza5/Plateforme-outils-SII-master | mfa.m | .m | Plateforme-outils-SII-master/src/Plugins/incertain/FullBNT-1.0.4/BNT/examples/static/Zoubin/mfa.m | 3,127 | utf_8 | a0de06a0241f63be72e2d59b6fb52c80 | % function [Lh,Ph,Mu,Pi,LL]=mfa(X,M,K,cyc,tol);
%
% Maximum Likelihood Mixture of Factor Analysis using EM
%
% X - data matrix
% M - number of mixtures (default 1)
% K - number of factors in each mixture (default 2)
% cyc - maximum number of cycles of EM (default 100)
% tol - termination tolerance (prop change in like... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.