# How to load own data set into neural network?

Original Source Here

# How to load own data set into neural network?

Hi,

I am fairly new to MATLAB and I would like help in understanding about datasets. For classification in neural network, the example for wine classification show:

[x,t] = wine_dataset;

size(x)

size(t)

net = patternnet(10);

view(net)

I have a dataset of input [8×4]matrix and target [4×4]matrix. How do I input this into neural network such that I can use the function patternnet?

Matlabsolutions.com provide latest MatLab Homework Help,MatLab Assignment Help for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research.

Exactly as indicated in

help patternnet

and

doc patternnet

where

x = yourinput;

t = yourtarget; % target columns should be unit vectors with a single 1

DOCUMENTATION BUG: the default input is (10,’trainscg’) NOT (20,’trainlm’)!

close all, clear all, clc

`[ x, t ] = iris_dataset; [ I N ]  = size(x)         % [ 4 150 ] [ O N ]  = size(t)         % [ 3 150 ] trueclass  = vec2ind(t); MSE00  = mean(var(t',1)) % 0.222 biased MSE for naive constant output model MSE00a = mean(var(t',0)) % 0.224 unbiased MSE for naive constant output model Ntrn    = N - 2*(0.15*N) % 105 default size of training set Ntrneq  = Ntrn*O         % 315 Number of training equations`

% Nw = (I+1)*H+(H+1)*O % No. of unknown weights for H hidden nodes