<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none"><!-- p { margin-top: 0px; margin-bottom: 0px; } @font-face { font-family: AvenirNextRegular; src: url("chrome-extension://bmikpgodpkclnkgmnpphehdgcimmided/fonts/AvenirNextLTPro-Regular.otf") format("opentype"); font-weight: normal; font-style: normal; } @font-face { font-family: AvenirNextBold; src: url("chrome-extension://bmikpgodpkclnkgmnpphehdgcimmided/fonts/AvenirNextLTPro-Bold.otf") format("opentype"); font-weight: bold; font-style: normal; } .myki-preloader-input { transform: translateX(0px) !important; } @font-face { font-family: Calibri; } p.MsoNormal, li.MsoNormal, div.MsoNormal { margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; } a:link, span.MsoHyperlink { color: blue; text-decoration: underline; } a:visited, span.MsoHyperlinkFollowed { color: purple; text-decoration: underline; } span.E-MailFormatvorlage17 { font-family: Calibri, sans-serif; color: windowtext; } .MsoChpDefault { font-family: Calibri, sans-serif; } @page WordSection1 { margin: 70.85pt 70.85pt 2cm; } div.WordSection1 { }--></style>
</head>
<body dir="ltr" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>Dear Kirsten,</p>
<p><br>
</p>
<p>I could not replicate your error with the MVPAlight toolbox. Could you post the code you used on the tutorial data that gave you the error?</p>
<p><br>
</p>
<p>Best,</p>
<p>Sophie<br>
</p>
<div style="color: rgb(33, 33, 33);">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> fieldtrip <fieldtrip-bounces@science.ru.nl> on behalf of Herfurth, Kirsten <Kirsten.Herfurth@uk-erlangen.de><br>
<b>Sent:</b> Tuesday, May 7, 2019 1:08 PM<br>
<b>To:</b> fieldtrip@science.ru.nl<br>
<b>Subject:</b> [FieldTrip] Error occurs when applying searchgrid for lambda in MVPA light toolbox</font>
<div> </div>
</div>
<div>
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US">Dear fieldtrip developers,</span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US">I’m extremely enthusiastic about the newly implemented MVPA light toolbox on fieldtrip, thanks a lot! I’m trying out logistic regression on my data and would like to do a search grid for lambda
with cfg.mvpa.param.lambda = ‘auto’. However, I get the following error message in line 433 of train_logreg.m when calculating the gradient g = ((cfg.weights .* sigma)' * YX)'/N - sumyxN + lambda * w: matrix dimensions must agree.</span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US">If I just pass one value for lambda, it works fine.
</span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US">The same error occurs with the tutorial data. Here, cfg.weights has a 100x1 dimension, and sigma is 80x1 in size. I’m using Matlab 2017b and the most recent fieldtrip 2019-04-19 version.</span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt; font-family:"Courier New"; color:black"> </span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US">I don’t know where to fix this and would be very grateful for your help.</span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US"> </span></p>
<p class="MsoNormal" style="text-autospace:none">Best wishes,</p>
<p class="MsoNormal" style="text-autospace:none"> </p>
<p class="MsoNormal" style="text-autospace:none">Kirsten Herfurth</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"><span lang="EN-US">Post-Doc at the MEG-lab in Erlangen, Germany</span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<p class="MsoNormal"><span style=""> </span></p>
<p class="MsoNormal"><span style=""> </span></p>
<p class="MsoNormal"> </p>
</div>
</div>
</div>
</body>
</html>