load iris_data.mat P_train = []; T_train = []; P_test = []; T_test = []; for i = 1:3 temp_input = features((i-1)*50+1:i*50,:); temp_output = classes((i-1)*50+1:i*50,:); n = randperm(50); P_train = [P_train temp_input(n(1:40),:)']; T_train = [T_train…
%ELM:ELM基于近红外光谱的汽油测试集辛烷值含量预测结果对比—Jason niu load spectra_data.mat temp = randperm(size(NIR,1)); P_train = NIR(temp(1:50),:)'; T_train = octane(temp(1:50),:)'; P_test = NIR(temp(51:end),:)'; T_test = octane(temp(51:end),:)'; N = size(P_test,2); [Pn_tra…
load spectra_data.mat temp = randperm(size(NIR,1)); P_train = NIR(temp(1:50),:)'; T_train = octane(temp(1:50),:)'; P_test = NIR(temp(51:end),:)'; T_test = octane(temp(51:end),:)'; N = size(P_test,2); net = newrbe(P_train,T_train,0.3); w1=net.iW{1,1}…
load iris_data.mat P_train = []; T_train = []; P_test = []; T_test = []; for i = 1:3 temp_input = features((i-1)*50+1:i*50,:); temp_output = classes((i-1)*50+1:i*50,:); n = randperm(50); P_train = [P_train temp_input(n(1:40),:)']; T_train = [T_train…
load spectra_data.mat plot(NIR') title('Near infrared spectrum curve—Jason niu') temp = randperm(size(NIR,1)); P_train = NIR(temp(1:50),:)'; T_train = octane(temp(1:50),:)'; P_test = NIR(temp(51:end),:)'; T_test = octane(temp(51:end),:)'; N = size(P_…
import tensorflow as tf import numpy as np import matplotlib.pyplot as plt #Import MNIST data from tensorflow.examples.tutorials.mnist import input_data mnist=input_data.read_data_sets("/niu/mnist_data/",one_hot=False) # Parameter learning_rate…
load spectra; temp = randperm(size(NIR, 1)); P_train = NIR(temp(1:50),:); T_train = octane(temp(1:50),:); P_test = NIR(temp(51:end),:); T_test = octane(temp(51:end),:); [PCALoadings,PCAScores,PCAVar] = princomp(NIR); figure percent_explained = 100 *…
版权声明:本文为博主原创文章,转载 请注明出处:https://blog.csdn.net/sc2079/article/details/90480140 - 写在前面 本科毕业设计终于告一段落了.特写博客记录做毕业设计(路面裂纹识别)期间的踩过的坑和收获.希望对你有用. 目前有: 1.Tensorflow&CNN:裂纹分类 2.Tensorflow&CNN:验证集预测与模型评价 3.PyQt5多个GUI界面设计 本篇博客主要是评估所训练出来的CNN分类模型的性能.主要有几点:验证集预测.…
load concrete_data.mat n = randperm(size(attributes,2)); p_train = attributes(:,n(1:80))'; t_train = strength(:,n(1:80))'; p_test = attributes(:,n(81:end))'; t_test = strength(:,n(81:end))'; [pn_train,inputps] = mapminmax(p_train'); pn_train = pn_tra…
使用sklearn进行数据挖掘系列文章: 1.使用sklearn进行数据挖掘-房价预测(1) 2.使用sklearn进行数据挖掘-房价预测(2)-划分测试集 3.使用sklearn进行数据挖掘-房价预测(3)-绘制数据的分布 4.使用sklearn进行数据挖掘-房价预测(4)-数据预处理 5.使用sklearn进行数据挖掘-房价预测(5)-训练模型 6.使用sklearn进行数据挖掘-房价预测(6)-模型调优 上一节我们对数据集进行了了解,知道了数据集大小.特征个数及类型和数据分布等信息.做数据…