Wikipedia:Reference desk/Archives/Computing/2015 May 31

From Wikipedia, the free encyclopedia
Computing desk
< May 30 << Apr | May | Jun >> June 1 >
Welcome to the Wikipedia Computing Reference Desk Archives
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


May 31[edit]

Desktop issue[edit]

I had installed windows 7 in my computer . Recently my desktop is shown black in the start screen. however I can use the right click in desktop and the background image is also shown. I had checked the desktop folder through the explorer and I saw all the folder added to desktop folder there but still all the file are invisible in the main desktop screen. How can I resolve it? AmRit GhiMire "Ranjit" 07:29, 31 May 2015 (UTC)[reply]

To me it sounds like you might need to reinstall Windows 7, as one of the files is corrupted. However, as this is a minor problem and a reinstall is a major effort, you might just live with your workaround, instead. StuRat (talk) 15:20, 31 May 2015 (UTC)[reply]
If the problem persists after restarting your computer, I would recommend first trying a System Restore (type "System Restore" in the Start menu) to a date before the problem was present, then "repairing" the installation using your Windows 7 installation disc (there should be an option for this after booting from the disc) before reinstalling Windows as a last resort.  — TORTOISEWRATH 20:12, 31 May 2015 (UTC)[reply]

How do I figure this ?[edit]

Duplicated on Maths Ref. Desk. Please answer there.
The following discussion has been closed by rojomoke. Please do not modify it.

I am trying to solve a Question in Statistics, for which we are using R and SAS, and it is about a Survey of a number of women, giving facts about themselves to determine whether or not they have Diabetes. We were given a Training Set of 200 people, then a test set of a further 332, and my understanding in Classification, is the training set is used to get a Model or equation to determine membership of either the group that has diabetes, or the one that does not. We assigned zero for no Diabetes, and 1 if the Lady did have Diabetes. We ran code given to us, and had to answer a number of questions which I did until the last, and this was to be given details of one extra woman, and to work out whether or not she either had diabetes or could be predicted to have it, and I am not sure how to do it. We carried out a Linear Discriminant Analysis, a Logistic Regression and a Quadratic Discriminant Analysis, and the summaries of the LDA and Logistic, which we are to use, are as follows, where below I have decided to show the whole Code :

                                  1. ## Assignment 4 # #################
# first, set the working directory to the data file location  (this can be easily done in RStudio Menu/Session/Set working directory or by using setwd("~/path to working directory/")) import the ' ' separated .txt files

> setwd("P:/STAT315") > pima<- read.table("pima.txt",header=TRUE) >pima$type <- factor(pima$type) > pima_test <- read.table("pima_test.txt", header=TRUE) > pima_test$type <- factor(pima_test$type) > # Linear Discriminant Analysis > library(MASS) > (pima_lda <- lda(type ~ npreg + glu + bp + skin + bmi + ped + age, data=pima, prior=c(0.66, 0.34))) Call : lda(type ~ npreg + glu + bp + skin + bmi + ped + age, data = pima, prior = c(0.66, 0.34)) Prior probabilities of groups: 0 1

   0.66 0.34 

Group means: npreg glu bp skin bmi ped age

 0   2.916667  113.1061   69.54545  27.20455  31.07424  0.4154848   29.23485
 1   4.838235  145.0588   74.58824  33.11765  34.70882  0.5486618   37.69118

Coefficients of linear discriminants: LD1 npreg 0.0794995781 glu 0.0240316424 bp -0.0018125857 skin -0.0008317413 bmi 0.0494891916 ped 1.2530603130 age 0.0314375125

# Variable tab the Name given to the two by two Table from the Pima Type Training Set as shown here

> tab <- table(pima$type, predict(pima_lda)$class)

# From the two by two in the Training Set Table of those with Diabetes and those Without, add              # Row One Column Two to Row Two Column one, then divide by Total Number of Women, to get #  the Training Error for the Linear Discriminant Analysis Model

> (tab[1,2] + tab[2,1])/sum(tab) [1] 0.23

  1. Variable tabtest the Name given to the two by two Table from the Pima Type Test Set as shown here

>tabtest<- table(pima_test$type, predict(pima_lda, newdata=pima_test)$class)

  1. From the two by two in the Test Set Table of those with Diabetes and those Without, add # Row One Column Two to Row Two Column one, then divide by Total Number of Women, in # order to obtain the Error on a Test Set for the Linear Discriminant Analysis Model

