LVQ學(xué)習(xí)矢量化算法源程序
This directory contains code implementing the Learning vector quantization
network. Source code may be found in LVQ.CPP. Sample training data is found
in LVQ1.PAT. Sample test data is found in LVQTEST1.TST and LVQTEST2.TST. The
LVQ program accepts input consisting of VECTORS and calculates the LVQ
network weights. If a test set is specified, the winning neuron (class) for
each neuron is identified and the Euclidean distance between the pattern and
each neuron is reported. Output is directed to the screen.
The objective of this projectis to design, model and simulate an autocorrelation
generator circuit using 4-bit LFSR. the register and LFSR will used D flip-flop and some
gates. By the autocorrelation concept, there should be 2 same length VECTORS, for calculating
the autocorrelation , we have to design the register for storing the original vector and the
shifter for make time delay.
performs one of the matrix-vector operations y := alpha*A*x + beta*y, or y := alpha*A *x + beta*y, where alpha and beta are scalars, x and y are VECTORS and A is an
m by n matrix
function y_cum = cum2x (x,y, maxlag, nsamp, overlap, flag)
%CUM2X Cross-covariance
% y_cum = cum2x (x,y,maxlag, samp_seg, overlap, flag)
% x,y - data VECTORS/matrices with identical dimensions
% if x,y are matrices, rather than VECTORS, columns are
% assumed to correspond to independent realizations,
% overlap is set to 0, and samp_seg to the row dimension.
% maxlag - maximum lag to be computed [default = 0]
% samp_seg - samples per segment [default = data_length]
% overlap - percentage overlap of segments [default = 0]
% overlap is clipped to the allowed range of [0,99].
%CHECKBOUNDS Move the initial point within the (valid) bounds.
% [X,LB,UB,X,FLAG] = CHECKBOUNDS(X0,LB,UB,nvars)
% checks that the upper and lower
% bounds are valid (LB <= UB) and the same length as X (pad with -inf/inf
% if necessary) warn if too long. Also make LB and UB VECTORS if not
% already.
% Finally, inf in LB or -inf in UB throws an error.
This directory contains code implementing the K-means algorithm. Source code
may be found in KMEANS.CPP. Sample data isfound in KM2.DAT. The KMEANS
program accepts input consisting of VECTORS and calculates the given
number of cluster centers using the K-means algorithm. Output is
directed to the screen.
多項式曲線擬合 任意介數(shù) Purpose - Least-squares curve fit of arbitrary order
working in C++ Builder 2007 as a template class,
using vector<FloatType> parameters.
Added a method to handle some EMathError exceptions.
If do NOT want to use this just call PolyFit2 directly.
usage: Call PolyFit by something like this.
CPolyFit<double> PolyFitObj
double correlation_coefficiant = PolyFitObj.PolyFit(X, Y, A)
where X and Y are VECTORS of doubles which must have the same size and
A is a vector of doubles which must be the same size as the number of
coefficients required.
returns: The correlation coefficient or -1 on failure.
produces: A vector (A) which holds the coefficients.
k-meansy算法源代碼。This directory contains code implementing the K-means algorithm. Source code
may be found in KMEANS.CPP. Sample data isfound in KM2.DAT. The KMEANS
program accepts input consisting of VECTORS and calculates the given
number of cluster centers using the K-means algorithm. Output is
directed to the screen.