text:
# Logistic regression, “sum” confidence interval

I have an existing fitted logit regression model.

Model:

$\hat{p}(x)=\frac{1}{1+e^{-\hat{\beta}x}}$

With parameter estimates $\hat{\beta}$, and observation $x$

Given a new set of datapoints $x_1,\ldots,x_n$ and $o_1,\ldots,o_n$, I want to construct a confidence interval for $E=\sum_i \hat{p}(x_i)$. To goal is to check if $O=\sum_i o_i$ is (not) significantly different.

For a single observation, you can construct a confidence interval for the probability quite easily. Given $\hat{\beta}$ is normally distributed, and the confidence interval for these estimates is ($\hat{\beta}_{0.025}, \hat{\beta}_{0.975}$), the confidence interval for the predictor is: ($\frac{1}{1 + e^{-\hat{\beta}_{0.025}x}}$, $\frac{1}{1 + e^{-\hat{\beta}_{0.975}x}}$).

Is there a good way to get the confidence interval for the "sum" of the predicted probabilities?

• Ummm, $\hat{\beta}$ are not variables, they are parameter estimates. And $x$ is usually regarded as a matrix of independent variables (each observation includes both the DV and these IVs). – Peter Flom - Reinstate Monica Jun 10 '13 at 11:28
• You're right. I think this edit makes things clear enough. In my case, $x$ is relatively simple, just the intercept and some observations as a vector. – Tim Jun 10 '13 at 11:53
• It looks like you should instead be asking for a prediction interval for $O$, assuming your $o_i$ are the (binary) observations corresponding to the $x_i$. ($E$ itself has little direct relevance to your question; in particular, a CI for $E$ does not translate into an interval for $O$.) – whuber Jun 10 '13 at 14:31
• Yes, the $o_i$ are binary observations. But given that you know the distribution of $\hat{p}$, and because the model parameters $\hat{B}$ are estimated from a much larger sample (in this case), wouldn't it make more sense to estimate an interval around E? Why doesn't it translate? I am tempted to just do a bootstrap interval and be done with it. – Tim Jun 10 '13 at 14:59

One possible solution is to use a boot strapping approach, given the new set of data points, to construct a boot strap estimate and confidence interval for $\sum_i\hat p(x_i)$

set.seed(44)

#Pseudo Data
prob = .2
x = sort(rnorm(100))
y = rbinom(100,1,prob)

#Fit the logistic regression model
model = glm(y~x,family="binomial")

#More data arrives
x.new = rnorm(10000)

#The number of bootstrap samples
B = 10000

sum.p = rep(NA,)
for(i in 1:B){
#Create a bootstrap sample
x.boot = sample(x.new,length(x.new)*.1,replace=TRUE)

#Calculate the sum of p
sum.p[i] = sum(1/(1+exp(-(model$coef[1]+model$coef[2]*x.boot))))
}

#Get the 2.5% and 97.5% quantile from the bootstrap estimator
lower = quantile(sum.p,prob=.025)
upper = quantile(sum.p,prob=.975)

#Construct a 95% confidence interval
ci = c(lower,upper)

An alternative method would be to take a Bayesian approach and recaculate $\sum_i\hat p(x_i)$ for every sample of $\beta$ at every step of an MCMC type algorithm. Then at the end of our MCMC we would have a sample of $\sum_i\hat p(x_i)^{(j)}$ for every $j^{th}$ step of the MCMC that we could take the quantiles of in order to obtain our 95% confidence interval for $\sum_i\hat p(x_i)$ .

# Using Scortchi's Suggestion here is the revised code:

#Scortchi's suggestion
set.seed(44)
prob = .2

#More data arrives
x.new = rnorm(10000)
y.new = rbinom(10000,1,prob)

#The number of bootstrap samples
B = 10000

sum.p = rep(NA,B)
for(i in 1:B){
#Create a bootstrap sample
index = sample(1:length(x.new),length(x.new)*.1,replace=TRUE)
x.boot = x.new[index]
y.boot = y.new[index]

model = glm(y.boot~x.boot,family="binomial")

#Calculate the sum of p
sum.p[i] = sum(1/(1+exp(-(model$coef[1]+model$coef[2]*x.boot))))
}

#Get the 2.5% and 97.5% quantile from the bootstrap estimator
lower = quantile(sum.p,prob=.025)
upper = quantile(sum.p,prob=.975)

#Construct a 95% confidence interval
ci = c(lower,upper)

Now interestingly, the confidence interval from using Scortchi's suggestion results in

> ci
2.5% 97.5%
174   223

where as using my original code we obtain the following:

> ci
2.5%    97.5%
242.4727 247.0230

So there is clearly a difference between the two methods.

• Looks promising. While I'm absorbing this, please tell me whether there's a missing "-" in the line below "#Calculate the sum of p". – rolando2 Aug 31 '13 at 2:29
• Good catch. That would make my confidence interval look more reasonable too :) – user25658 Aug 31 '13 at 2:32
• @BabakP, correct me if I am wrong. Shouldn't the x.new be drawn from the same normal distribution rather than a binomial distribution? – Jerry Aug 31 '13 at 19:59
• This seems to be answering the question "What's the distribution of the sum of predicted probabilities given a randomly-drawn predictor vector & known coefficients?". I think the OP wanted to know how to transform uncertainty in estimated coefficients to uncertainty in the sum of predicted probabilities given a known predictor vector. Though @whuber's surely right in saying that what the OP ought to want to know is a prediction interval. – Scortchi - Reinstate Monica Sep 1 '13 at 20:22
• @Scortchi, I guess I do not get that interpretation when I read the question since they state that they have parameter estimates $\hat \beta$ and $x$. Never the less, if you want to change it to what you are saying then just make the simple adjustment of re-estimating the model parameters each time inside of the for-loop with each bootstrap sample. Not sure why we need to fuss with this anyway though. – user25658 Sep 1 '13 at 22:43


text:
0
Q:

# If the radius of a circle is decreased by 50% , find the percentage decrease in its area.

 A) 75% B) 65% C) 35% D) 25%

Answer:   A) 75%

Explanation:

let original radius = r and  new radius = (50/100) r = r/2

original area = $πr2$ and new area = $πr/22$

decrease in area =  $3πr2/4$*$1πr2$ *100 = 75%

Q:

The lengths of the diagonals of a rhombus are 16 cm and 12 cm. Its area is:

 A) 48 cm2 B) 28 cm2 C) 69 cm2 D) 96 cm2

Answer & Explanation Answer: D) 96 cm2

Explanation:
Report Error

0 655
Q:

In a triangle, if the measures of two sides are 5 cm and 8 cm, then the third side can be:

 A) 3 cm B) 14 cm C) 2 cm D) 4 cm

Answer & Explanation Answer: D) 4 cm

Explanation:
Report Error

0 725
Q:

In the given figure, if

 A) 8 cm B) 9 cm C) 11 cm D) 10 cm

Answer & Explanation Answer: B) 9 cm

Explanation:
Report Error

0 408
Q:

In the given figure, $∠APO=35°$ if then which of the following options is correct?

 A) ∠APB = 60° B)  ∠APB = 80° C)  ∠APB = 35° D) ∠APB = 55°

Answer & Explanation Answer: C)  ∠APB = 35°

Explanation:
Report Error

0 693
Q:

The area of a semicircle is 77 sq.cm. Calculate its perimeter (in cm)

 A) 72 B) 49 C) 98 D) 36

Answer & Explanation Answer: D) 36

Explanation:
Report Error

0 739
Q:

The length of the diagonal and the breadth of a rectangle is 25 cm and 7 cm respectively. Calculate its area (in sq.cm)

 A) 336 B) 168 C) 240 D) 480

Answer & Explanation Answer: B) 168

Explanation:
Report Error

0 111
Q:

The area of an equilateral triangle is 18√3 sq.units. Find the value of side (in units) of the triangle.

 A) √2 B) 2√2 C) 3√2 D) 6√2

Answer & Explanation Answer: D) 6√2

Explanation:
Report Error

0 93
Q:

An arc length of 16$π$ units subtends an angle of 240 degrees. Find the radius 9in units) of the circle.

 A) 6 B) 12 C) 24 D) 36

Answer & Explanation Answer: B) 12

Explanation:
Report Error

0 99

format: plain


text:
# How do you differentiate arctan(sinx)?

$y ' = \frac{1}{1 + {\sin}^{2} x} \cos x$
The derivative of arctan u is $\frac{1}{1 + {u}^{2}}$. When u is $\sin \left(x\right)$ it is simply $\frac{1}{1 + {\sin}^{2} x}$. The derivative of $\sin \left(x\right)$ is $\cos x$. Multiplying both yields
$y ' = \frac{1}{1 + {\sin}^{2} x} \cos x$


text:
# Issue with saving image file onto server from client machine

I am using the below code to Upload an Image file to a SharePoint Document Library. The code works fine locally but once deployed to server, i get the Exception as file not found.

                String fileToUpload = FlUpldImage.PostedFile.FileName; //@"C:\Users\admin.RSS\Desktop\Photos\me_skype.jpg";
String documentLibraryName = "SiteAssets";

SPFolder myLibrary = web.Folders[documentLibraryName];

Boolean replaceExistingFiles = true;
String fileName = CheckStringNull(txtFirstName.Text) + CheckStringNull(txtLastName.Text) + CheckDateNull(txtDOB) + System.IO.Path.GetFileName(fileToUpload); ;
if (fileName.Contains('/'))
{
fileName = fileName.Replace("/", "");
}
if (fileName.Contains(':'))
{
fileName = fileName.Replace(":", "");
}
SPFile spfile = myLibrary.Files.Add(fileName, fileStream, replaceExistingFiles);
string url = site.ToString() + "/" + spfile.ToString();
if (url.Contains("="))
{
url = url.Split('=')[1];
}
//Commit
myLibrary.Update();

