2024.02.15作业

本文详细解析了C语言中指针的概念,包括变量指针的含义、指针的赋值、地址运算、函数调用、数组操作、字符串处理以及库函数如strcpy和strcmp的使用。还涉及了一维和二维数组的索引计算以及指针数组的理解。

一.选择题

1.变量的指针,其含义是指该变量的   B         

A)值               B)地址             C)名               D)一个标志

2.已有定义int k=2;int *ptr1,*ptr2;且ptr1和ptr2均已指向变量k,下面不能正确执行的赋值语句是 B   

A)k=*ptr1+*ptr2     B)ptr2=k            C)ptr1=ptr2          D)k=*ptr1*(*ptr2)

3.若有说明:int *p,m=5,n;以下程序段正确的是       D       

A)p=&n ;                                B)p = &n ;

      scanf(“%d”,*p);                        scanf(“%d”,&p);                                     

C)scanf(“%d”,&n);                 D)p = &n ;

      *p=n ;                                       *p = m ;

4.已有变量定义和函数调用语句:int a=25;print_value(&a);下面函数的输出结果是       D       

void print_value(int *x)

{  printf(“%d\n”,++*x); }

A)23               B)24               C)25               D)26

5.若有说明:int *p1, *p2,m=5,n;以下均是正确赋值语句的选项有哪些  C         

A)p1=&m; p2=&p1 ;         B)p1=&m; p2=&n; *p1=*p2 ;

C)p1=&m; p2=p1 ;          D)p1=&m; *p1=*p2 ;

6.若有语句:int *p,a=4;和p=&a;下面均代表地址的一组选项是  D           

A)a,p,*&a           B)&*a,&a,*p        C)*&p,*p,&a        D)&a,&*p,p

7.下面判断正确的是  D           

A)char *a=”china”; 等价于 char *a; *a=”china” ;

B)char str[10]={“china”}; 等价于 char str[10]; str[ ]={“china”;}  

C)char *s=”china”; 等价于 char *s; s=”china” ;

D)char c[4]=”abc”,d[4]=”abc”; 等价于 char c[4]=d[4]=”abc” ;

8.下面程序段中,for循环的执行次数是     B      。

char *s=”\ta\018bc”     \01等价于\1 0表示八进制前导符,\01  --\08  都是2个字节   \09就是3个字节

for (  ; *s!=’\0’ ; s++)  printf(“*”) ;

A)2                B)7                C)6                D)5

9.下面能正确进行字符串赋值操作的是   B         

A)char s[5]={“ABCDE”};  

B)char s[5]={‘A’,’B’,’C’,’D’,’E’};

C)char *s ; s=”ABCDE” ;                  D)char *s; scanf(“%s”,s) ;

10.下面程序段的运行结果是    D        

char *s=”abcde” ;

s+=2 ; printf(“%d”,s);

A)cde              B)字符’c’           C)字符’c’的地址     D)98

11.设p1和p2是指向同一个字符串的指针变量,c为字符变量,则以下不能正确执行的赋值语句是      B        

A)c=*p1+*p2        B)p2=c             C)p1=p2            D)c=*p1*(*p2)

12.设有程序段:char s[ ]=”china”; char *p ; p=s ;则下面叙述正确的是       D      

A)s和p完全相同

B)数组s中的内容和指针变量p中的内容相等

C)s数组长度和p所指向的字符串长度相等

D)*p与s[0]相等

13.以下与库函数strcpy(char *p1,char *p2)功能不相等的程序段是      C        

A)strcpy1(char *p1,char *p2)

   { while ((*p1++=*p2++)!=’\0’) ; }

B)strcpy2(char *p1,char *p2)

   { while ((*p1=*p2)!=’\0’) { p1++; p2++ } }

C)strcpy3(char *p1,char *p2)

   { while (*p1++=*p2++) ; }

D)strcpy4(char *p1,char *p2)

   { while (*p2) *p1++=*p2++ ; }