> (tabtest[1,2] + tabtest[2,1])/sum(tabtest) [1] 0.2018072

  1. Cross Validation using the Package ipred

> library(ipred) > mypredict.lda <- function(object, newdata) predict(object, newdata = newdata)$class > errorest(type ~ npreg + glu + bp + skin + bmi + ped + age, data=pima, model=lda, estimator="cv", predict=mypredict.lda, est.para=control.errorest(k=199)) Call: errorest.data.frame(formula = type ~ npreg + glu + bp + skin +

   bmi + ped + age, data = pima, model = lda, predict = mypredict.lda, 
   estimator = "cv", est.para = control.errorest(k = 199))
   199-fold cross-validation estimator of misclassification error 

Misclassification error: 0.245 > # Logistic Regression > lmod <- glm(type ~ npreg + glu + bp + skin + bmi + ped + age, data=pima, family=binomial()) > summary(lmod) Call: glm(formula = type ~ npreg + glu + bp + skin + bmi + ped + age, family = binomial(), data = pima) Deviance Residuals: Min 1Q Median 3Q Max -1.9830 -0.6773 -0.3681 0.6439 2.3154 Coefficients: Estimate Std. Error z value Pr(>|z|) (Intercept) -9.773062 1.770386 -5.520 3.38e-08 *** npreg 0.103183 0.064694 1.595 0.11073 glu 0.032117 0.006787 4.732 2.22e-06 *** bp -0.004768 0.018541 -0.257 0.79707 skin -0.001917 0.022500 -0.085 0.93211 bmi 0.083624 0.042827 1.953 0.05087 . ped 1.820410 0.665514 2.735 0.00623 ** age 0.041184 0.022091 1.864 0.06228 . Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 (Dispersion parameter for binomial family taken to be 1)

   Null deviance: 256.41  on 199  degrees of freedom

Residual deviance: 178.39 on 192 degrees of freedom AIC: 194.39 Number of Fisher Scoring iterations: 5 > pclass <- predict(lmod, newdata=pima_test, type="response") > 0.5 > pclass <- predict(lmod, newdata=pima_test, type="response") > tabtestlogistic <- table(pima_test$type, pclass) > (tabtestlogistic[1,2] + tabtestlogistic[2,1])/sum(tabtestlogistic) [1] 0.003012048

  1. Or :> pclass<-predict(lmod,newdata=pima_test,type="response")>.5

> tabtestlogistic <- table(pima_test$type, pclass) > (tabtestlogistic[1,2] + tabtestlogistic[2,1])/sum(tabtestlogistic) [1] 0.1987952

  1. This Time using the available Data to fit a Quadratic Discriminant Analysis Model

> setwd("P:/STAT315") > pima <- read.table("pima.txt", header=TRUE) > pima$type <- factor(pima$type) > pima_test <- read.table("pima_test.txt", header=TRUE) > pima_test$type <- factor(pima_test$type) > library(MASS)

  1. Setting up the Quadratic Discriminant Analysis Model

> (pima_qda <- qda(type ~ npreg + glu + bp + skin + bmi + ped + age, data=pima, prior=c(0.66, 0.34)))

  1. Summary of the Model

Call: qda(type ~ npreg + glu + bp + skin + bmi + ped + age, data = pima, prior = c(0.66, 0.34)) Prior probabilities of groups : 0 1

          0.66 0.34 

Group means : npreg glu bp skin bmi ped age

          0   2.916667 113.1061 69.54545  27.20455 31.07424  0.4154848  29.23485
          1   4.838235 145.0588 74.58824  33.11765 34.70882  0.5486618  37.69118
  1. Variable tabq the Name given to the two by two Table from the Pima Type Training Set as shown here, # but this time for the qda

> tabq <- table(pima$type, predict(pima_qda)$class)

  1. From the two by two in the Training Set Table of those with Diabetes and those Without, add # Row One Column Two to Row Two Column one, then divide by Total Number of Women, # this occasion to get the Training Error for the Quadratic Discriminant Analysis Model

> (tabq[1,2] + tabq[2,1])/sum(tabq) [1] 0.23

  1. Variable tabqtest is the Name given to the two by two Table from the Pima Type Test Set as shown here, # but now it is for the qda