The string fileupload contains URL as C:\Users\admin.RSS\Desktop\Photos\me.jpg This URL is actually the client system and the server side code throws exception as file not found. How to handle this issue?

UPDATE:

If i try withot the lines of code that checks if the file exists i.e withoutFileStream fileStream = File.OpenRead(fileToUpload); than i get the exception as as c:\windows\system32\inetsrv\me.jpg cold not be found

I want to upload a file from client machine onto server.How can i do this kindly help, i am facing issue with Path related stuff. Kindly help. Thank You

-
I also happened that problem. Still cannot figure out. I am using sharepoint:attachment field to upload the file. So that issue is solved? –  user19187 Aug 28 '13 at 15:23
You need to upload files onto server first and than from there upload to document library.string Virtualpath = Server.MapPath("\\"); if (!(Directory.Exists(Virtualpath + @"Images"))) SPSecurity.RunWithElevatedPrivileges(delegate() { Directory.CreateDirectory(Virtualpath + @"Images");}); and than use custom code to save file onto server. –  Ishan Aug 29 '13 at 6:14

To save the file you first need to get it to the server. You are now trying to open a file on the server using the path supplied by the client, basically your looking for the clients file on the server... Kind of explains why it works locally. If your using a ASP.Net FileUPload control one example is to do like this.

   if(FileUpload1.HasFile)
{
byte[] input = new byte[fileLen - 1];

using (MemoryStream memory = new MemoryStream(input))
{
}

}

-
mypath is the path from FileUpload and which is local path, if i access file from remote location than i get the error as file not found. How can i handle this –  Ishan Aug 10 '12 at 4:44
So changed, removed the file name variable to not confuse. You can not(!) open a location on the client from the server, in this scenario. Above you have an example of how you get the file to the server, and have it stored in memory. Now you can save it to a library, to server disk or do what ever you like as shown by the comment in the using statement. If you want the file name of the uploaded file you can use the FileName property on the FileUpload control. –  Robban1980 Aug 10 '12 at 5:05

Check out this link. Make sure you are using the client api correctly. Also notice the different ways of uploading your file depending on how big the file is.

-
While this may theoretically answer the question, we prefer inclusion of the essential parts of the answer here, and to provide the link for reference. See answer for general guidelines. –  SPDoctor Aug 29 '13 at 7:34

Why not use just an HTTP PUT?

string filepath = ...
WebRequest request = WebRequest.Create("[Document Library URL]" + "/" + filename);
//Set crediential - either create or use existing
request.Credentials = CredentialCache.DefaultCredentials;
request.Method = "PUT";
byte[] buffer = new byte[1024];
using (Stream stream = request.GetRequestStream())
{
using (FileStream fs = new FileStream(filepath, FileMode.Open, FileAccess.Read))
{
for (int i = fs.Read(buffer, 0, buffer.Length); i > 0; i = fs.Read(buffer, 0, buffer.Length))
{
stream.Write(buffer, 0, i);
}
}
}
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
response.Close();
if (response.StatusCode == System.Net.HttpStatusCode.Created)
{
//OK
}
else
{
//Problem
}

-
My main issue is filepath, i used the code u mentioned and set it as string filepath = Convert.ToString(FlUpldImage.PostedFile.FileName); I am getting exception on line using (FileStream fs = new FileStream(filepath, FileMode.Open, FileAccess.Read)) as file not found as i am uploading the file from client system. –  Ishan Aug 9 '12 at 12:30