14.下面程序段的运行结果是      C      

   char a[ ]=”language” , *p ;

   p=a ;

   while (*p!=’u’) { printf(“%c”,*p-32); p++ ; }

A)LANGUAGE       B)language            C)LANG             D)langUAGE

16.以下与库函数strcmp(char *s,char *t)功能相等的程序段是      A        

A)strcmp1(char *s,char *t)

   {  for ( ; *s++=*t++; )

if (*s= =’\0’)

 return 0 ;

return (*s-*t) ;

   }

B)strcmp2(char *s,char *t)

   {  for ( ; *s++=*t++; )

        if (!*s) return 0 ;

return (*s-*t) ;

   }

C)strcmp3(char *s,char *t)

   {  for ( ; *t= =*s; )

        { if (!*t) return 0 ; t++ ; s++ ; }

return (*s-*t) ;

   }

D)strcmp4(char *s,char *t)

   {  for ( ; *s==*t; s++, t++ )

        if (!*s) return 0 ;

return (*t-*s) ;

   }

17.以下说明不正确的是     B        

A)char a[10]=”china” ;                         

B)char a[10],*p=a; p=”china”;

C)char *a; a=”china” ;                          

D)char a[10]; a=”china”; 

18.设有说明语句:char a[]=”It is mine”;char *p=”It is mine”;则以下不正确的叙述是       D       

A)a+1表示的是字符t的地址                   

B)p指向另外的字符串时,字符串的长度不受限制

C)p变量中存放的地址值可以改变

D)a中只能存放10个字符

19.若已定义char s[10];则在下面表达式中不表示s[1]的地址是       B      

A)s+1               B)s++              C)&s[0]+1            D)&s[1]

20.若有定义:int a[5],*p=a;则对a数组元素的正确引用是       D       

A)*&a[5]            B)a+2              C)*(p+5)              D)*(a+2)

21.若有定义:int a[5],*p=a;则对a数组元素地址的正确引用是      D      

A)p+5               B)*a+1             C)&a+1              D)&a[0]

22.若有定义:int a[2][3];则对a数组的第i行第j列元素值的正确引用是   A    

A)*(*(a+i)+j)         B)(a+i)[j]             C)*(a+i+j)          D)*(a+i)+j  

23.若有定义:int a[2][3];则对a数组的第i行第j列元素地址的正确引用是   D    

A)*(a[i]+j)           B)(a+i)              C)*(a+j)          D)a[i]+j

24.若有程序段:int a[2][3],(*p)[3]; p=a;则对a数组元素地址的正确引用是    C    

A)*(p+2)            B)p[2]               C)p[1]+1             D)(p+1)+2

25.若有程序段:int a[2][3],(*p)[3]; p=a;则对a数组元素的正确引用是      C      

A)(p+1)[0]           B)*(*(p+2)+1)        C)*(p[1]+1)           D)p[1]+2

26.若有定义:int a[5];则a数组中首元素的地址可以表示为      C      

A)&a               B)a+1               C)a                  D)&a[1]

27.若有定义:int (*p)[4];则标识符p      C      

A)是一个指向整型变量的指针

B)是一个指针数组名

C)是一个指针,它指向一个含有四个整型元素的一维数组

D)定义不合法

28.以下与int *q[5];等价的定义语句是     C      

A)int q[5]           B)int *q              C)int *(q[5])           D)int (*q)[5]

29.以下正确的说明语句是       B      

A)int *b[]={1,3,5,7,9} ;

B)int a[5],*num[5]={&a[0],&a[1],&a[2],&a[3],&a[4]};

C)int a[]={1,3,5,7,9}; int *num[5]={a[0],a[1],a[2],a[3],a[4]};

D)int a[3][4],(*num)[4] ; num[1]=&a[1][3];

30.若有定义:int b[4][6],*p,*q[4];且0≤i<4,则不正确的赋值语句是     A     

A)q[i]=b[i];         B)p=b;               C)p=b[i];              D)q[i]=&b[0][0]

32.若要对a进行自减运算,则a应有下面说明       D      

