create a shuffleable datastore

조회 수: 1 (최근 30일)
FERNANDO CALVO RODRIGUEZ
FERNANDO CALVO RODRIGUEZ 2023년 3월 6일
댓글: Philip Brown 2023년 5월 4일
Good morning to all!
I am developing a neural network with deep network designer and for this I need a datastore. I have hundreds of numerical data in an excel table and I have converted it to a csv, which I transformed into a datastore with the following code:
DataTableTrain = tabularTextDatastore("TableTrain_Borrar.csv","VariableNamingRule","preserve");
NewDataTableTrain = transform(DataTableTrain, @(x) [cellfun(@transpose,mat2cell(x{:,1:end-1},ones(1,numTrain)),...
'UniformOutput',false) , mat2cell((x{:,end}),ones(1,numTrain))]);
When I write the function "isShuffleable" it throws a value 0 since it is not, so I don't explain how to create a datastore of this type. I have tried with the function "shuffle" but it tells me that all the cells must be shuffleable. I think that a datastore that is shuffleable has several advantages over one that is not, that's why I insist.
Thank you very much!

채택된 답변

Askic V
Askic V 2023년 3월 6일
A different approach would be to read csv file in a table and create datastore from the table.
this datastore issubsetable and therefore shuffleable:
T = readtable("airlinesmall.csv");
ds = arrayDatastore(T,"OutputType","same")
ds =
ArrayDatastore with properties: ReadSize: 1 IterationDimension: 1 OutputType: "same"
isSubsettable(ds)
ans = logical
1
isShuffleable(ds)
ans = logical
1
  댓글 수: 7
Askic V
Askic V 2023년 3월 9일
Great, thank you. It will be useful for anyone who has similar problem.
Philip Brown
Philip Brown 2023년 5월 4일
Were you able to make use of this doc page: https://uk.mathworks.com/help/deeplearning/ug/import-data-into-deep-network-designer.html - was it any help?

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기

제품


릴리스

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by