> tabqtest <- table(pima_test$type, predict(pima_qda, newdata=pima_test)$class)

  1. From the two by two in the Test Set Table of those with Diabetes and those Without, add # Row One Column Two to Row Two Column one, then divide by Total Number of Women, # on this occasion to get the Error on a Test Set for the Quadratic Discriminant Analysis Model

> (tabqtest[1,2] + tabqtest[2,1])/sum(tabqtest) [1] 0.2289157

  1. Cross Validation using the Package ipred for Quadratic Discriminant Analysis

> library(ipred) > mypredict.qda <- function(object, newdata) predict(object, newdata = newdata)$class > errorest(type ~ npreg + glu + bp + skin + bmi + ped + age, data=pima, model=qda, estimator="cv", predict=mypredict.qda, est.para=control.errorest(k=199)) Call : errorest.data.frame(formula = type ~ npreg + glu + bp + skin +

   bmi + ped + age, data = pima, model = qda, predict = mypredict.qda, 
   estimator = "cv", est.para = control.errorest(k = 199))

199-fold cross-validation estimator of misclassification error

Misclassification error: 0.275

Now my understanding is that for the Logistic, I take the coefficients in the estimates column, and multiply each by the actual data values for this one particular woman, but I am not sure if I use the intercept all seven times, or once or not at all, then the number I find I raise to the power of e, and divide this by this same number to the power of e plus 1, to undo the logit ( expit ). The data for the woman in question is : npreg glu bp skin bmi ped age

5 111 81 33 25.1 0.36 58

which are the seven explanatory variables, and type, either 0 for no Diabetes and 1 for Diabetes, is the Response. In LDA we are told to take the coefficients and multiply each by the values for the woman above and see if it is greater than zero, which here it is, but I do not know what that signifies. I also did work in SAS, which gives two sets of coefficients, 0 for no Diabetes and 1 for Diabetes, and we multiply each of the woman's values by each of the coefficients, and here the value relevant to 0 was greater than the one I worked out for 1, so this suggests to me this Lady will not get Diabetes, or at least not be said to have it. This SAS Data is as follows : Calculations for 0 with respect to no Diabetes : -35.51043-0.17897×5+111×0.09573 +81×0.44203-0.26259×33+25.1× 0.96574 +.36× 4.78151 +0.14675×58 = 35.83263 While the Calculations to do with 1 for there being Diabetes present are as follows : -46.10679-0.05820×5+111×0.13224+81×0.43928-33×0.26386+1.04092×25.1+.36×6.68513+0.19451×58 = 34.97047 Also, I did not understand why in the training set there were some women that were misclassified, as well as in the Test Set, when I thought the Training set was meant to be good enough to predict the test set. Sorry for the longness of this Question. How do I sort this out ? Thanks Chris the Russian Christopher Lilly 11:10, 31 May 2015 (UTC)[reply]

Laptop graphics card upgrade[edit]

Is there any way I can upgrade the dedicated graphics card on my laptop?

Currently it is an ATI mobility radeon HD 3430, but the performance is lacklustre to say the least, especially at native 1650x1024. — Preceding unsigned comment added by 88.173.224.238 (talk) 11:11, 31 May 2015 (UTC)[reply]

While it may not be strictly impossible, it's very unlikely to be practically and economically feasible. Modern laptops are very tightly designed, both from a space and from a temperature/power point of view, and usually have few easily upgradable parts except for memory and mass storage. --Stephan Schulz (talk) 11:48, 31 May 2015 (UTC)[reply]
Agreed. Just opening it up is likely to break something. My suggestion, buy a new laptop and use the current one as a backup. StuRat (talk) 15:22, 31 May 2015 (UTC)[reply]
Many parts of many laptops are replaceable. I've replaced the LCD panel, keyboard, and fan/heat sink of my Thinkpad T40, which is now 11 years old and still a fine machine (2004 was roughly when CPU speeds flatlined). The laptops are designed to be disassembled in the field, and IBM/Lenovo provide detailed instructions about how to do it. But I don't think the CPU and GPU (graphics card) can be replaced, much less upgraded.
Of course, the original poster's laptop could be one of those ones where everything is soldered in place, even the RAM and hard drive. -- BenRG (talk) 19:37, 31 May 2015 (UTC)[reply]
Well, the release date of the ATI mobility radeon HD 3430 was 2008. That's closer to your 2004 laptop than to todays very densely packaged laptops. On the other hand, 2008 was also the release date of the MacBook Air. And my experience tells me that no, CPU speeds did not flatline in 2004. See Megahertz Myth. --Stephan Schulz (talk) 20:05, 31 May 2015 (UTC)[reply]
Indeed. Without knowing the model of the laptop it will be hard to assess its upgradeability.  — TORTOISEWRATH 20:09, 31 May 2015 (UTC)[reply]

