Code covered by the BSD License
 ...
 Credit_Rating(newData)
This function uses the previously constructed classification ensemble to
 GetMigrationFtsCell(id,da...
 GetMigrationFtsCell(id,da...
 GetTransProb(migrMat,nRat...
 GetTransProb(migrMat,nRat...
 TransitionProbabilitiesFu...Importing the data
 betarndms(mu, sigma, m, n)
BETARNDMS Random arrays from beta distribution given the mean and standard
 betarndms(mu, sigma, m, n)
BETARNDMS Random arrays from beta distribution given the mean and standard
 cell2dataset(cellobj, var...CELL2DATASET converts a Cell array into a Dataset array. In this process
 heatmap(mat, xlab, ylab, ...HEATMAP displays a matrix as a heatmap image
 loadNewData(fileToRead1)
LOADNEWDATA(FILETOREAD1)
 Credit_Rating.mCredit Rating
 Credit_VaR.mCredit Risk Analysis
 TransitionProbabilities.mEstimating Transition Probabilities
 getdbdata.mGETDBDATA: An automaticallygenerated MATLAB script for reading

View all files
Credit Risk Modeling with MATLAB
by
Ameya Deoras
07 Jun 2010
(Updated
10 Nov 2011)
These are the supporting MATLAB files for the MathWorks webinar of the same name.

Credit_Rating(newData)

function predClass = Credit_Rating(newData)
% This function uses the previously constructed classification ensemble to
% assign credit ratings to new customers.
% We start by loading the classifier.
load('CreditRatingClassifier.mat')
% Next, we trim the newData so that only the three significant variables
% are passed to the classifier:
newData = newData(:, [2 4 6]);
% To predit the credit rating for this new data, we call the predict
% method on the classifier. The method returns two arguments, the predicted
% class and the classification score. We certainly want to get both output
% arguments, since the classification scores contain information on how
% certain the predicted ratings seem to be.
predClass = predict(b, newData);
%#function TreeBagger


Contact us