asteirsk-addones 安装

在asteirsk 1.6版本以前,如asterisk需要连接数据库,就要安装asterisk-addons

1.6版本以后,只需要按照之前安装流程,安装好asterisk和mysql以后再安装 libmysqld.dev openssl.dev这两个包

以上两个包安装好之后进入到asterisk安装文件的解压目录

执行 make clean

然后  ./configure  ,make menuselect,之后出现界面 选择 add-ons,将有关mysql的选项都选择上 包括res_config_mysql

然后保存后退出,再执行make ,make install

成功安装后,重启asterisk,之后进入控制台,输入  module show like mysql  之后 就可以显示数据库的三个模块已经加载

function [model, loglikHist] = mixexpFit(X, y, nmix, varargin) %% Fit a mixture of experts model via MLE/MAP using EM % If the response y is real-valued, we use linear regression experts. % If the response y is categorical, we use logistic regression experts. % % Inputs % % X - X(i, :) is the ith case, i.e. data is of size n-by-d % y - y(i) can be real valued or in {1..C} % nmix - the number of mixture components to use % % % Optional inputs % EMargs - cell array. See emAlgo. (Default {}) % fixmix - if true, mixing weights are constants independent of x % (default false) % nclasses - needed if not all labels are present in y % (default nunique(y)) % preproc - a struct, passed to preprocessorApplyToTtrain % By default, this adds ones and standardizes % gatingFitArgs - cell array, default {'lambda', 0.001} % expertFitArgs - cell array, default {'lambda', 0.001} % % Outputs % % A structure - see mixExpCreate for field descriptions % loglikHist - a record of the log likelihood at each EM iteration. %% % This file is from pmtk3.googlecode.com pp = preprocessorCreate('addOnes', true, 'standardizeX', true); [EMargs, fixmix, nclasses, preproc, gatingFitArgs, expertFitArgs] = ... process_options(varargin, ... 'EMargs', {}, 'fixmix', false, 'nclasses', [], 'preproc', pp, ... 'gatingFitArgs', {'lambda', 0.001}, ... 'expertFitArgs', {'lambda', 0.001}); [preproc, X] = preprocessorApplyToTrain(preproc, X); % We use k=1:nmix to index mixture components % and c=1:C to index output classes [N,D] = size(X); %X = standardize(X); %X = [ones(N,1) X]; %D = D+1; if isequal(y, round(y)) model.classifier = true; if isempty(nclasses) nclasses = numel(unique(y)); end else model.classifier = false; nclasses = 1; end data.X = X; data.y = y; model.nmix = nmix; model.nclasses = nclasses; model.D = D; model.preproc = preproc; model.expertFitArgs = expertFitArgs; model.gatingFitArgs = gatingFitArgs; model.fixmix = fixmix; model.modelType = 'mixexp'; [model, loglikHist] = emAlgo(model, data, @initFn, @estep, @mstep, ... EMargs{:}); end
07-13
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值