tag:blogger.com,1999:blog-5952320191615496730.comments2017-08-16T19:49:17.890+01:00The Beginner ProgrammerMicnoreply@blogger.comBlogger101125tag:blogger.com,1999:blog-5952320191615496730.post-34765004957584458892017-08-12T16:08:13.197+01:002017-08-12T16:08:13.197+01:00In my example I have 50000 states .... and I got m...In my example I have 50000 states .... and I got memory error.بنت النورhttps://www.blogger.com/profile/11912371805859330484noreply@blogger.comtag:blogger.com,1999:blog-5952320191615496730.post-2410833298963105032017-08-06T14:24:30.059+01:002017-08-06T14:24:30.059+01:00Hi kpankaj, thanks for your kind comment! This pos...Hi kpankaj, thanks for your kind comment! This post is a bit old, a few changes have happened to my hard drive and I am afraid the tensorflow model has been lost somewhere in the backups I made (unless I have already posted it). However, I've got something better, if you'd like to learn the basics of Tenorflow, just follow Sentdex's videos, he's very good at explaining this stuff, I'd recommend him to everyone who starts out. Here's the link https://youtu.be/oYbVFhK_olY?list=PLQVvvaa0QuDfKTOs3Keq_kaG2P55YRn5vMichttps://www.blogger.com/profile/18151225177833588981noreply@blogger.comtag:blogger.com,1999:blog-5952320191615496730.post-50252124953798040962017-08-06T07:21:49.427+01:002017-08-06T07:21:49.427+01:00Hi Mic,
thanks a lot, your post is easy to follow...Hi Mic,<br /><br />thanks a lot, your post is easy to follow and understand...referring to you last statement, can you share the detail in similar manner on tensor flow model you developed, please!kpankajhttps://www.blogger.com/profile/02966937657242726416noreply@blogger.comtag:blogger.com,1999:blog-5952320191615496730.post-44806460781673753302017-08-06T06:51:53.370+01:002017-08-06T06:51:53.370+01:00Hi, Thanks a lot for sharing this, please help wit...Hi, Thanks a lot for sharing this, please help with the dataset require to replicate this i.e. dogs_resized ..<br /><br />Unknownhttps://www.blogger.com/profile/02966937657242726416noreply@blogger.comtag:blogger.com,1999:blog-5952320191615496730.post-65633078927196723232017-06-30T21:39:26.830+01:002017-06-30T21:39:26.830+01:00Hi Dimri, thanks for reading the post! Sorry for m...Hi Dimri, thanks for reading the post! Sorry for my late reply. I had a bit of a struggle too when installing Mxnet.<br /><br />Yes changing the seed should (generally) give you roughly similar accuracy results. But it may also not: it can also happen that a particular combination of test sample happened to contain particularly critical tests for the model, for instance you trained on a training set of 5 different pictures and the classifier always struggles with picture 1 (let's say it always gets 20% accuracy on it). By chance and by splitting randomly the testing set you got a testing set of 90% picture 1 samples. Now it may easily look that your classifier has an accuracy of around 20% while instead that result is simply driven by a biased testing set.<br /><br />In order to partly account for this problem and to get a better estimate of how good your model is performing, a cross validation may help testing that scenario.Michttps://www.blogger.com/profile/18151225177833588981noreply@blogger.comtag:blogger.com,1999:blog-5952320191615496730.post-80904209148302427872017-06-30T21:26:20.317+01:002017-06-30T21:26:20.317+01:00Hi, there seems to be an error in the indexing pro...Hi, there seems to be an error in the indexing process, try to start debugging there.Michttps://www.blogger.com/profile/18151225177833588981noreply@blogger.comtag:blogger.com,1999:blog-5952320191615496730.post-91041457067978112332017-06-30T21:03:26.904+01:002017-06-30T21:03:26.904+01:00Hi, I was able to fix "Mxnet" issue ment...Hi, I was able to fix "Mxnet" issue mentioned in my previous comment. <br /><br />It ran perfectly and gave similar results. However, when I changed the seed from 100 to some other number (Just before shuffling itno training and testing), I get an accuracy of 0.325. <br /><br />Isn't it supposed to be somewhat similar of model is working fine ?<br />Am I missing on something ?RISHABH DIMRIhttps://www.blogger.com/profile/15170512421288647760noreply@blogger.comtag:blogger.com,1999:blog-5952320191615496730.post-29737975693674276042017-06-28T16:32:59.962+01:002017-06-28T16:32:59.962+01:00Hi,
First of all thanks for this post. Very infor...Hi,<br /><br />First of all thanks for this post. Very informative.<br />I am struggling to install "mxnet" package in my R. <br /><br />Could you please guide what needs to be done in order to use it. <br />RISHABH DIMRIhttps://www.blogger.com/profile/15170512421288647760noreply@blogger.comtag:blogger.com,1999:blog-5952320191615496730.post-70496103164053213832017-06-27T09:10:03.154+01:002017-06-27T09:10:03.154+01:00Hey, I am getting error in Q learning formula.The ...Hey, I am getting error in Q learning formula.The error is " too many indices for array".How to solve that?Vishwas Paihttps://www.blogger.com/profile/10159247864555712567noreply@blogger.comtag:blogger.com,1999:blog-5952320191615496730.post-86416211812351988682017-06-19T22:44:14.210+01:002017-06-19T22:44:14.210+01:00Hi, the idea was to have a look at the signal in t...Hi, the idea was to have a look at the signal in the frequency domain using the fast fourier transform. As far as I know, a FIR system/filter is a different thing.Michttps://www.blogger.com/profile/18151225177833588981noreply@blogger.comtag:blogger.com,1999:blog-5952320191615496730.post-79204131770362441782017-06-17T19:31:21.135+01:002017-06-17T19:31:21.135+01:00Isn't this is what is called FIR filter? Only,...Isn't this is what is called FIR filter? Only, you avoid the FFT -- > IFFT, just do convolution.Debrajhttps://www.blogger.com/profile/07329208979141534447noreply@blogger.comtag:blogger.com,1999:blog-5952320191615496730.post-28991786119171337912017-05-23T18:42:44.855+01:002017-05-23T18:42:44.855+01:00Hi, so for my final table all my predicted labels ...Hi, so for my final table all my predicted labels are marked as 1, why is that? i guess that is what preventing from the final result be similar to yoursOmer Manhttps://www.blogger.com/profile/06408219117728181210noreply@blogger.comtag:blogger.com,1999:blog-5952320191615496730.post-88045476667689526242017-05-21T20:59:34.150+01:002017-05-21T20:59:34.150+01:00Hi Ola, it seems that the problem is that in your ...Hi Ola, it seems that the problem is that in your example you're passing to the copula::mvdc function an object that is not of class "parCopula". The "mardia" argument is not a copula from the copula package but (probably) a numeric vector. More generally, since the "mardia" object seems to have been generated using the function copBasic::asCOP, I think that the packages copBasic and copula may not be compatible with each other. This means that if you build the Mardia copula with the copBasic package functions, it probably won't be accepted as an argument in most of the functions in the copula (and probably vinecopula too) package.<br /><br />My suggestion is to clearly define what your goal and steps are, then look for a suitable R package and stick to it. If you have specific questions on your project, you can try to ask on CrossValidated (https://stats.stackexchange.com/). People there are usually very competent in their subjects and nice, although I must say there's not that much on copulas there either.<br /><br />As a last suggestion, if you are doing this for work or study, I suggest you to get in contact with some good university professor/PhD that might be willing to help with the project (Masters student in stats might be interested in writing a thesis on an R implementation of the mardia copula and related functions/tests/applications). <br /><br />I wish you all the best.<br />MicMichttps://www.blogger.com/profile/18151225177833588981noreply@blogger.comtag:blogger.com,1999:blog-5952320191615496730.post-45084741174197382842017-05-19T22:26:08.067+01:002017-05-19T22:26:08.067+01:00Hi Mic, thank you for your quick response. That...Hi Mic, thank you for your quick response. That's great that I have possibility to speak with you! Yes, you're right, I read documentation for "copula" and "VineCopula" many times and there is no mention about Mardia. I've tried to put formula for Mardia copula and then built bivariate distirbution with specified marginals in the fallowing way:<br />> df<-read.table("R_popr.txt", header = TRUE)<br />> xy<-df[,c("x","y")]<br />> m<-pobs(xy$x)<br />> mm<-pobs(xy$y)<br />fun<-function(u,v) 0.1*u*v+0.4*max(0,u+v-1)+0.5*min(u,v)<br />mardia<-asCOP(m,mm,fun)<br />mycdf<-mvdc(mardia, margins = c("exp","exp"), paramMargins = list(list(rate=2),list(rate=2))))<br /><br />but I got error:<br />Error in validObject(.Object) : <br /> invalid class “mvdc” object: invalid object for slot "copula" in class "mvdc": got class "numeric", should be or extend class "parCopula"<br />As we see, the two datasets have a similar structure. This is evidence that the proposed model is appropriate.<br /><br /><br />Could you please advise on above?<br /><br />Also, I tried to compare empirical copula with the theoretical one, but I encouner the problem. It is easy to use cdfcomp when argument ft is a list of "fitdist" objects - so for example in case of fitting copula without specified marginals, but it is no possible to compare distributions of object mvdc using cdfcomp. Do you know how the comparison of pdf's can be done for mvdc object? The same problem is with gofCopula.<br /><br />Sorry that I have so many questions to you :)<br /><br />Thank you,<br />OlaAleksandra Piórkowskahttps://www.blogger.com/profile/08619733351123134181noreply@blogger.comtag:blogger.com,1999:blog-5952320191615496730.post-20548293067869236732017-05-15T15:46:36.106+01:002017-05-15T15:46:36.106+01:00Hi Ola! Glad to know you found it useful! As far a...Hi Ola! Glad to know you found it useful! As far as I know the best copula packages in R should be "copula" and "VineCopula". Both packages feature Archimedean copulas. In the documentation, however, there seems to be no mention about Mardia's. Maybe you can ask the developers if they plan to add that particular copula.Michttps://www.blogger.com/profile/18151225177833588981noreply@blogger.comtag:blogger.com,1999:blog-5952320191615496730.post-8716602237236726562017-05-14T21:52:22.450+01:002017-05-14T21:52:22.450+01:00Hi Mic! It was really useful for me. Thanks for th...Hi Mic! It was really useful for me. Thanks for that! <br />I've started working with R 2 weeks ago and I am consider if there is Mardia copula also in some package?<br /><br />Thanks!<br />OlaAleksandra Piórkowskahttps://www.blogger.com/profile/08619733351123134181noreply@blogger.comtag:blogger.com,1999:blog-5952320191615496730.post-66445125022033774132017-05-04T16:54:52.369+01:002017-05-04T16:54:52.369+01:00I've always been taught that inter-arrival tim...I've always been taught that inter-arrival times (think of people in a shop or even failures in mechanical components) can, and sometimes are modeled through the use of the exponential distribution. This was a simple attempt at doing that. By taking a look at the histograms of the data, I assumed the distribution was close enough to an exponential and went on from there. I didn't run any goodness of fit test but simply fit the distribution, simulate some data and compared them with the original. <br /><br />If you were to use such model in a real-life context for taking decisions, a more in-depth analysis may be a better option. For instance, your test showed that a Weibull distribution might be a better fit given the data at hand. Using the Weibull (which by the way I think is used in reliability engineering too!) would probably lead to simulated data closer to the real one.Michttps://www.blogger.com/profile/18151225177833588981noreply@blogger.comtag:blogger.com,1999:blog-5952320191615496730.post-71326051686174458702017-05-04T04:47:28.837+01:002017-05-04T04:47:28.837+01:00why do you think the results differ, your analysis...why do you think the results differ, your analysis suggests it to be exponential distribution...Amolhttps://www.blogger.com/profile/06091657848165747896noreply@blogger.comtag:blogger.com,1999:blog-5952320191615496730.post-74643245451589170922017-05-03T20:54:12.435+01:002017-05-03T20:54:12.435+01:00Hi Amol, thanks for sharing the results!Hi Amol, thanks for sharing the results!Michttps://www.blogger.com/profile/18151225177833588981noreply@blogger.comtag:blogger.com,1999:blog-5952320191615496730.post-31882867144974146812017-05-03T17:47:22.699+01:002017-05-03T17:47:22.699+01:00I ran the data provided by you to identify the typ...I ran the data provided by you to identify the type of data it exactly is in minitab and it shows it to be 3-Parameter Weibull.<br /><br />Goodness of Fit Test<br /><br />Distribution AD P LRT P<br />Normal 3.101 <0.005<br />Lognormal 0.455 0.262<br />3-Parameter Lognormal 0.215 * 0.128<br />Exponential 1.923 0.011<br />2-Parameter Exponential 1.416 0.032 0.012<br />Weibull 0.339 >0.250<br />3-Parameter Weibull 0.272 >0.500 0.132<br />Smallest Extreme Value 7.958 <0.010<br />Largest Extreme Value 0.644 0.091<br />Gamma 0.196 >0.250<br />3-Parameter Gamma 0.185 * 0.360<br />Logistic 1.531 <0.005<br />Loglogistic 0.383 >0.250<br />3-Parameter Loglogistic 0.319 * 0.578Amolhttps://www.blogger.com/profile/06091657848165747896noreply@blogger.comtag:blogger.com,1999:blog-5952320191615496730.post-72006116755644690532017-04-21T12:59:25.363+01:002017-04-21T12:59:25.363+01:00Hi Maarten! Thanks!Indeed they are quite challengi...Hi Maarten! Thanks!Indeed they are quite challenging! I'm a bit rusty when it comes to VaR, however, I believe that having the pdf, the cdf and being able to simulate observations should be enough to start. Having said this, you need to make some assumption about the distribution of the returns/indeces/phoenomena that you are trying to model, choose the copula, fit it, then get the multivariate distribution that in my code I called "my_dist". Once you're there, you can get the density using dMvdc, the cdf using pMvdc and simulate observations using rmvdc (for instance for a Monte Carlo VaR). Michttps://www.blogger.com/profile/18151225177833588981noreply@blogger.comtag:blogger.com,1999:blog-5952320191615496730.post-21159344105357914532017-04-20T18:25:27.549+01:002017-04-20T18:25:27.549+01:00Hi Mic! Nice post! I still have a question though....Hi Mic! Nice post! I still have a question though..I'm also currently working on a project where I have to calculate VaR of different market indices for different periods after fitting several copulas. However, copulas have proven to be quite a challenge for an average master student. My code returns the same VaR for all the periods..so clearly I'm missing/overlooking something..can you tell me where (in your explanation) I should apply VaR? <br />Thanks!Maarten Vanzieleghemhttps://www.blogger.com/profile/08221048349567688861noreply@blogger.comtag:blogger.com,1999:blog-5952320191615496730.post-16012507201130034222017-04-13T06:41:43.888+01:002017-04-13T06:41:43.888+01:00I really appreciate information shared above. It’s...I really appreciate information shared above. It’s of great help. If someone want to learn Online (Virtual) instructor lead live training in R Tool, kindly contact us http://www.maxmunus.com/contact<br />MaxMunus Offer World Class Virtual Instructor led training on R Tool. We have industry expert trainer. We provide Training Material and Software Support. MaxMunus has successfully conducted 100000+ trainings in India, USA, UK, Australlia, Switzerland, Qatar, Saudi Arabia, Bangladesh, Bahrain and UAE etc.<br />For Demo Contact us:<br />Name : Arunkumar U <br />Email : arun@maxmunus.com<br />Skype id: training_maxmunus<br />Contact No.-+91-9738507310<br />Company Website –http://www.maxmunus.com<br /><br /><br />Arun Kumarhttps://www.blogger.com/profile/12925256203702412312noreply@blogger.comtag:blogger.com,1999:blog-5952320191615496730.post-52629399853845937652017-04-06T17:42:06.847+01:002017-04-06T17:42:06.847+01:00This comment has been removed by the author.Unknownhttps://www.blogger.com/profile/12556978141696702330noreply@blogger.comtag:blogger.com,1999:blog-5952320191615496730.post-50954612217968604902017-04-06T13:08:53.772+01:002017-04-06T13:08:53.772+01:00Thanks. It's a nice post about probability de...Thanks. It's a nice post about <a href="http://www.actucation.com/calculus-2/advanced-definite-integration/probability-distribution/probability-on-random-distribution" rel="nofollow">probability density function</a>. I really like it :). It's really helpful. Good job.Deepak Suwalkahttps://www.blogger.com/profile/16838354928057786238noreply@blogger.com