A)int p[3]; int *a=p;          B)int k; int *a=&k;             C)char *a[3]            D)int b[10]; int *a=b+1;

33.以下选项中,对指针变量p的正确操作是    B     

A)int a[3], *p; p=&a;      B)int a[5], *p; p=a;       

C)int a[5];int *p=a=100;             

D)int a[5]; int *p1,*p2=a;  *p1=*p2;

                                                        

34.若有定义:int x[10]={0,1,2,3,4,5,6,7,8,9},*p1;则数值不为3的表达式是   C   

A)x[3]                        B)p1=x+3,*p1++

C)p1=x+2,*(p1++)               D)p1=x+2,*++p1

35.下面程序段的输出是       C      

int a[ ]={2,4,6,8,10,12,14,16,18,20,22,24},*q[4],k;

for (k=0; k<4; k++) q[k]=&a[k*3];

printf(“%d\n”,q[3][0]);

A)22               B)16                C)20                  D)输出不合法

36.若要对a进行自增运算,则a应具有下面说明      D       

A)int a[3][2];                   B)char *a[ ]={“12”,”ab”};

C)char (*a) [3]                D)int b[10], *a=b;

37.若有定义int a[4][6];则能正确表示a数组中任一元素a[i][j](i,j均在有效范围内)地址的表达式       A      

A)&a[0][0]+6*i+j      B)&a[0][0]+4*j+i

C)&a[0][0]+4*i+j      D)&a[0][0]+6*j+I

38.下面程序的运行结果是      B       

main ( )

{  int x[5]={2,4,6,8,10}, *p, **pp ;

   p=x , pp = &p ;

   printf(“%d”,*(p++));

   printf(“%3d”,**pp);

}

A)4  4            B)2  4              C)2  2                D)4  6

39.若有定义int x[4][3]={1,2,3,4,5,6,7,8,9,10,11,12}; int (*p)[3]=x ; 则能够正确表示数组元素x[1][2]的表达式是      D       

A)*((*p+1)[2])                           B)(*p+1)+2

C)*(*(p+5))                             D)*(*(p+1)+2)

40.若有说明:char *language[]={“FORTRAN”,”BASIC”,”PASCAL”,”JAVA”,”C”};则language[2]的值是       B      

A)一个字符        B)一个地址          C)一个字符串          D)一个不定值

41.设有定义:char *cc[2]={“1234”,”5678”};则正确的叙述是     A       

A)cc数组的两个元素中各自存放了字符串”1234”和”5678”的首地址

B)cc数组的两个元素分别存放的是含有4个字符的一维字符数组的首地址

C)cc是指针变量,它指向含有两个数组元素的字符型一维数组

D)cc元素的值分别维”1234”和”5678”

  1. 请说明二维数组行偏移,列偏移。(7分)  *(*(a+i)+j)

例如:int arr[3][4]={1,2,3,4,5,6,7,8,9,10,11,12}

Int (*p)[4]=arr;

假设arr首地址是 0x1020    指针p自身的地址是0x600

请回答:

arr+1 地址是:0x1030

arr[0]+2 地址是 0x1028

*(arr+2)+3的地址是  0x104C

p+2的地址是  0x1040

*(p+1)的地址是  0x1030

*(p+1)+1的地址是  0x1034

&p+2的地址是  0x610