Thanks, and I just wanted to add that it's an HP Compaq 6830s. And yes, I have also taken the whole thing apart screw by screw, bit by bit and I ended up with more screws than I remember starting with so certainly not worried about having another go. I just don't know if it's as easy as hot swapping the graphics board with another of the same series (3xxx)

Are parts like graphics card standardized? I would buy a broken 2nd laptop and break it for the card if I had to. — Preceding unsigned comment added by 88.173.224.238 (talk) 20:23, 31 May 2015 (UTC)[reply]

Graphics cards are standardized for desktops, but not really for laptops. A few high-end laptops have replaceable GPUs using MXM cards, but in most, they're built into the motherboard. And the motherboard designs are usually specific to a few similar laptop models. If there were multiple graphics options for the same model of laptop, you might be able to find a replacement motherboard with a better graphics card (and hopefully still find drivers for it), but it likely wouldn't be a huge improvement and would probably be fairly expensive. Mr.Z-man 13:04, 1 June 2015 (UTC)[reply]

Facebook "Photos of" broken?[edit]

I don't know if this is the right place to ask about Facebook, but recently I've been unable to view the "Photos of" section of just about any public Facebook page or group. The section for the page or group's own photos works all OK. The "Photos of" section just shows up empty. Is this happening to anyone else? JIP | Talk 19:26, 31 May 2015 (UTC)[reply]

Clear browser cache and reopen the www-browser. Check for unneccessary addons and toolbars and incompatibiliy of popup bockers. Always keep browser and Adobe Flash Player uptodate. Run %APPDATA%, change to the folder Roaming, delete the folder Macromedia.
When using Windows, get the recent Version of
Note this links are obsolete, when newer versions appear.
Check antivirus software. If expired, MS Security Essentials may be useful:
--Hans Haase (有问题吗) 13:33, 2 June 2015 (UTC)[reply]

looking for quiz generator[edit]

Hi there, I look for a quiz generator which has a users system,
and has some AI features, including learning which questions did the student get wrong and re-ask him.
The system needs to have a restrictions system, or a permission system, that monitors that only allowed users are able to use part of the questions.
The system must be written in php.
We're talking about web.
The system should be freeware.
Thanks. — Preceding unsigned comment added by Exx8 (talkcontribs) 19:33, 31 May 2015 (UTC)[reply]

Image scanner or digital camera[edit]

If you took care of all the details to obtain a photo of quality, could it reach the same level of quality as an image scanner? The article image scanner considers that digital cameras generate lower quality images. However, all problems named there ("a camera image is subject to a degree of distortion, reflections, shadows, low contrast, and blur due to camera shake (reduced in cameras with image stabilisation)") could be dealt with by an experienced photograph. Specially the last point could be better tackled with a tripod and not with image stabilization as claimed in the article. The article seems to be comparing a high-end scanner to a spontaneous photography, done with a pocket camera. --Llaanngg (talk) 20:31, 31 May 2015 (UTC)[reply]

Read: Scanning Backs. How they work--Aspro (talk) 20:54, 31 May 2015 (UTC)[reply]
Ah. As always... Wikipedia has an article Digital scan back. My old flat-bed scanner has far more capacity that the latest digital camera.--Aspro (talk) 20:59, 31 May 2015 (UTC)[reply]

How can I contact LinkedIn and get them to clean up the mess they've made?[edit]

A few days ago I established an accound on LinkedIn. My level of interest in having such an account was such that I'd have called off the whole thing for fifty cents. LinkedIn caused invitations to be sent to everyone I've ever exchanged email with on gmail. I would have disapproved that if it had been submitted for my approval. My communications with some people via gmail are delicate and this could have serious consequences. I wish to know:

  • How can I contact a person at LinkedIn responsible for fulfilling that organization's responsibilities?
  • Is there a quick way to get my account closed?
  • Would closing it now preclude setting up a new one?

Michael Hardy (talk) 21:14, 31 May 2015 (UTC)[reply]