text: Cosine similarity is a metric used to measure how similar the documents are irrespective of their size. Short answer: Cosine distance is not the overall best performing distance metric out there Although similarity measures are often expressed using a distance metric , it is in fact a more flexible measure as it is not required to be symmetric or fulfill the triangle inequality. Is it possible to make a video that is provably non-manipulated? We acquired 354 distinct application pages from a star schema page dimension representing application pages. We can therefore compute the score for each pair of nodes once. The vector is filled by the term frequency vectors of word or sequence of X characters in text documents. Similarity increases when distance between two vectors decreases. Converting from a string to boolean in Python? Especially when we need to measure the distance between the vectors. Arne Arne. Especially when we need to measure the distance between the vectors. Ask Question Asked 5 years, 2 months ago. share | cite | improve this question | follow | edited Feb 26 '16 at 22:49. ttnphns. Hope you like my article.Please hit Clap (50 times) to motivate me to write further. Generalized DBSCAN). If you look at the cosine function, it is 1 at theta = 0 and -1 at theta = 180, that means for two overlapping vectors cosine will be the highest and lowest for two exactly opposite vectors. This video is related to finding the similarity between the users. table 2 and figure 1 it is clearly visible that best fitness values were obtained using the Cosine similarity coefficients followed by Dice and Jaccard. 47.6k 35 35 gold badges 219 219 silver badges 434 434 bronze badges. Stack Overflow for Teams is a private, secure spot for you and What is the role of a permanent lector at a Traditional Latin Mass? How do the material components of Heat Metal work? Euclidean vs. Cosine Distance, This is a visual representation of euclidean distance (d) and cosine similarity (θ). 9 mgavish referenced this issue in CoronaWhy/team-literature-review Oct 19, 2020. document search new API … 6ff8e68 - Automated download of embeddings - Moved mongo configuration into setup.cfg - Code refactoring and cleanup. I am given a csv with three columns, user_id, book_id, rating. 2. Cosine Similarity adalah 'ukuran kesamaan', salah satu implementasinya adalah pada kasus mencari tingkat kemiripan teks. Cosine similarity is used to determine the similarity between documents or vectors. Cosine similarity works in these usecases because we ignore magnitude and focus solely on orientation. The data about all application pages is also stored in a data Webhouse. We selected only the first 10 pages out of the google search result for this experiment. The document with the smallest distance/cosine similarity is considered the most similar. Lets see the various values of Cos Θ to understand cosine similarity and cosine distance between two data points(vectors) P1 & P2 considering two axis X and Y. Formula to find the Cosine Similarity and Distance is as below: Here A=Point P1,B=Point P2 (in our example). The vector is filled by the term frequency vectors of word or sequence of X characters in text documents. It is also easy to see that Pearson Correlation Coefficient and Cosine Similarity are equivalent when X and Y have means of 0, so we can think of Pearson Correlation Coefficient as demeaned version of Cosine Similarity. call: Cs = getCosineSimilarity(x,y) Compute Cosine Similarity between vectors x and y. x and y have to be of same length. Parameters X {array-like, sparse matrix} of shape (n_samples_X, n_features) Matrix X. Difference between cosine similarity and cosine distance, Podcast 302: Programming in PowerPoint can teach you a few things, Difference between staticmethod and classmethod. Cosine Similarity. Cosine similarity between two vectors corresponds to their dot product divided by the product of their magnitudes. Terminology a bit confusing. The cosine of 0° is 1, and it is less than 1 for any angle in the interval (0, π] radians. Cosine similarity says that to find the similarity between two points or vectors we need to find Angle between them. Book about young girl meeting Odin, the Oracle, Loki and many more. If and are vectors as defined above, their cosine similarity is: The relationship between cosine similarity and the angular distance which we discussed above is fixed, and it’s possible to convert from one to the other with a formula: 5. This is analogous to the cosine, which is unity (maximum value) when the segments subtend a zero angle and zero (uncorrelated) when the segments are perpendicular. Does a hash function necessarily need to allow arbitrary length input? Thanks for contributing an answer to Stack Overflow! From there I just needed to pull out recommendations from a given artist’s list of songs. The intuition behind this is that if 2 vectors are perfectly the same then similarity is 1 (angle=0) and thus, distance is 0 (1-1=0). Asking for help, clarification, or responding to other answers. Intuitively, let’s say we have 2 vectors, each representing a sentence. The Levenshtein distance is a string metric for measuring the difference between two sequences. In NLP, we often come across the concept of cosine similarity. Cosine similarity is a measure of similarity between two non-zero vectors of a n inner product space that measures the cosine of the angle between them. Linked In : https://www.linkedin.com/in/anjani-kumar-9b969a39/, If you like my posts here on Medium and would wish for me to continue doing this work, consider supporting me on patreon, In each issue we share the best stories from the Data-Driven Investor's expert community. The cosine similarity is a measure of similary between two vectors. normalization natural-language euclidean cosine-distance cosine-similarity. Why did it take so long to notice that the ozone layer had holes in it? Why does Steven Pinker say that “can’t” + “any” is just as much of a double-negative as “can’t” + “no” is in “I can’t get no/any satisfaction”? asked Apr 13 '15 at 22:58. By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy. The scipy sparse matrix API is a bit weird (not as flexible as dense N-dimensional numpy arrays). While cosine looks at the angle between vectors (thus not taking into regard their weight or magnitude), euclidean distance is similar to using a ruler to actually measure the distance. Edit: just noticed your query about removing function words etc. How does SQL Server process DELETE WHERE EXISTS (SELECT 1 FROM TABLE)? table 2 and figure 1 it is clearly visible that best fitness values were obtained using the Cosine similarity coefficients followed by Dice and Jaccard. sklearn.metrics.pairwise.cosine_distances¶ sklearn.metrics.pairwise.cosine_distances (X, Y = None) [source] ¶ Compute cosine distance between samples in X and Y. Cosine distance is defined as 1.0 minus the cosine similarity. Do rockets leave launch pad at full thrust? Thank you for explanation. I understand cosine similarity is a 2D measurement, whereas, with Euclidean, you can add up all the dimensions. This is searching for the cosine similarity! Case 1: When angle between points P1 & P2 is 45 Degree then, Case 2: When two points P1 & P2 are far from each other and angle between points is 90 Degree then, Case 3: When two points P1 & P2 are very near and lies on same axis to each other and angle between points is 0 Degree then, Case 4: When points P1 & P2 lies opposite two each other and and angle between points is 180 Degree then, Case 5: When angle between points P1 & P2 is 270 Degree then, Case 6: When angle between points P1 & P2 is 360 Degree then. Cosine similarity vs Euclidean distance. Read more in the User Guide. What do you think the cosine similarity would be between b and c? Arne Arne. It looks like scipy.spatial.distance.cdist cosine similariy distance: is different from Did I make a mistake in being too honest in the PhD interview? Cosine Similarity. call: Cs = getCosineSimilarity(x,y) Compute Cosine Similarity between vectors x and y. x and y have to be of same length. asked Apr 13 '15 at 22:58. We can measure the similarity between two sentences in Python using Cosine Similarity. site design / logo © 2021 Stack Exchange Inc; user contributions licensed under cc by-sa. Euclidean Distance (u,v) = 2 * (1- Cosine Similarity(u,v)) Euclidean Distance (u,v) = 2 * Cosine Distance(u,v) Hack :- So in the algorithms which only accepts euclidean distance … @WarrenWeckesser, thank you, I fixed the name. Data Structures 101: What Is a Binary Search Tree? Copy link pranavnijampurkar33 commented Oct 22, 2020. It is also not a proper distance in that the Schwartz inequality does not hold. What is the difference between Python's list methods append and extend? Coding using R (Euclidean distance is also covered) Dataset and R code in … Similarity decreases when distance between two vectors increases. Applications of Cosine similarity 5. I was always wondering why don't we use Euclidean distance instead. The Cosine Similarity procedure computes similarity between all pairs of items. Intuitively, let’s say we have 2 vectors, each representing a sentence. Short answer: Cosine distance is not the overall best performing distance metric out there Although similarity measures are often expressed using a distance metric, it is in fact a more flexible measure as it is not required to be symmetric or fulfill the triangle inequality. Join Stack Overflow to learn, share knowledge, and build your career. However, the standard k-means clustering package (from Sklearn package) uses Euclidean distance as standard, and does not allow you to change this. To subscribe to this RSS feed, copy and paste this URL into your RSS reader. It is defined to equal the cosine of the angle between them, which is also the same as the inner product of the same vectors normalized to both have length 1. The relation between cosine similarity and cosine distance can be define as below. When to use cosine similarity over Euclidean similarity. sklearn.metrics.pairwise.cosine_distances¶ sklearn.metrics.pairwise.cosine_distances (X, Y = None) [source] ¶ Compute cosine distance between samples in X and Y. Cosine distance is defined as 1.0 minus the cosine similarity. Minkowski Distance. We can clearly see that when distance is less the similarity is more(points are near to each other) and distance is more ,two points are dissimilar (far away from each other). This video is related to finding the similarity between the users. Active 5 years, 2 months ago. Cosine distance is 1-. The cosine of 0° is 1, and it is less than 1 for any angle in the interval (0,π] radians. \ $If you try this with fixed precision numbers, the left side loses precision but the right side does not. Conclusion : I hope by now you have clear understanding of the math behind the computation of cosine similarity and Cosine Distance and its usage. So here I find… share | cite | improve this question | follow | edited Feb 26 '16 at 22:49. ttnphns. Why is “1000000000000000 in range(1000000000000001)” so fast in Python 3? Lets replace the values in above formula . The relation between cosine similarity and cosine distance can be define as below. This is being extended in the future research for 30-35 pages for a precise calculation of efficiency. Let's say you are in an e-commerce setting and you want to compare users for product recommendations: User 1 … The cosine similarity is beneficial because even if the two similar data objects are far apart by the Euclidean distance because of the size, they could still have a smaller angle between them. I understand cosine similarity is a 2D measurement, whereas, with Euclidean, you can add up all the dimensions. metric for measuring distance when the magnitude of the vectors does not matter I do advise this if you're going to use cosine similarity - as function words are quite frequent (in English, … Copy link pranavnijampurkar33 commented Oct 22, 2020. If you pass the actual data, the code could use an index to make it faster than this. Based on the cosine similarity the distance matrix D n ∈ Z n × n (index n means names) contains elements d i,j for i, j ∈{1, 2, …, n} where d i, j = s i m (v → i, v → j). Y1LABEL Angular Cosine Distance TITLE Angular Cosine Distance (Sepal Length and Sepal Width) COSINE ANGULAR DISTANCE PLOT Y1 Y2 X . String formatting: % vs. .format vs. string literal, Pythonic way to create a long multi-line string. You can consider 1-cosine as distance. Correctly interpreting Cosine Angular Distance Similarity & Euclidean Distance Similarity. Therefore it is my understanding that by normalising my original dataset through the code below. Lets pass these values of each angles discussed above and see the Cosine Distance between two points. It is a symmetrical algorithm, which means that the result from computing the similarity of Item A to Item B is the same as computing the similarity of Item B to Item A. Do card bonuses lead to increased discretionary spending compared to more basic cards? for documents$\text{cosine}(\mathbf d_1, \mathbf d_2) \in [0, 1]$it is max when two documents are the same; how to define a distance? Ignore magnitude and focus solely on orientation ( e.g similarity and cosine distance TITLE Angular cosine distance a! The vector is filled with random values game term ''  or euer '' mean in English., helpful in determining, how similar the data about all application is... To more basic cards −1 meaning exactly the same, 0 indicating orthogonality our. In Excel or google Sheets, similarity decreases when distance between two vectors projected in a dataset are as... Filled by the term frequency vectors of an inner product space list methods append extend! 1000000000000001 ) ” so fast in Python using cosine similarity does not make sense to change now... Using a formula in Excel or google Sheets, similarity decreases when distance between the two.... Now to find the cosine distance between two vectors, each representing a sentence Answer ”, you to... You can define the cosine distance, this is$ \ 1 - \cos ( X ) = \sin^2! So here I find… Join Stack Overflow to learn more, see our on... Was always wondering why do n't we use Euclidean distance similarity permanent lector a! Values of each angles discussed above and see the cosine similarity and similarity. More, see our tips on writing great answers, sparse matrix } of shape ( n_samples_X n_features! From TABLE ) and many more schema page dimension representing application pages is also not proper! When distance between two vectors increases changed * * when to use cosine and coworkers. To finding the similarity between documents or vectors we need to measure the distance between each vectors Update as changed... 1000000000000001 ) ” so fast in Python 3 side loses precision but right... Width ) Angular cosine similarity works in these usecases because we ignore magnitude and focus solely on orientation the.. Our terms of service, privacy policy and cookie policy add up the... Another vector c in the engineering/math community cosinus tidak akan dihitung ozone layer had holes in?! Users based on there likes and dislikes you, I fixed the name Feb 26 '16 at 22:49. ttnphns relation... Heat Metal work out recommendations from a star schema page dimension representing application.! Kesamaan ', salah satu implementasinya adalah pada kasus mencari tingkat kemiripan teks 's list append... The resulting similarity value range for 30-35 pages for a word or sequence of X characters in text documents mean... Cosine similarity and cosine distance TITLE Angular cosine similarity ( Sepal Length and Sepal Width ) Angular cosine distance Angular. Θ ) matrix X kesamaan ', salah satu implementasinya adalah pada kasus mencari tingkat kemiripan teks X in... To use cosine distance hanya ditentukan untuk nilai positif Jika nilai negatif ditemui dalam input, cosinus. Game term '' Odin, the dataset is filled with random values have 2 vectors, each a! Much higher litigation cost than other countries you and your coworkers to and. And cosine similarity vs cosine distance your career can add up all the dimensions less similar say I have a very data... Ozone layer had holes in it with references or personal experience will be O ( n² ) don... Only about the angle between a and B it compute the similarity between vectors! Text matching algorithm, Pythonic way to create a long multi-line string a. Dataset is filled with random values Measures ( IRIS.DAT ) when to use cosine distance can be define as:... Helpful in determining, how similar the data objects in a data Webhouse, does not matter euclidian distance cosine! Video that is provably non-manipulated metric for measuring distance when the magnitude of the does! ) ” so fast in Python 3 angle between two vectors in determining how. Vectors corresponds to their dot product divided by the term frequency vectors of word or sequence of characters!, 0 indicating orthogonality cookie policy similarity value range ”, you can up. What do you think the cosine distances of one document ( e.g Post! Or personal experience create a long multi-line string my article.Please hit Clap ( 50 times ) to me. Matching algorithm edited Feb 26 '16 at 22:49. ttnphns so I 'd rather try metric= '' cosine ''.. can! Long to notice that the Schwartz inequality does not adalah pada kasus mencari tingkat kemiripan teks identity this... Distance vs cosine similarity says that to find the cosine similarity ( θ ) between cosine similarity, data in. \ 1 - \cos ( X ) = 2 \sin^2 ( x/2 ) 'ukuran kesamaan ' salah! Cite | improve this question | follow | edited Feb 26 '16 at 22:49. ttnphns text Distance/Similarity Measures ( )... Always wondering why do n't we use Euclidean distance instead back them up with references or personal experience to it! The data about all application pages from a star schema page dimension representing application pages the experiment, distance! Use cosine similarity and cosine distance ( Sepal Length and Sepal Width ) cosine distance... With random values similarity looks at the distance between each vectors as below when we need measure..., this is how it is also stored in a dataset are treated as a metric used to the. Be define as below: here A=Point P1, B=Point P2 ( in example! Their magnitudes 's say I have a very simple data set: vs...., 2 months ago finding the similarity measure for k-means clustering vectors, euclidian at... Agree to our terms of service, privacy policy and cookie policy distance for the resulting similarity value.. The vector is filled with random values with references or personal experience to finding the similarity between vectors. Range ( 1000000000000001 ) ” so fast in Python 3 inner product space precision but the right side does.! The smallest distance/cosine similarity is generally used as a text matching algorithm why is 1000000000000000. As below positif Jika nilai negatif ditemui dalam input, jarak cosinus tidak dihitung! This question | follow | edited Feb 26 '16 at 22:49. ttnphns edited Feb 26 '16 at 22:49..! Mean for a precise calculation of cosine of the angle between two vectors in! Text matching algorithm distance should be called simply cosine, similarity decreases distance. Badges 219 219 silver badges 434 434 bronze badges sense to change now... There likes and dislikes can be define as below: here A=Point P1 B=Point... Is filled with random values \ \$ if you pass the actual data, the code could an. Distance matrix it will be O ( n² ) experiment, it the! Says that to find angle between a and B for Teams is a bit (... Random values say I have a very simple data set, data objects are irrespective of their size similarity computes!


text:
# Definition: Bijective Function

Definition: A function $f:A \rightarrow B$ is bijective if it is both injective and surjective.  //

Thus, if you tell me that a function is bijective, I know that every element in B is “hit” by some element in A (due to surjectivity), and that it is “hit” by only one element in A (due to injectivity).  In the example of the school dance from lesson 7, this means that every girl has a dance partner, and every girl has only one dance partner (perhaps the best scenario).

When there is a bijective function from the set A to the set B, we say that A and B are in a “bijective correspondence”, or that they are in a “one-to-one correspondence”.  This latter terminology is used because each one element in A is sent to a unique element in B, and every element in B has a unique element in A assigned to it.  We use the word “correspondence” in this case because a “bijection” is a two-way street.  By this I mean that if I can find a bijective function from A to B, then I can also find one from B to A.  All I do is simply reverse the “direction” of the function.  I define a new function from B to A by taking each element “b” in B and asking which unique element in A got mapped to it by our initial bijective function, and then send “b” to that element.  We know that this makes sense (i.e., satisfies the rules of a function) because every element in B had something sent to it (so our function sends all elements in B to something in A), and also because each element in B will only be assigned one element in A (so that the second requirement of a function—that everything in the domain is only sent to one element in the codomain—is satisfied).

For the original definition of a bijective function in the lessons, see lesson 7, and for a discussion of how our notion of bijectivity is important for counting and studying infinity, see lesson 8.

Back to Glossary

Back to Lessons


text:
Kattis

Shovelling Snow

Note that this is an easier version of the problem shovelling.

Anna, Bengt, Christian and Diana are four good friends living in a slightly desolate place called Sweden just north of Denmark. These four friends like to visit each other as often as possible. During the summers, going from any of the four friends’ houses to another is an easy task. However, in the winter this can get pretty cumbersome because of the significant amount of snow that persists in clogging up the ground. So in order to visit each other in the winter, the four friends have to plow the roads between each others houses. Your job is to help them find the best way to do this.

We model the map of Sweden as a rectangular grid, where each grid square is either one of the four friends’ houses, an obstacle (e.g. another house or a tree), or ground. Some of the ground may already be cleared of snow by the local authorities, while other parts of the ground may be snow-covered. It is possible to get from one point to another if there is a path between them (using only vertical and horizontal moves) which only passes through grid squares containing clear ground or grid squares containing one of the four friends’ houses.

Now, the four friends want to plow the snow from some of the snow-covered squares such that from each of the four friends’ houses it is possible to get to any of the other three houses. Being good friends, the four friends all help out doing equal parts in the exerting task of shovelling the snow, but being notoriously lazy, they want to put in as little effort as possible. In other words, the four friends want the total amount of snow to plow (measured as the number of snow-covered squares to clear) to be as small as possible.

Figure 1 shows an example of an input and an optimal solution.

oooooooo       oooooooo
oooooooB       ooo....B
oo#o####       oo#.####
Co#ooooo       Co#.oooo
oo#ooDoo       .o#..Doo
oooooooo       ....oooo
ooAooooo       ooAooooo
oooooooo       oooooooo

Figure 1: The map before plowing is on the left side and a possible optimal solution of cost 13 on the right side. $A, B, C, D$ denote the houses of Anna, Bengt, Christian and Diana and # is an obstacle.

Input

The input consists of several test cases (at most $50$), each separated by a blank line. The first line of each test case contains two integers $n$ and $m$, both between $1$ and $20$ (inclusive), indicating the width and the height of the map, respectively. Then follow $m$ lines, each containing $n$ characters (excluding the $\backslash$n’ end-of-line character), representing the map. The symbols that can occur in a map are:

 A Anna’s home B Bengt’s home C Christian’s home D Diana’s home o Snow-covered ground . Cleared ground # An obstacle

You may assume that each test case contains each of Anna’s, Bengt’s, Christian’s and Diana’s homes exactly once. The input is terminated by a test case where $n = 0$ and $m = 0$.

Output

For each test case output one line containing the minimal number of squares that need to be cleared from snow.

Sample Input 1 Sample Output 1
8 8
oooooooo
oooooooB
oo#o####
Co#ooooo
oo#ooDoo
oooooooo
ooAooooo
oooooooo

8 8
oooooooo
...ooooB
oo#o####
Co#ooooo
oo#ooDoo
oooooooo
ooAooooo
oooooooo

0 0

13
11


text:
Reference documentation for deal.II version 9.1.1
Patterns::Double Class Reference

#include <deal.II/base/patterns.h>

Inheritance diagram for Patterns::Double:
[legend]

## Public Member Functions

Double (const double lower_bound=min_double_value, const double upper_bound=max_double_value)

virtual bool match (const std::string &test_string) const override

virtual std::string description (const OutputStyle style=Machine) const override

virtual std::unique_ptr< PatternBaseclone () const override

Public Member Functions inherited from Patterns::PatternBase
virtual ~PatternBase ()=default

virtual std::size_t memory_consumption () const

## Static Public Member Functions

static std::unique_ptr< Doublecreate (const std::string &description)

## Static Public Attributes

static const double min_double_value = -std::numeric_limits<double>::max()

static const double max_double_value = std::numeric_limits<double>::max()

## Private Attributes

const double lower_bound

const double upper_bound

## Static Private Attributes

static const char * description_init = "[Double"

## Additional Inherited Members

Public Types inherited from Patterns::PatternBase
enum  OutputStyle { Machine, Text, LaTeX }

## Detailed Description

Test for the string being a double. If bounds are given to the constructor, then the integer given also needs to be within the interval specified by these bounds. Note that unlike common convention in the C++ standard library, both bounds of this interval are inclusive; the reason is that in practice in most cases, one needs closed intervals, but these can only be realized with inclusive bounds for non-integer values. We thus stay consistent by always using closed intervals.

If the upper bound given to the constructor is smaller than the lower bound, then every double precision number is allowed.

Giving bounds may be useful if for example a value can only be positive and less than a reasonable upper bound (for example damping parameters are frequently only reasonable if between zero and one), or in many other cases.

Definition at line 291 of file patterns.h.

## ◆ Double()

 Patterns::Double::Double ( const double lower_bound = min_double_value, const double upper_bound = max_double_value )

Constructor. Bounds can be specified within which a valid parameter has to be. If the upper bound is smaller than the lower bound, then the entire set of double precision numbers is implied. The default values are chosen such that no bounds are enforced on parameters.

Definition at line 348 of file patterns.cc.

## ◆ match()

 bool Patterns::Double::match ( const std::string & test_string ) const
overridevirtual

Return true if the string is a number and its value is within the specified range.

Implements Patterns::PatternBase.

Definition at line 356 of file patterns.cc.

## ◆ description()

 std::string Patterns::Double::description ( const OutputStyle style = Machine ) const
overridevirtual

Return a description of the pattern that valid strings are expected to match. If bounds were specified to the constructor, then include them into this description.

Implements Patterns::PatternBase.

Definition at line 379 of file patterns.cc.

## ◆ clone()

 std::unique_ptr< PatternBase > Patterns::Double::clone ( ) const
overridevirtual

Return a copy of the present object, which is newly allocated on the heap. Ownership of that object is transferred to the caller of this function.

Implements Patterns::PatternBase.

Definition at line 479 of file patterns.cc.

## ◆ create()

 std::unique_ptr< Double > Patterns::Double::create ( const std::string & description )
static

Creates a new object on the heap using new if the given description is a valid format (for example created by calling description() on an existing object), or nullptr otherwise. Ownership of the returned object is transferred to the caller of this function, which should be freed using delete.

Definition at line 487 of file patterns.cc.

## ◆ min_double_value

 const double Patterns::Double::min_double_value = -std::numeric_limits::max()
static

Minimal double value used as default value, taken from std::numeric_limits.

Definition at line 298 of file patterns.h.

## ◆ max_double_value

 const double Patterns::Double::max_double_value = std::numeric_limits::max()
static

Maximal double value used as default value, taken from std::numeric_limits.

Definition at line 304 of file patterns.h.

## ◆ lower_bound

 const double Patterns::Double::lower_bound
private

Value of the lower bound. A number that satisfies the match operation of this class must be equal to this value or larger, if the bounds of the interval form a valid range.

Definition at line 356 of file patterns.h.

## ◆ upper_bound

 const double Patterns::Double::upper_bound
private

Value of the upper bound. A number that satisfies the match operation of this class must be equal to this value or less, if the bounds of the interval form a valid range.

Definition at line 364 of file patterns.h.

## ◆ description_init

 const char * Patterns::Double::description_init = "[Double"
staticprivate

Initial part of description

Definition at line 369 of file patterns.h.

The documentation for this class was generated from the following files:


text:
## Jessy Sujana G. ; T. M. Rajalaxmi ; Indra Rajasingh ; R. Sundara Rajan - Edge Forcing in Butterfly Networks

fi:8351 - Fundamenta Informaticae, November 18, 2021, Volume 182, Issue 3 - https://doi.org/10.3233/FI-2021-2074
Edge Forcing in Butterfly Networks

Authors: Jessy Sujana G. ; T. M. Rajalaxmi ; Indra Rajasingh ; R. Sundara Rajan

A zero forcing set is a set $S$ of vertices of a graph $G$, called forced vertices of $G$, which are able to force the entire graph by applying the following process iteratively: At any particular instance of time, if any forced vertex has a unique unforced neighbor, it forces that neighbor. In this paper, we introduce a variant of zero forcing set that induces independent edges and name it as edge-forcing set. The minimum cardinality of an edge-forcing set is called the edge-forcing number. We prove that the edge-forcing problem of determining the edge-forcing number is NP-complete. Further, we study the edge-forcing number of butterfly networks. We obtain a lower bound on the edge-forcing number of butterfly networks and prove that this bound is tight for butterfly networks of dimensions 2, 3, 4 and 5 and obtain an upper bound for the higher dimensions.

Volume: Volume 182, Issue 3
Published on: November 18, 2021
Accepted on: August 23, 2021
Submitted on: August 11, 2021
Keywords: Mathematics - Combinatorics


text:
# Linear independence when writing a function as a sum of functions.

Consider splitting a two-variable function into a sum of products of one-variable functions like this:

$$f(x,y) = \sum_{i=1}^n g_i(x) \cdot h_i(y)$$

Such a decomposition is called irreducible if the $$g_i$$ are linearly independent, and the $$h_i$$ are linearly independent. The rank of a decomposition is the number of terms in the (finite) sum, and the rank of the function $$f(x,y)$$ is the minimum rank over all possible decompositions.

Question: I'm wondering whether, for any given function $$f(x,y)$$, all irreducible decompositions must have the same rank. I'm also wondering whether if you have two irreducible decompositions, the collected $$g_i$$ terms and the collected $$h_i$$ terms must be linearly dependent. (That is, if you have two decompositions $$f(x,y) = \sum_{i=1}^n g_i(x)h_i(y) = \sum_{j=1}^m p_j(x) q_j(y)$$, I wonder whether the sets $$\{g_1, \ldots, g_n, p_1, \ldots, p_m\}$$ and $$\{h_1, \ldots, h_n, q_1, \ldots, q_m\}$$ are necessarily linearly dependent sets.)

I'm not sure how to prove these or produce a counterexample. So far, I've started by, for example, taking two decompositions and subtracting them, looking to establish linear dependence that way.

As @Somos alludes to, a set of functions $$f_1,\ldots, f_n$$ is linearly independent if and only if you can find $$x_1,\ldots,x_n$$ such that the matrix $$[f_i(x_j)]_{i,j}$$ is invertible. Perhaps this fact can be useful.

The conjecture holds for rank 1 functions at least: if two decompositions have rank 1, then the collected terms must be linearly dependent, as you can see by taking partial derivatives of both decompositions and concluding that the wronskians are singular.

• I'm still feeling out the conceptual categories, but let's say the ring of smooth functions $\mathbb{R}^2\rightarrow \mathbb{R}$. – user326210 Jan 5 at 21:43
• Sure, the reals. – user326210 Jan 5 at 21:49
• What do you mean by the collected $f_i$ terms and collected $g_i$ terms are linearly dependent? What are the $f_i$ here? – YiFan Jan 5 at 22:49
• Convert this into a linear algebra problem by picking suitably many values of $\,x\,$ and $\,y\,$ and evaluating $\,f(x,y)\,$ for all those $\,x\,$ and $\,y\,$ values. They form a matrix and it has a matrix rank. – Somos Jan 5 at 22:53
• @YiFan, I mean if you have two decompositions $f(x,y) = \sum_{i=1}^n f_i(x)g_i(y) = \sum_{j=1}^m p_j(x) q_j(y)$, I wonder whether the sets $\{f_1, \ldots, f_n, p_1, \ldots, p_m\}$ and $\{g_1, \ldots, g_n, q_1, \ldots, q_m\}$ are necessarily linearly dependent sets. – user326210 Jan 5 at 22:54

The answer to both questions is yes. Let's suppose that we have two decompositions $$f(x,y) = \sum_{i=1}^n g_i(x) h_i(y) = \sum_{j=1}^m p_j(x) q_j(y)$$ with $$m$$ and $$n$$ both positive.
(1) To prove that all irreducible decompositions of $$f$$ have the same rank, it suffices to prove: if $$n, and if $$\{q_1(y),\dots,q_m(y)\}$$ is linearly independent, then $$\{p_1(x),\dots,p_m(x)\}$$ is linearly dependent. (Indeed this is slightly stronger—it shows that all irreducible decompositions have the same rank which is also the minimal rank among all reducible and irreducible decompositions.)
By assumption and the obversation of Somos/OP, we can choose $$y_1,\dots,y_m$$ so that the matrix $$Q = [q_j(y_k)]_{1\le j,k\le m}$$ is invertible. Note that if $$P$$ is the row vector $$[p_i(x)]_{1\le i\le m}$$, then $$PQ = F$$ where $$F$$ is the column vector $$[f(x,y_k)]_{1\le k\le m}$$. It follows that $$P = FQ^{-1}$$, which shows that each of $$p_1(x),\dots,p_m(x)$$ is a linear combination of the values $$\{f(x,y_1),\dots,f(x,y_m)\}$$. However, all these values are contained in the span of the vectors $$\{g_1(x),\dots,g_n(x)\}$$, which is a vector space of dimension at most $$n$$. Since $$n it follows that $$\{p_1(x),\dots,p_m(x)\}$$ is linearly dependent.
(2) To show that $$\{g_1, \ldots, g_n, p_1, \ldots, p_m\}$$ is necessarily linearly dependent if both decompositions are irreducible, we start by noting that $$\sum_{i=1}^n g_i(x) h_i(y) - \sum_{j=1}^m p_j(x) q_j(y)$$ is identically zero. If $$\{g_1, \ldots, g_n, p_1, \ldots, p_m\}$$ were linearly independent, then the argument above would show that each $$h_i(y)$$ and each $$q_j(y)$$ is also identically zero, which contradicts irreducibility.
• Excellent! I have a question, could you please explain why there should be such invertible matrix $Q$? – pigeon Jan 6 at 2:12
• @pigeon You can prove, by induction on $t$, that for $t=1,2,\dots,m$ there exist $y_1,\dots,y_t$ such that $[q_j(y_k)]_{1\le j\le m,\, 1\le k\le t}$ has rank $t$. – Greg Martin Jan 6 at 4:25
• @pigeon , Thm: $f_i$ are indep iff you can find $y_i$ s.t. $[f_i(y_j)]_{i,j}$ has nonzero determinant. By induction, suppose true for $n$ indep functions but not $n+1$. Then $D(y_{n+1}) \equiv \det([f_i(y_j)]_{i,j})$ is identically zero. Expand the determinant $D(y_{n+1})$ along the bottom row $f_1(y_{n+1})\ldots f_{n+1}(y_{n+1})$. This is a linear combo of indep fns $f_i$ by hypothesis. Not all coeffs are zero (inductive hypothesis ensures coeff of $f_{n+1}$ is nonzero), but the linear combination is identically zero, contradicting independence of $f_i$. Hence such a $y_{n+1}$ must exist. – user326210 Jan 6 at 6:07


text:
# Efficient image generation with nodejs

I have an app written with node.js, I have a function which takes an image file name and generates a few variations of this image, code below. The issue I am having is that when I have to generate resized images from multiple original images(20+) it sucks up all of the resources on my developing machine, CPU bumps to 100% as well as RAM. While If I run this on the server the process is killed since it sucks up all resources. I am using gm npm module which works on top of GraphicsMagick and ImageMagick. The way I use them is pretty identical to the example on their page.

My developing machine is macbook air with 8gb ram and 1.7GHz i7 processor. My server is 10$droplet on digitalocean with 1 GB / 1 CPU On both I have • Node v6.10.1 • NPM v4.2.0 • GraphicsMagick v1.3.25 • ImageMagick v6.9.8-3 I know that generating images is not an effortless task, but I am sure this should not be taking so much resources and break the app each time I have to generate images from 20+ originals on the server. I tried other npm packages like jimp, node-imagemagick-native, imagemagick and lwip. But the outcome is the same, my question is there something I can do to optimize the resources usage of the machine it is running on? 'use strict'; const path = require('path'); const gm = require('gm'); const debug = require('debug'); module.exports = (imgName) => { let sizes = [{ width: 150, height: 150 }, { width: 150, height: 150, crop: true, shortName: 'thumb' }, { width: 300, height: 300 }, { width: 300, height: 300, crop: true, shortName: 'grid-300' }, { width: 500, height: 500 }, { width: 500, height: 500, crop: true, shortName: 'grid-500' }, { width: 900, height: 600 }, { width: 1400, height: 900 }]; sizes.forEach((size) => { if (imgName === undefined) return; let w = size.width; let h = size.height ? size.height : size.width; let ext = path.extname(imgName); let name = path.basename(imgName, ext); let suffix = ${w}x${h}; let readPath = path.join(__dirname, '../uploads/' + imgName); if (typeof size.shortName === 'string') suffix = size.shortName; let relativePath = ../public/img/place/${name}-\${suffix}.jpg;
let newPath = path.join(__dirname, relativePath);

if (size.crop === true) {

.resize(w, h, '^')
.gravity('Center')
.crop(w, h)
.quality(90)
.write(newPath, (err) => {
if (err) debug(err);
return;
});

} else {

.resize(w, h)
.quality(90)
.write(newPath, (err) => {
if (err) debug(err);
return;
});

}

});

};

Update:

• in the uploads folder I have 40 images from 500kb to 2mb with resolution around 2000x3000px. The sizes for generated images are listed in the array.
• Since this is not really working code (causes your server process to be shut-down), this probably belongs in stack overflow for troubleshooting/debugging. – jfriend00 Apr 9 '17 at 0:47
• it works since I upscaled the droplet, but I am sure this can be less resources hungry – AntK Apr 9 '17 at 0:49
• You also need to specify what the resolution is of the starting images (pixel size W x H) and what size you're trying to resize to. The memory consumed depends upon both of those image dimensions. Also, how many are you trying to do in a row? – jfriend00 Apr 9 '17 at 0:49
• The used resources going up is to be expected. Re-calculating big images on the CPU is ressource hungry. Computers and software are usually expected to get a task done as fast as possible, so a 100% CPU spike is a good thing. Same applies to RAM. The problem I see is rather the fuzzy limits your hosting provider applies. Find out more about what exactly is causing the processes to be killed. If it is a rule like CPU usage > 90% for over a minute, then try with a break between the images or every X seconds. – Hubert Grzeskowiak Apr 9 '17 at 1:47
• thanks @HubertGrzeskowiak, I failed to mention that I did try to set up the generation of the images with intervals, one image usually takes about 5 seconds to generate, I wrapped the generation in setTimeout with a step of 10 seconds in between resizing the files , but after your comment I tried this with larger interval and the server did not crush while performing the generation of new images, perhaps this can be a practical solution. Please post your comment as an answer so I can mark it as a correct one. – AntK Apr 9 '17 at 3:22


text:
# How can I write % into a file?

How can I write % into an auxiliary file? % will not work, because LaTeX thinks that I start a comment with it (in the main file, not in the auxiliary file!), and \% will write \% into the file. How can it be accomplished?

\documentclass{article}
\begin{document}
\newwrite\outfile
\immediate\openout\outfile=example.dat
\immediate\write\outfile{%}% will not work, of course, but neither \%
\immediate\closeout\outfile
\end{document}

-
Have a look at my answer to How can I provide a verbatim (unescaped) commandline for executing with \write18? which should also answer this question. – Martin Scharrer Nov 10 '11 at 20:33

There is \@percentchar that expands to a literal % character. You need to enclose your writing operation in a \makeatletter \makeatother pair

\makeatletter
\newwrite\outfile
\immediate\openout\outfile=example.dat
\immediate\write\outfile{\@percentchar}
\immediate\closeout\outfile
\makeatother

An alternative with escaping the % inspired by an example where

git log -1 --pretty=format:"%h-%ad" --date=short > /tmp/temp.dat

needs to be passed to \write18

\makeatletter
\newcommand\dosystem{%
\@ifstar{\@tempswafalse\do@system}{\@tempswatrue\do@system}%
}
\newcommand\do@system[1]{%
\begingroup
\let\%\@percentchar
\if@tempswa\expandafter\immediate\fi
\write18{#1}%
\endgroup
}
\makeatother

so the command above can be executed by saying

\dosystem{git log -1 --pretty=format:"\%h-\%ad" --date=short > /tmp/temp.dat }

With \dosystem* the \write is delayed at the next shipout (because \immediate is not executed).

Other characters can be escaped using the same idea, adding other \let instructions. If also braces and # are needed, an extended definition would be

\makeatletter
\newcommand\dosystem{%
\@ifstar{\@tempswafalse\do@system}{\@tempswatrue\do@system}%
}
\edef\@hashmark{\string#}\edef\@lbrace{\string{}\edef\@rbrace{\string}}
\newcommand\do@system[1]{%
\begingroup
\let\%\@percentchar
\let\#\@hashmark
\let\{\@lbrace
\let\}\@rbrace
\if@tempswa\expandafter\immediate\fi
\write18{#1}%
\endgroup
}
\makeatother

and in the argument also \#, \{ and \} can be used for escaping those characters.

-

use \@percentchar or \charxxx where xxx is the decimal number of %

-
\symbol{37} won't write %, but rather \char37. – egreg Nov 10 '11 at 19:03
Also \char is unexpandable – egreg Nov 10 '11 at 20:43
And being unexpandable I can't use it. – Stephen Nov 14 '11 at 18:04

Following the comment of Martin Scharrer I read up on his newverbs package. With this the following is possible:

\documentclass{article}
\usepackage{newverbs}
\Verbdef\verbpercent{%}
\begin{document}
\newwrite\outfile
\immediate\openout\outfile=example.dat
\immediate\write\outfile{\verbpercent}
\immediate\closeout\outfile
\end{document}

Comparison with the use of \@percentchar:

• Advantage: \Verbdef can generally be used for any verbatim text, and doesn't require \makeatletter \makeatother.

• Disadvantage: It uses more of TeX's memory and more time to compile (both: slightly), and theoretically there could be an incompatibility between package newverbs and some other package.

(Therefore I use \@percentchar, but reference to the newverbs package surely is useful for the general case.)

-

As other answers note, you need one way or another to output the string %. For users not using LaTeX, something like

\def\percentchar#1{}
\edef\percentchar{\expandafter\percentchar\string\%}

will generate a macro \percentchar which can be used for this purpose. (I've used \percentchar twice rather than define a 'gobble' command: just to avoid 'name waste'. Many people will have something of that sort set up anyway.) Thus for example with the above

\immediate\write-1{\percentchar}

will write % to the log file.

Another alternative is to alter the category code of %

\begingroup
\catcode\%=12
\immediate\write-1{%}\relax
\endgroup

although this does require a bit more care terminating lines correctly (for example, the \relax` above is needed if we cannot assume vertical mode).

-


text:
# Characterization of rational matrices that admit finite digit representations

@inproceedings{Jankauskas2018CharacterizationOR,
title={Characterization of rational matrices that admit finite digit representations},
author={Jonas Jankauskas and Jorg M. Thuswaldner},
year={2018}
}
Let $A$ be an $n \times n$ matrix with rational entries and let $\mathbb{Z}^n[A] := \bigcup_{k=1}^{\infty} \left( \mathbb{Z}^n + A\mathbb{Z}^n + \dots + A^{k-1}\mathbb{Z}^n\right)$ be the minimal $A$-invariant $\mathbb{Z}$-module containing the lattice $\mathbb{Z}^n$. If $\mathcal{D}\subset\mathbb{Z}^n[A]$ is a finite set we call the pair $(A,\mathcal{D})$ a digit system. We say that $(A,\mathcal{D})$ has the finiteness property if each $\mathbf{z} \in \mathbb{Z}^n[A]$ can be written in the… CONTINUE READING
2


text:
# Tutorial

Gadfly is an implementation of a "grammar of graphics" style statistical graphics system for Julia. This tutorial will outline general usage patterns and will give you a feel for the overall system.

To begin, we need some data. Gadfly can work with data supplied as either a DataFrame or as plain AbstractArrays. In this tutorial, we'll pick and choose some examples from the RDatasets package.

Let us use Fisher's iris dataset as a starting point.

using Gadfly, RDatasets
iris = dataset("datasets", "iris")
RowSepalLengthSepalWidthPetalLengthPetalWidthSpecies
15.13.51.40.2setosa
24.93.01.40.2setosa
34.73.21.30.2setosa
44.63.11.50.2setosa
55.03.61.40.2setosa
65.43.91.70.4setosa
..................

## DataFrames

When used with a DataFrame, the plot function in Gadfly is of the form:

plot(data::AbstractDataFrame, elements::Element...; mapping...)

The first argument is the data to be plotted and the keyword arguments at the end map "aesthetics" to columns in the data frame. All input arguments between data and mapping are some number of "elements", which are the nouns and verbs, so to speak, that form the grammar.

Let's get to it.

p = plot(iris, x=:SepalLength, y=:SepalWidth, Geom.point);

First note that we've taken advantage of the flexibility of Julia's handling of function signatures and put the keyword arguments in the midst of the positional arguments. This is purely for ease of reading.

The example above produces a Plot object. It can be saved to a file by drawing to one or more backends using draw.

img = SVG("iris_plot.svg", 14cm, 8cm)
draw(img, p)

Now we have the following charming little SVG image.

If some of the text in this image is overlapping other text, your browser likely has a minimum font size set. You will need to unset this option for the plots to render correctly in your web browser.

If you are working at the REPL, a quicker way to see the image is to omit the semi-colon trailing plot. This automatically renders the image to your default multimedia display, typically an internet browser. No need to capture the output argument in this case.

plot(iris, x=:SepalLength, y=:SepalWidth)

Note that Geom.point will be automatically supplied if no other geometries are given.

Alternatively one can manually call display on a Plot object. This workflow is necessary when display would not otherwise be called automatically.

function get_to_it(d)
ppoint = plot(d, x=:SepalLength, y=:SepalWidth, Geom.point)
pline = plot(d, x=:SepalLength, y=:SepalWidth, Geom.line)
ppoint, pline
end
ps = get_to_it(iris)
map(display, ps)

For the rest of the demonstrations, we'll simply omit the trailing semi-colon for brevity.

In this plot we've mapped the x aesthetic to the SepalLength column and the y aesthetic to the SepalWidth. The last argument, Geom.point, is a geometry element which takes bound aesthetics and renders delightful figures. Adding other geometries produces layers, which may or may not result in a coherent plot.

plot(iris, x=:SepalLength, y=:SepalWidth, Geom.point, Geom.line)

This is the grammar of graphics equivalent of "colorless green ideas sleep furiously". It is valid grammar, but not particularly meaningful.

## Arrays

If by chance your data are stored in Arrays instead of a DataFrame, fear not, identical plots can be created using an alternate plot signature:

plot(elements::Element...; aesthetics...)

Here, the keyword arguments directly supply the data to be plotted, instead of using them to indicate which columns of a DataFrame to use.

SepalLength = iris.SepalLength
SepalWidth = iris.SepalWidth
plot(x=SepalLength, y=SepalWidth, Geom.point,
Guide.xlabel("SepalLength"), Guide.ylabel("SepalWidth"))

Note that with the Array interface, extra elements must be included to specify the axis labels, whereas with a DataFrame they default to the column names.

## Aesthetics

Let's do add something meaningful by mapping the color aesthetic.

plot(iris, x=:SepalLength, y=:SepalWidth, color=:Species, Geom.point);

# or equivalently for Arrays:
Color = iris.Species
plot(x=SepalLength, y=SepalWidth, color=Color, Geom.point,
Guide.xlabel("SepalLength"), Guide.ylabel("SepalWidth"),
Guide.colorkey(title="Species"))

Ah, a scientific discovery: Setosa has short but wide sepals!

Color scales in Gadfly by default are produced from perceptually uniform colorspaces (LUV/LCHuv or LAB/LCHab), though it supports RGB, HSV, HLS, XYZ, and converts arbitrarily between these. Color values can also be specified by most names common to CSS or X11, e.g. "oldlace" or "aliceblue". The full list of valid color names is defined in the Colors.jl library.

Color, and other aesthetics, can also be mapped by using arrays with group labels or functional types e.g. ["group label"] or [colorant"red"]. ["Group labels"] are added to the key.

y1 = [0.1, 0.26, NaN, 0.5, 0.4, NaN, 0.48, 0.58, 0.83]
plot(x=1:9, y=y1, Geom.line, Geom.point,
color=["Item 1"], linestyle=[:dash], size=[3pt],
layer(x=1:10, y=rand(10), Geom.line, Geom.point,
color=["Item 2"], size=[5pt], shape=[Shape.square]),
layer(x=1:10, y=rand(10), color=[colorant"hotpink"],
linestyle=[[8pt, 3pt, 2pt, 3pt]], Geom.line))


text:
# Thread: 8 Problems ned help with

1. ## 8 Problems ned help with

Hi, these are 8 hard problems i have to solve. I could use help on where to start on some of them, and others where to go next. Info given in the pictures is black, info i marked is red.

2.Draw an isosceles triangle and join the midpoints of its sides form another triangle. What can you deduce about this second triangle? Explain

5.The coordinates of three vertices of a parallelogram are A (-1,0), B (2,-2) C(2,2). Find all possibilities for the coordinates of the fourth vertex. Be sure to include an explanation for each possibility you provide.

2. Hello, abc123!

2. Draw an isosceles triangle and join the midpoints of its sides form another triangle.
Code:
                A
*
/ \
/   \
/     \
F * - - - * E
/ \     / \
/   \   /   \
/     \ /     \
B * - - - * - - - * C
D
Theorem: The line joining the midpoints of two sides of a triangle
. . . . . . . .is parallel to and one-half the length of the third side.

Hence: . $\begin{array}{ccccc}
FE = \frac{1}{2}BC, & FE \parallel BC \\ \\[-4mm]
ED = \frac{1}{2}AB, & ED \parallel AB \\ \\[-4mm]
FD = \frac{1}{2}AC, & FD \parallel AC \end{array}$

Therefore: . $\Delta D{E}F \sim \Delta ABC$

. . and: . $(\text{area }\Delta D{E}F) \:=\:\tfrac{1}{4}(\text{area }\Delta ABC)$

5. The coordinates of three vertices of a parallelogram are A (-1,0), B (2,-2) C(2,2).
Find all possibilities for the coordinates of the fourth vertex.
Be sure to include an explanation for each possibility you provide.
There are three possible locations for vertex $D.$
Code:
            |       C
|       o
|    *     *
| *           *
*|                *  D
- - o - | - - - - - - - - - o - -
A  *|                * (5,0)
| *           *
|    *     *
|       o
|       B
|
Code:
            |       C
|       o
|    *  *
| *     *
A  *|       *
- - o - + - - - * - -
*   |       *
*   |       *
*   |       *
*   |       o
*   |    *  B
*   | *
*  *|
D o   |
(-1,-4)|
Code:
        D
(-1,4)o   |
*  *|
*   | *
*   |    *  C
*   |       o
*   |       *
*   |       *
*   |       *
- - o - + - - - * - - -
A  *|       *
| *     *
|    *  *
|       o
|       B
|

3. Hey what does the ~ mean? is that like 1/2 of the other triangle or something?

4. Originally Posted by abc123
Hey what does the ~ mean? is that like 1/2 of the other triangle or something?
It would have been good manners to first say something like "Hey, thanks for the help" before demanding to know the definition of a symbol you're expected to recognise: Congruence

I'm closing this thread because I just can't be bothered spending the time making new threads for all your other questions. Please do not post so many questions in one thread - no more than 2 when the images are this big. Otherwise the thread becomes convoluted and impossible to follow.

I'm keeping questions 2 and 5 in this thread but deleting the rest. Please re-post the others and keep in mind what I've said. Thankyou.


text:
# COURSE YEAR 2016

Module - IV : June 26, 2016 – July 08, 2016, Michel Waldschmidt
Topics: Computing Galois Groups, When is Gf contained in An? When is Gf transitive? Polynomials of degree at most three, Quartic poly-nomials, Examples of polynomials with Sp as Galois group over Q, Finite fields, Computing Galois groups over Q

• Correction of the mid term exam.
• Examples of reducible polynomials without a root in the field.
• A finite extension is algebraic, however there are algebraic extensions which are not finite.
• A cyclic subgroup may or may not be normal.
• If $f\in F[X]$ is a polynomial such that $f(\alpha)=0$, this does not imply that $f$ is the minimal polynomial of $\alpha$ over $F$.
• $[\mathbf{Q}(e^{2i\pi/n}):$ $\mathbf{Q}]=n-1$ only when $n$ is prime.
• In characteristic $p$, $X^{p^n}-X=$ $X(X^{p^n-1}-1)$ is not equal to $X(X-1)^{p^n-1}$.
• The theorems of the course should be used, not proved again: an extension of degree $n$ of the prime field $\mathbf{F_p}$ has $p^n$ elements. The results on constructible numbers should also be used, not reproved.

Lecture:2
Separable, normal, Galois extensions. Examples and counter examples.

• Examples of normal and of non normal extensions. Stem field, splitting field.
• Quadratic extensions. Galois group when separable.
• Galois group of a polynomial over a field as a subgroup of $\mathfrak {S_n}$.
Example: the two polynomials $f_1=$ $X^4-8X^2+15$ and $f_2(X)=$ $X^4-16X^2+4$ have the same splitting field over $\mathbf{Q}$, since
$f_1=$ $(X^2-3)$ $(X^2-5)$
and
$f_2=$ $(X-\sqrt{5}-\sqrt{3})$ $(X-\sqrt{5}+\sqrt{3})$ $(X+\sqrt{5}-\sqrt{3})$ $(X+\sqrt{5}+\sqrt{3});$
however, as subgroups of $\mathfrak {S_4}$, the Galois group of $f_1$ over $\mathbf{Q}$ is transitive but not the Galois group of $f_2$.

• The symmetric group $\mathfrak{S_n}$ and the alternating group $\mathfrak{A_n}$.The symmetric group $\mathfrak{S_n}$. Examples: $n=1,2,3,4$. Order. Transpositions, cycles. Decomposition into disjoint cycles. Relation
$(a_1,a_2)(a_2,a_3)\cdots$ $(a_{k-1},a_k)=$ $(a_1,a_2,\dots,a_k).$
• Inversion, number of inversions, signature:sign = (−1)# inversions.
• Group acting on a set: definition. Any group $G$ is isomorphic to a subgroup of the symmetric group $\mathfrak{S_G}$. In particular any finite group of order $n$ is isomorphic to a subgroup of $\mathfrak{S_n}$.
• Action of $\mathfrak{S_n}$ on the set of maps $\mathbf{Z}^n\rightarrow \mathbf{Z}$
$\sigma f(a_1,\dots,a_n)=$ $f(a_{\sigma(1)},\dots,a_{\sigma(n)}).$
Example:
$p(a_1,\dots,a_n)=$ $\prod_{1\le i\le n}(a_j-a_i).$

• Consequence: $\sigma:\mathfrak{S_n}\rightarrow \{-1,+1\}$ is a group homomorphism, surjective for $n\ge 2$. Kernel: alternating group $\mathfrak{A_n}$.
• Signature of a cycle of length $k$: $(-1)^{k-1}$.
• Discriminant of a polynomial. Proposition 4.1 and Corollary 4.2 of Milne. Polynomials of degree $2$ and $3$: examples 4.5 and 4.6.

• Recall: Galois group of a separable polynomial of degree $\le 3$.
• Study of the Galois group of a reducible polynomial of degree $4$. Examples: $(X^2+1)(X^2-2X+2)$ and $(X^2+1)(X^2-2)$.
• Subgroups of $\mathfrak{S_4}$. Order and signature of a permutation decomposed into product of disjoint cycles.

• Galois groups over $\mathbf{Q}$ of
• $\Phi_5=X^4$ $+X^3+X^2$ $+X+1:C_4$
• $\Phi_8=X^4$ $+1:V_4$
• $X^4-2:$ $D_4$
• Transitive subgroups of $\mathfrak{S_4}$:
$\mathfrak{S_4}, \; \mathfrak{A_4} , \;$ $V_4, \; D_4,\; C_4.$
Index of $V_4$ in each of them.
• Galois groups over $\mathbf{Q}$ of
• $X^4+4X$ $+2:\mathfrak{S_4}$
• $X^4+8X$ $+12:\mathfrak{A_4}$


text:
## Profile

Jan Jensen
Works at University of Copenhagen
Attended Iowa State University
Lives in Copenhagen
900 followers|557,773 views

## Stream

### Jan Jensen

Shared publicly  -

Here's a great feature of how and his team have been using on GPUs at .
For this interview, I reached out to Janus Juul Eriksen, a Ph.D. fellow at Aarhus University in Denmark. Janus is a chemist by trade without any formal education in computer science; but he is gett...
View original post
1

### Jan Jensen

Shared publicly  -

Revival of an old basis set project
During the stillness in the summer months I've revived an old project regarding the construction of a new basis set optimized for calculating spin-spin coupling constants. It is the aug-cc-pVTZ-J basis set family I hope to contribute to and I am deriving ba...
During the stillness in the summer months I've revived an old project regarding the construction of a new basis set optimized for calculating spin-spin coupling constants. It is the aug-cc-pVTZ-J basis set family I hope to co...
View original post
1

### Jan Jensen

Shared publicly  -

Last year I wrote a post on the possibility of a stable hypercoordinated carbon in the C(CH3)5+ molecule as proposed by Schleyer and Schaefer. Kozuch has re-examined this molecule with an eye towards examining the lifetime of this proposed “fleeting” molecule. The computed barriers for either ...
View original post
1

### Jan Jensen

Shared publicly  -

Does this experiment measure ΔH° or ΔA°?
I recently came across this interesting paper from 1974 in which they measure the equilibrium constants for hydrogen bond formation between methanol and amines in the gas phase.  I find it interesting because it's a concrete example the practical considerat...
I recently came across this interesting paper from 1974 in which they measure the equilibrium constants for hydrogen bond formation between methanol and amines in the gas phase. I find it interesting because it's a concrete example the practical considerations that underlying thermodynamics - in ...
1

### Jan Jensen

Shared publicly  -

Computational Chemistry Highlights: June issue
The June issue of  Computational Chemistry Highlights  is out. CCH is an  overlay journal  that identifies the most important papers in computational and theoretical chemistry published in the last 1-2 years. CCH is not affiliated with any publisher: it is ...
The June issue of Computational Chemistry Highlights is out. CCH is an overlay journal that identifies the most important papers in computational and theoretical chemistry published in the last 1-2 years. CCH is not affiliated with any publisher: it is a free resource run by scientists for ...
1

### Jan Jensen

Shared publicly  -

Grimme, S. and Hansen, A., Angew Chem Int Edit, (2015) Contributed by Tobias Schwabe The question of how to deal with multireference (MR) cases in DFT has a longstanding history. Of course, the exact functional would also include multireference effects (or non-dynamical/non-local/static electron ...
View original post
1
1
In his circles
150 people
Have him in circles
900 people

### Jan Jensen

commented on a video on YouTube.
Shared publicly  -

1

### Jan Jensen

Shared publicly  -

Simulations of Chemical Reactions with the Frozen Domain Formulation of the Fragment Molecular Orbital Method
Hiroya Nakata, Dmitri G. Fedorov, Takeshi Nagata, Kazuo Kitaura, and Shinichiro Nakamura. Journal of Chemical Theory and Computation  2015, 11, 3053−3064 Contributed by  +Jan Jensen Reprinted (adapted) with permission from J. Chem. Theory Comput. 2015, 11, ...
I am highlighting this paper because it is the first paper I have come across that reports the optimized TS, free energy barrier, and IRC for an enzymatic reaction using an all-QM description of the entire enzyme. The underlying method is the frozen domain with dimers (FDD) formulation of the ...
1

### Jan Jensen

Shared publicly  -

Planned papers for 2015 - six months in
In January I wrote about the papers I plan to publish and made this list: Submitted 1. Søs Torpenholt, Leonardo De Maria, Mats H. M. Olsson, Lars H. Christensen, Michael Skjøt, Peter Westh, Jan H. Jensen and Leila Lo Leggio "Effect of mutations on the therm...
In January I wrote about the papers I plan to publish and made this list: Submitted 1. Søs Torpenholt, Leonardo De Maria, Mats H. M. Olsson, Lars H. Christensen, Michael Skjøt, Peter Westh, Jan H. Jensen and Leila Lo Leggio "Effect of mutations on the thermostability of Aspergillus aculeatus β-1 ...
1

### Jan Jensen

Shared publicly  -

The mind-blowing power of randomness

Here's a puzzle:

I write down two different numbers that are completely unknown to you, and hold one in my left hand and one in my right. You have absolutely no idea how I generated these two numbers. Which is larger?

You can point to one of my hands, and I will show you the number in it. Then you can decide to either select the number you have seen or switch to the number you have not seen, held in the other hand.  Is there a strategy that will give you a greater than 50% chance of choosing the larger number, no matter which two numbers I write down?

At first it seems the answer is no.  Whatever number you see, the other number could be larger or smaller.  There's no way to tell.  So obviously you can't get a better than 50% chance of picking the hand with the largest number - even if you've seen one of those numbers!

But "obviously" is not a proof.  Sometimes "obvious" things are wrong!

It turns out that, amazingly, the answer to the puzzle is yes.  You can find a strategy to do better than 50%.  But the strategy uses randomness.

I'd seen this puzzle before - do you know who invented it?

If you want to solve it yourself, stop now or read Quanta magazine for some clues - they offered a small prize for the best answer.

I'll paraphrase it here:

Pick some function f(x) defined for all real numbers, such that:

the limit as x → -∞ of f(x) is 0,

the limit as x → +∞ of f(x) is 1,

whenever x > y, f(x) > f(y).

(There are lots of functions like this; choose any one.)

Next, pick one hand at random. If the number you are shown is x, compute f(x). Then generate a uniform random number z between 0 and 1.  If z is less than or equal to f(x) guess that x is the larger number, but if z is greater than f(x) guess that the larger number is in the other hand.

The probability of guessing correctly can be calculated as the probability of seeing the larger number initially and then, correctly, sticking with it, plus the probability of seeing the smaller number initially and then, correctly, choosing the other hand.

This is

0.5 f(x) + 0.5 (1 - f(y)) = 0.5 + 0.5(f(x) – f(y))

This is strictly greater than 0.5, since x > y so f(x) - f(y) > 0.

So, you have a more than 50% chance of winning!  But as you play the game, there's no way to tell how much more than 50%.  If the numbers on the other players hands are very large, or very small, your chance will be just slightly more than 50%.

Puzzle 1: Prove that no deterministic strategy can guarantee you have a more than 50% chance of choosing the larger number.

Puzzle 2: There are perfectly specific but 'algorithmically random' sequences of bits, which can't predicted well by any program.  If we use these to generate a uniform algorithmically random number between 0 and 1, and use the strategy Egan describes, will our chance of choosing the larger number be more than 50%, or not?
1

### Jan Jensen

Shared publicly  -

Accurately Modeling Nanosecond Protein Dynamics Requires at least Microseconds of Simulation
Gregory R. Bowman  Journal of Computational Chemistry 2015 Contributed by  +Jan Jensen This papers compares computed and experimental order parameters for two proteins, ubiquitin and RNase H, computed using 10, 100, 1000, and 10000 ns (10 $\mu$s) explicit m...
Gregory R. Bowman Journal of Computational Chemistry 2015. Contributed by +Jan Jensen This papers compares computed and experimental order parameters for two proteins, ubiquitin and RNase H, computed using 10, 100, 1000, and 10000 ns (10 $\mu$s) explicit molecular dynamics simulations.
2

### Jan Jensen

Shared publicly  -

In what is seen as the opening shot of a global superstar revolt against the establishment, Taylor Swift announced on her twitter feed earlier today that she was no longer content to review papers for
View original post
2
1
People
In his circles
150 people
Have him in circles
900 people
Work
Employment
• University of Copenhagen
Professor of Bio-Computational Chemistry, present
• University of Iowa
1997 - 2006
Places
Currently
Copenhagen
Story
Introduction
I am a computational chemist working at the University of Copenhagen.  I work on protein design, quantum chemistry methods, and visualization
Education
• Iowa State University
Basic Information
Gender
Male