3 %> This has a 4-D cell of @ref
irlog
5 %> Each slice logs(:, :, :, i) accounts for a different log class
15 properties(SetAccess=protected)
21 o.classtitle = 'Cube log';
23 o.moreactions{end+1} =
'extract_sovalues';
26 %> Creates a sovalues
object
28 %> Only works
if the @ref
log_cube::logs property has dimension [n, 1, 1, *]
30 %> @
return a @ref sovalues
object
31 function sov = extract_sovalues(o)
32 [a, b, c, d] = size(o.logs); %#ok<*NASGU>
34 irerror(
'Extraction of sovalues only works if the cube was a single column!');
38 sov.ax(2) = raxisdata_singleton(
'Singleton');
39 sov.ax(1) = raxisdata();
40 sov.ax(1).label =
'Case';
41 sov.ax(1).values = 1:size(o.logs, 1);
42 sov.values = sovalues.read_logss(o.logs);
43 specs = cellfun(@(x) x.get_description(), o.blocks(:, :, :, 1),
'UniformOutput', 0);
44 sov = sov.set_field(
'spec', specs);
48 %> Pre-allocates the @ref log property; prepares to record.
50 %> @param log_mold a cell of @ref
irlog objects
51 %> @param block_mold a cell of @ref
block objects. Only used to
get allocation dimensions
52 %> @param no_reps Number of repetitions, such
as "k" from a k-fold cross-validation
53 function o = allocate_logs(o, log_mold, block_mold, no_reps)
55 % Makes sure that all log_mold elements have a title that can be used
as a field name
56 for i = 1:numel(log_mold)
59 a.(log.title) = 10; % Checks validity of log title
as field name
64 irerror(sprintf('log title "%s" cannot be used
as a field name!', log.title));
68 [ni, nj, nk] = size(block_mold);
75 if ~isempty(block_mold{ii, ij, ik})
76 o.logs{ii, ij, ik, il} = log_mold{il}.allocate(no_reps);
78 o.logs{ii, ij, ik, il} = [];
Log generated by a reptt_blockcube.
Analysis Session (AS) base class.
REpeated Train-Test - Block Cube.