Oh dear, Oh dear. You must be older than 14 then. Try starting here: Managing Account Settings. Next time don't open an account without the guidance of a grandchild who will guide you through the information jungle (where you are the quarry).--Aspro (talk) 21:36, 31 May 2015 (UTC)[reply]
You would have had to opt-out of this "email hijacking for spamming all your contacts thing." As it appears, Linkedin makes getting the authorization a feature by default of the registration process, and many users, like you, do not realize that all their friends, co-workers, clients, relatives, and former contacts, are receiving emails from LinkedIn from now on. Go to Your name -> Settings -> Groups, Companies & Applications > Privacy Controls and disable everything that's too intrusive. LinkedIn won't send just one email per contact, it will send several to try and get more users, if you don't know. Yppieyei (talk) 21:51, 31 May 2015 (UTC)[reply]
[1] tells you how to close your account. You can probably easily find this result by searching for 'closing linkedin account', as I did. Note that closing your account will probably still keep some data for 20 days [2] and possibly longer in backups. However people shouldn't be able to see that data on Linkedin. (They may still see it on search engines, there's nothing much Linkedin can do about that.) Linkedin will also stop contacting people on your behalf. I doubt that simply closing your account will stop you opening a new one in the future, but you'll need to read the T&C or contact Linkedin to be sure.
BTW whenever you connect some account somewhere be it Twitter, Facebook, Outlook.com, gmail or whatever to a third party service, you should always make sure you are clear about what you're actually authorising the third party service to do.
As for your first comment, I'm not sure if anyone can help you if you don't specify what responsibilities. Do you want their legal department? Are you in India and want to contact their Grievance Officer? Their CEO? Board of directors? Tech support department?
Nil Einne (talk) 17:07, 1 June 2015 (UTC)[reply]

Formal languages and the empty string[edit]

1. Why would we need an empty string? What could you not be able to express if you didn't work with such a concept? 2. Where does it appear, only at the beginning and end, or in a string like 'abcdef' is there an empty string between 'a' and 'b', 'b' and 'c' and so on? --Yppieyei (talk) 22:13, 31 May 2015 (UTC)[reply]

If the program asked the user to supply a string and the user merely press the enter/return key then the string returned to the program is an empty string. If there is no concept of empty string, how do you describe what the string the user gave the program? 175.45.116.105 (talk) 03:57, 1 June 2015 (UTC)[reply]
That's in the wrong direction. An empty string in programming is a string were the terminal character appears right away. The question is about an empty string in formal languages. --Llaanngg (talk) 12:08, 1 June 2015 (UTC)[reply]
1. I suppose it's easier on balance (requires fewer special cases) to treat ϵ as a string than not. If a language recognizer's initial state is also an accepting state, it's natural to say that it accepts the empty string; it would be odd to say that you have to leave and reenter that state before it counts, because that's otherwise never true of accepting states. The empty string is a valid program in many programming languages. 2. If "S appears between c and d in T" means that cSd is a substring of T, then yes, ϵ appears between every two characters. -- BenRG (talk) 04:44, 1 June 2015 (UTC)[reply]
You don't need it. And we don't need 0. The Greeks even developed a big chunk of their maths without a concept of 0. However, having such elements at hand makes more easy to define certain properties of elements. --Llaanngg (talk) 12:08, 1 June 2015 (UTC)[reply]
Whether you need 0 depends on what you want to do. You do need 0 if you want to be able to do arithmetic easily with pencil and paper (or quill pen and parchment). The use of Arabic numerals in place of Roman numerals, as described to Europeans by Fibonacci, caught on largely because it made it possible to do arithmetic with the quill pen, and to record the intermediate results, rather than using an abacus. You do need 0 as part of a place-value numeral system. As noted, the use of an empty string facilitates the implementation of formal languages by minimizing special cases. Robert McClenon (talk) 17:18, 1 June 2015 (UTC)[reply]
You don't really need a digit 0 for place-value arithmetic. You can use digits 1, 2, ..., 9, and T for ten. In fact that system is a bit more compact and elegant than the usual one in that every nonnegative integer has a unique representation as a digit string, unlike the usual system where 1, 01, 001, ... all denote the same number. The unique representation of zero in this system is the empty string. But if you don't need the integer zero, then you don't need the empty string either. -- BenRG (talk) 22:26, 1 June 2015 (UTC)[reply]