这次的代码是我给人工智能发送以下内容后,人工智能所出的。现在请结合我给你的这些信息,对代码进行调整,解决准确率低和代码运行错误的问题。 我法的内容如下: 我在做计算智能课的结课大论文,请你结合深度学习、机器学习和计算智能的知识,及其相关知识,帮助我完成本次结课大论文。另,本次实验采用MATLAB R2024a的实验环境。 任务一:利用BP神经网络做车牌数字识别 [简述BP算法的原理] [说明BP神经网络结构及重要参数设置] [实验结果展示] [实验结果分析及可改进方向] [代码展示] 请先给我[代码展示]部分的内容,其他部分内容我之后再问你要。 我这有些关于任务一的相关数据如下,这些文件夹里装了各色车牌的照片。 black文件夹的地址为C:\Users\蓝喲\Desktop\课\计算智能\结课大作业\CCPDCRPD\train blue文件夹的地址为C:\Users\蓝喲\Desktop\课\计算智能\结课大作业\CCPDCRPD\train green文件夹的地址为C:\Users\蓝喲\Desktop\课\计算智能\结课大作业\CCPDCRPD\train\green lv_double文件夹的地址为C:\Users\蓝喲\Desktop\课\计算智能\结课大作业\CCPDCRPD\train\green white文件夹的地址为C:\Users\蓝喲\Desktop\课\计算智能\结课大作业\CCPDCRPD\train yellow_double文件夹的地址为C:\Users\蓝喲\Desktop\课\计算智能\结课大作业\CCPDCRPD\train\yellow yellow_single文件夹的地址为C:\Users\v蓝喲\Desktop\课\计算智能\结课大作业\CCPDCRPD\train\yellow 你给的代码如下: %% 最终优化版 - 车牌数字识别 clear; clc; close all; rng(42); %% 参数设置 targetSize = [32, 32]; numClasses = 10; % 固定为0-9十个类别 %% 数据加载与预处理 [images, labels] = robustDataLoader(targetSize, numClasses); % 数据集划分 (60%训练, 20%验证, 20%测试) numSamples = size(images,4); [trainInd, valInd, testInd] = dividerand(numSamples, 0.6, 0.2, 0.2); trainImages = images(:,:,:,trainInd); trainLabels = labels(trainInd); valImages = images(:,:,:,valInd); valLabels = labels(valInd); testImages = images(:,:,:,testInd); testLabels = labels(testInd); %% 增强的CNN结构 layers = [ imageInputLayer([targetSize 1]) convolution2dLayer(3, 32, 'Padding','same') batchNormalizationLayer reluLayer maxPooling2dLayer(2, 'Stride', 2) convolution2dLayer(3, 64, 'Padding','same') batchNormalizationLayer reluLayer maxPooling2dLayer(2, 'Stride', 2) convolution2dLayer(3, 128, 'Padding','same') batchNormalizationLayer reluLayer fullyConnectedLayer(256) reluLayer dropoutLayer(0.6) % 增加丢弃率 fullyConnectedLayer(numClasses) softmaxLayer classificationLayer ]; %% 优化训练配置 options = trainingOptions('adam', ... 'MaxEpochs', 40, ... % 增加训练轮次 'MiniBatchSize', 128, ... 'InitialLearnRate', 0.001, ... 'LearnRateSchedule', 'piecewise', ... 'LearnRateDropFactor', 0.5, ... 'LearnRateDropPeriod', 15, ... % 调整学习率衰减周期 'Shuffle', 'every-epoch', ... 'ValidationData', {valImages, categorical(valLabels)}, ... 'ValidationFrequency', 50, ... % 减少验证频率以加速 'Plots', 'training-progress', ... 'Verbose', true); %% 训练模型 net = trainNetwork(trainImages, categorical(trainLabels), layers, options); %% 评估与可视化 predicted = classify(net, testImages); accuracy = mean(predicted == categorical(testLabels)); fprintf('测试准确率: %.2f%%\n', accuracy*100); % 修复混淆矩阵错误 testLabelsCategorical = categorical(testLabels); predictedCategorical = categorical(double(predicted)); % 转换为分类类型 figure; cm = confusionmat(testLabelsCategorical, predictedCategorical); confusionchart(cm, categories(testLabelsCategorical)); title(sprintf('混淆矩阵 (准确率: %.2f%%)', accuracy*100)); % 显示样本预测 figure; numSamples = 25; randIndices = randperm(numel(testLabels), numSamples); for i = 1:numSamples subplot(5, 5, i); idx = randIndices(i); imshow(testImages(:,:,:,idx)); predLabel = double(predicted(idx)); trueLabel = testLabels(idx); if predLabel == trueLabel color = 'g'; else color = 'r'; end title(sprintf('预测:%d\n真实:%d', predLabel, trueLabel), 'Color', color); end % 错误分析:显示错误预测样本 figure; wrongIdx = find(predictedCategorical ~= testLabelsCategorical); numSamples = min(25, numel(wrongIdx)); randWrong = randperm(numel(wrongIdx), numSamples); for i = 1:numSamples subplot(5, 5, i); idx = wrongIdx(randWrong(i)); imshow(testImages(:,:,:,idx)); predLabel = double(predicted(idx)); trueLabel = testLabels(idx); title(sprintf('预测:%d\n真实:%d', predLabel, trueLabel), 'Color', 'r'); end %% 鲁棒的数据加载函数 function [images, labels] = robustDataLoader(targetSize, numClasses) dataPath = 'C:\Users\蓝喲\Desktop\课\计算智能\结课大作业\CCPDCRPD\train'; colors = {'black', 'blue', 'green', 'white', 'yellow'}; % 初始化 images = single([]); labels = []; % 遍历颜色文件夹 for c = 1:length(colors) colorPath = fullfile(dataPath, colors{c}); % 获取所有子文件夹 subDirs = getSubdirectories(colorPath); % 遍历子文件夹 for s = 1:length(subDirs) currentPath = fullfile(colorPath, subDirs{s}); jpgFiles = dir(fullfile(currentPath, '*.jpg')); if isempty(jpgFiles) fprintf('跳过空文件夹: %s\n', currentPath); continue; end % 加载当前文件夹的图像 for i = 1:length(jpgFiles) try imgPath = fullfile(currentPath, jpgFiles(i).name); img = imread(imgPath); % 转换为灰度图 if size(img, 3) == 3 img = rgb2gray(img); end % 预处理 - 增强对比度 img = imadjust(img); % 调整尺寸 img = imresize(img, targetSize); img = im2single(img); % 从文件名提取标签 label = extractLabelFromName(jpgFiles(i).name); % 只接受0-9的有效标签 if label < 0 || label > 9 fprintf('跳过无效标签图像: %s (标签:%d)\n', jpgFiles(i).name, label); continue; end % 添加到数据集 if isempty(images) images = img; else images = cat(4, images, img); end labels = [labels; label]; catch ME fprintf('加载图像错误: %s (%s)\n', imgPath, ME.message); end end end end % 确保至少有一些数据 if isempty(images) error('未找到有效图像数据,请检查路径: %s', dataPath); end fprintf('成功加载 %d 张图像,共 %d 个类别\n', numel(labels), numClasses); end %% 获取子目录列表 function subDirs = getSubdirectories(mainDir) dirList = dir(mainDir); isSubDir = [dirList.isdir] & ~ismember({dirList.name}, {'.', '..'}); subDirs = {dirList(isSubDir).name}; % 如果主文件夹下有图像文件,添加主文件夹 if ~isempty(dir(fullfile(mainDir, '*.jpg'))) subDirs = [subDirs, {''}]; end end %% 改进的标签提取函数 function label = extractLabelFromName(filename) % 尝试匹配括号内的数字 (1) [match] = regexp(filename, '\((\d+)\)', 'tokens'); if ~isempty(match) num = str2double(match{1}{1}); if num >= 0 && num <= 9 label = num; return; end end % 尝试匹配文件名末尾的数字 [match] = regexp(filename, '(\d+)\.jpg$', 'tokens'); if ~isempty(match) num = str2double(match{1}{1}); label = mod(num, 10); % 取个位数 return; end % 尝试匹配文件名中的数字字符 [match] = regexp(filename, '\d', 'match'); if ~isempty(match) label = str2double(match{1}); return; end % 默认返回无效标签 label = -1; end 运行结果如下: 成功加载 15483 张图像,共 10 个类别 在单 CPU 上训练。 正在初始化输入数据归一化。 |=============================================================================| |  轮  |  迭代  |    经过的时间     |  小批量准确度  |  验证准确度  |  小批量损失  |  验证损失  |  基础学习率  | |     |      |  (hh:mm:ss)  |          |         |         |        |         | |=============================================================================| |   1 |    1 |     00:00:12 |    4.69% |  33.84% |  3.1265 | 6.1090 |  0.0010 | |   1 |   50 |     00:01:00 |   48.44% |  50.66% |  1.4774 | 1.4475 |  0.0010 | |   2 |  100 |     00:01:45 |   55.47% |  54.05% |  1.2905 | 1.3421 |  0.0010 | |   3 |  150 |     00:02:30 |   51.56% |  55.67% |  1.3363 | 1.2663 |  0.0010 | |   3 |  200 |     00:03:15 |   50.00% |  57.86% |  1.3424 | 1.2264 |  0.0010 | |   4 |  250 |     00:03:59 |   55.47% |  57.80% |  1.1695 | 1.1962 |  0.0010 | |   5 |  300 |     00:04:51 |   51.56% |  58.80% |  1.2479 | 1.1856 |  0.0010 | |   5 |  350 |     00:05:31 |   59.38% |  60.57% |  1.2770 | 1.1191 |  0.0010 | |   6 |  400 |     00:05:51 |   60.16% |  62.87% |  1.1318 | 1.0742 |  0.0010 | |   7 |  450 |     00:06:33 |   60.16% |  62.16% |  1.1437 | 1.0831 |  0.0010 | |   7 |  500 |     00:07:41 |   64.84% |  64.48% |  0.9498 | 1.0336 |  0.0010 | |   8 |  550 |     00:08:37 |   68.75% |  65.55% |  1.0622 | 1.0383 |  0.0010 | |   9 |  600 |     00:09:13 |   52.34% |  66.29% |  1.1652 | 1.0414 |  0.0010 | |  10 |  650 |     00:09:38 |   70.31% |  66.52% |  0.8450 | 1.0268 |  0.0010 | |  10 |  700 |     00:09:56 |   66.41% |  68.10% |  0.8517 | 0.9665 |  0.0010 | |  11 |  750 |     00:10:15 |   57.03% |  67.68% |  1.1278 | 0.9506 |  0.0010 | |  12 |  800 |     00:10:33 |   73.44% |  68.26% |  0.6809 | 0.9920 |  0.0010 | |  12 |  850 |     00:10:54 |   66.41% |  69.42% |  0.8815 | 0.9742 |  0.0010 | |  13 |  900 |     00:11:13 |   68.75% |  70.55% |  0.7691 | 0.9185 |  0.0010 | |  14 |  950 |     00:12:03 |   81.25% |  70.58% |  0.6132 | 0.9381 |  0.0010 | |  14 | 1000 |     00:12:28 |   64.84% |  70.91% |  0.9334 | 0.8932 |  0.0010 | |  15 | 1050 |     00:12:47 |   81.25% |  71.13% |  0.5735 | 0.9524 |  0.0010 | |  16 | 1100 |     00:13:07 |   78.91% |  71.71% |  0.6210 | 0.9344 |  0.0005 | |  16 | 1150 |     00:13:31 |   75.78% |  71.81% |  0.6192 | 0.9230 |  0.0005 | |  17 | 1200 |     00:14:33 |   77.34% |  72.33% |  0.5982 | 0.9175 |  0.0005 | |  18 | 1250 |     00:15:45 |   74.22% |  72.01% |  0.6713 | 0.9694 |  0.0005 | |  19 | 1300 |     00:16:55 |   82.03% |  72.68% |  0.4780 | 0.9674 |  0.0005 | |  19 | 1350 |     00:18:02 |   86.72% |  71.91% |  0.3710 | 0.9776 |  0.0005 | |  20 | 1400 |     00:19:12 |   77.34% |  73.36% |  0.5328 | 0.9105 |  0.0005 | |  21 | 1450 |     00:20:17 |   78.91% |  72.33% |  0.5978 | 0.9863 |  0.0005 | |  21 | 1500 |     00:21:23 |   73.44% |  72.97% |  0.5857 | 0.9991 |  0.0005 | |  22 | 1550 |     00:22:33 |   89.84% |  73.46% |  0.3211 | 0.9644 |  0.0005 | |  23 | 1600 |     00:23:57 |   82.81% |  72.78% |  0.4824 | 0.9861 |  0.0005 | |  23 | 1650 |     00:25:28 |   82.03% |  73.78% |  0.4521 | 0.9510 |  0.0005 | |  24 | 1700 |     00:27:28 |   86.72% |  72.33% |  0.3082 | 1.0560 |  0.0005 | |  25 | 1750 |     00:28:53 |   80.47% |  72.72% |  0.4768 | 1.0563 |  0.0005 | |  25 | 1800 |     00:30:09 |   85.94% |  72.39% |  0.3754 | 0.9933 |  0.0005 | |  26 | 1850 |     00:31:34 |   84.38% |  72.42% |  0.3483 | 1.0455 |  0.0005 | |  27 | 1900 |     00:32:56 |   84.38% |  72.62% |  0.4467 | 1.0685 |  0.0005 | |  28 | 1950 |     00:34:34 |   85.16% |  72.81% |  0.3287 | 1.1146 |  0.0005 | |  28 | 2000 |     00:36:04 |   83.59% |  73.01% |  0.4610 | 1.1104 |  0.0005 | |  29 | 2050 |     00:37:22 |   84.38% |  73.10% |  0.4101 | 1.0793 |  0.0005 | |  30 | 2100 |     00:38:24 |   87.50% |  73.26% |  0.3039 | 1.0915 |  0.0005 | |  30 | 2150 |     00:39:33 |   89.06% |  73.39% |  0.3864 | 1.1083 |  0.0005 | |  31 | 2200 |     00:40:52 |   90.62% |  73.97% |  0.2977 | 1.1225 |  0.0003 | |  32 | 2250 |     00:41:35 |   89.06% |  73.52% |  0.2699 | 1.1896 |  0.0003 | |  32 | 2300 |     00:42:37 |   92.19% |  74.27% |  0.1868 | 1.1225 |  0.0003 | |  33 | 2350 |     00:43:58 |   89.06% |  74.20% |  0.3109 | 1.1430 |  0.0003 | |  34 | 2400 |     00:45:19 |   89.84% |  72.84% |  0.3195 | 1.2183 |  0.0003 | |  35 | 2450 |     00:46:47 |   90.62% |  73.52% |  0.2949 | 1.2095 |  0.0003 | |  35 | 2500 |     00:48:17 |   90.62% |  73.85% |  0.2368 | 1.2068 |  0.0003 | |  36 | 2550 |     00:49:47 |   90.62% |  73.68% |  0.2423 | 1.2037 |  0.0003 | |  37 | 2600 |     00:50:31 |   92.19% |  73.75% |  0.2511 | 1.2154 |  0.0003 | |  37 | 2650 |     00:51:37 |   96.88% |  73.49% |  0.1041 | 1.2017 |  0.0003 | |  38 | 2700 |     00:53:10 |   86.72% |  73.88% |  0.3460 | 1.2474 |  0.0003 | |  39 | 2750 |     00:54:31 |   91.41% |  73.78% |  0.2129 | 1.2496 |  0.0003 | |  39 | 2800 |     00:55:55 |   92.19% |  73.78% |  0.2755 | 1.2247 |  0.0003 | |  40 | 2850 |     00:56:50 |   91.41% |  73.52% |  0.1725 | 1.2715 |  0.0003 | |  40 | 2880 |     00:57:33 |   91.41% |  74.17% |  0.2438 | 1.2292 |  0.0003 | |=============================================================================| 训练结束: 已完成最大轮数。 测试准确率: 74.39% 不支持将脚本 confusionchart 作为函数执行: C:\Program Files\MATLAB\R2024a\toolbox\shared\mlearnlib\confusionchart.m 出错 untitled (第 78 行) confusionchart(cm, categories(testLabelsCategorical));
06-23
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值