text:
ruby,file,csv,dir , Saying there are 0 arguments when I have 2? Trying to open a CSV file to write into

## Question:

Tag: ruby,file,csv,dir

I'm trying to read from a CSV file and codify people into groups using an equation. I append the name of their group they fall into to the end of the array that their row creates. Then I write it to a new file so I don't overwrite the original file in case something goes wrong.

Also, it loops through the directory and does this for multiple csv files.

However, when I try to open the new file to write into, it's saying this:

Segmenter.rb:12:in open': wrong number of arguments (0 for 1) (ArgumentError)
from Segmenter.rb:12:in foreach'
from Segmenter.rb:12:in '

Here is the script with the coefficients removed. All the x's in the coefficients array are numbers in my script.

require 'csv'

coefficients = [
[x, x, x, x, x, x, x, x, x, "Utilitarians"],
[x, x, x, x, x, x, x, x, x, "Hometown School/Social"],
[x, x, x, x, x, x, x, x, x, "State Pride"],
[x, x, x, x, x, x, x, x, x, "Hard-Wired Advocates"],
[x, x, x, x, x, x, x, x, x, "Game Hunters"]
]

Dir.foreach do |current_file|

data_set.array.each do |row|
segment_value = 0
segment_name = ""
coefficients.each do |segment|
if (segment[0] *  row[1] + segment[1]*row[2] + segment[2]*row[3] + segment[3]*row[4] + segment[4]*row[5] + segment[5]*row[6] + segment[6]*row[7] + segment[7]*row[8]) > segment_value
segment_value = segment[0] *  row[1] + segment[1]*row[2] + segment[2]*row[3] + segment[3]*row[4] + segment[4]*row[5] + segment[5]*row[6] + segment[6]*row[7] + segment[7]*row[8]
segment_name = segment[8]
end
row << segment_name
end

CSV.open("#{current_file.basename} SEGMENTED.csv", "w") do |writer|
data_set.array.each do |data|
writer << data
end
end

end

end

I believe the problem is with Dir.foreach, not CSV.open.

You need to supply a directory to foreach as an argument. That's why you are getting the missing argument error.

Try:

Dir.foreach('/path/to_my/directory') do |current_file|

I think the open that is referenced in the error message is when Dir is trying to find the directory to open in order to get the file list for foreach`.

# Related:

## RSpec test for rake task

I have created a custom rake task that deletes all items that are >= 7 days old. I am trying to write a RSpec test for this new task but it seems like my task isn't really running in the test. I have tested the task manually and it works...

## Ruby gsub group parameters do not work when preceded by escaped slashes

ruby,regex
I am trying to perform a trivial substitution, that in any other language I have come across, work as per the documentation. However, my substitution fails for some reason. The documentation examples list: "hello".gsub(/[aeiou]/, '*') #=> "h*ll*" "hello".gsub(/([aeiou])/, '<\1>') #=> "h<e>ll<o>" "hello".gsub(/./) {|s| s.ord.to_s + ' '} #=> "104 101...

## Rust: Lifetime of String from file [duplicate]

file,io,rust
This question already has an answer here: Return local String as slice 1 answer I'm trying to read in some external GLSL code into Rust. The reading works properly, but I run into a lifetime issue in the final expression (in the Ok(_) branch) error: s does not live...

## Heroku RAM not increasing with upgraded dynos

ruby-on-rails,ruby,ruby-on-rails-3,memory,heroku
I have a massive function i have been calling manually through the heroku rails console. I have been receiving the error rapid fire in my logs: 2015-06-22T14:56:42.940517+00:00 heroku[run.9877]: Process running mem=575M(112.4%) 2015-06-22T14:56:42.940517+00:00 heroku[run.9877]: Error R14 (Memory quota exceeded) A 1X dyno is suppose to have 512 MB of RAM. I...

## Storing columns on disk and reading rows

c++,file,matrix,io
So I have a C++ code that finds the inverse of a square matrix. The inverse is full and it would be bad to keep it all in memory because I am working with hundreds of thousands of columns. My code generates the columns one by one. After finding the...

## Ruby boolean logic: some amount of variables are true

ruby
Let say I have 3 variables: a, b, c. How can I check that just zero or one of them is true?...

## What is Rack::Utils.multipart_part_limit within Rails and what function does it perform?

ruby-on-rails,ruby,rack,multipart
Rack::Utils.multipart_part_limit is set to 128 by default. What purpose does the value have and what effect does it have within the Rails system?...

## How to get return value from a forked / spawned process in Ruby?

ruby,process,output,fork,spawn
My simple test program: pid = Process.spawn("sleep 10;date") How can I place the output (eg stdout) of the "date" command in a variable when it is available? I don't want to use a file for the data exchange....

## Ruby access words in string

ruby
I don't understand the best method to access a certain word by it's number in a string. I tried using [] to access a word but instead it returns letter. puts s # => I went for a walk puts s[3] # => w ...

## On rendering from controller, current_page method does not seem to work

ruby-on-rails,ruby,ruby-on-rails-4,model-view-controller
I have a navigation bar included in application.html.erb. Because for some pages, such as the signup page, I need to place additional code inside the navigation bar, I have excluded those pages for showing the navigation bar through application.html.erb and instead included it in their respective view pages. See code...

## Keep leading zeroes when converting string to integer

ruby
For no particular reason, I am trying to add a #reverse method to the Integer class: class Integer def reverse self.to_s.reverse.to_i end end puts 1337.reverse # => 7331 puts 1000.reverse # => 1 This works fine except for numbers ending in a 0, as shown when 1000.reverse returns 1 rather...

## IllegalStateException: Iterator already obtained [duplicate]

java,file,loops,path
This question already has an answer here: java.lang.IllegalStateException: Iterator already obtained 1 answer so I wrote a little Java program to test a little stack language I made vie various test file, but for some reason it won't work. Here is the code: import org.apache.commons.io.FilenameUtils; import java.io.IOException; import java.nio.file.*;...

ruby-on-rails,ruby,rest,activerecord,one-to-many
I'm creating a rails application that is a backend for a mobile application. The backend is implemented with a RESTful web API. Currently I am trying to add gamification to the platform through the use of badges that can be earned by the user. Right now the badges are tied...

## Same enum values for multiple columns

ruby-on-rails,ruby,enums
I need to do something like this: class PlanetEdge < ActiveRecord::Base enum :first_planet [ :earth, :mars, :jupiter] enum :second_planet [ :earth, :mars, :jupiter] end Where my table is a table of edges but each vertex is an integer. However, it seems the abvove is not possible in rails. What might...

## Ruby: How to copy the multidimensional array in new array?

ruby-on-rails,arrays,ruby,multidimensional-array
seating_arrangement [ [:first, :second, :none], [:first, :none, :second], [:second, :second, :first], ] I need to copy this array into new array. I tried to do it by following code: class Simulator @@current_state def initialize(seating_arrangement) @@current_state = seating_arrangement.dup end But whenever I am making any changes to seating_arrangement current_state changes automatically....

## How to get rid of .ignore file in Git?

git,file,bitbucket,ignore
I have create an ignore file , the list included .jar files . I then merged my branch to a development branch and even though I had resolved all my conflicts , I still had a lot of errors. Most of them had something to do with support.v4 (the import...

## Get the actual value of a boolean attribute

ruby,page-object-gem,rspec3,rspec-expectations
I have the span: Edit Member When I try to get the value of the disabled attribute: page.in_iframe(:id => 'MembersAreaFrame') do |frame| expect(page.span_element(:xpath => "//span[text()='Edit Member']", :frame => frame).attribute('disabled')).to eq("disabled") end I get: expected: "disabled" got: "true" How do I get the value of specified attribute instead of a...

## How to pivot array into another array in Ruby

arrays,ruby,csv
I have a multidimensional array like this one : myArray = [["Alaska","Rain","3"],["Alaska","Snow","4"],["Alabama","Snow","2"],["Alabama","Hail","1"]] I would like to end up with CSV output like this. State,Snow,Rain,Hail Alaska,4,3,nil Alabama,2,nil,1 I know that to get this outputted to CSV the way I want it I have to have output array like this: outputArray =[["State","Snow","Rain","Hail"],["Alaska",4,3,nil],["Alabama",2,nil,1]]...

## Appending an element to a page in VoltRb

html,ruby,opalrb,voltrb
I'm trying to append an element to one of my pages in a Volt project, via opal-browser, like so: if RUBY_PLATFORM == 'opal' require 'browser' \$document.body << my_dom_element.to_n end # controller code below Unfortunately, I'm getting an error: [Error] TypeError: null is not an object (evaluating 'value.nodeType') (anonymous function) (main.js,...

## Ruby- get a xml node value

ruby,xml
can someone help me in extracting the node value for the element "Name". Type 1: I am able to extract the "name" value for the below xml by using the below code <Element>  <ID>20367</ID> <Name>Ram</Name> <Name>Sam</Name>  </Element> doc = Nokogiri::XML(response.body) values = doc.xpath('//Name').map{ |node| node.text}.join ',' puts values...

## How to handle backslash “\” escape characters in q string and heredocument

ruby
Ruby Newbie here. I do not understand why Ruby looks inside %q and escapes the \. I am using Ruby to generate Latex code. I need to generate \\\hline which is used in Latex for table making. I found \\\hline as input generated \hline even though the string was inside...

## Split an array into slices, with groupings

arrays,ruby,enumerable
I've got some Ruby code here, that works, but I'm certain I'm not doing it as efficiently as I can. I have an Array of Objects, along this line: [ { name: "foo1", location: "new york" }, { name: "foo2", location: "new york" }, { name: "foo3", location: "new york"...


text:
The Operations on Integers Series

In the previous post, I have mentioned that it is important for you to master basic mathematics. One of the basic skills that you should master is operations on integers. Luckily, I have finished writing all the tutorials and reviewers for all the operations on integers.  They are listed below.

Good luck and have fun. I will be posting the quizzes and PDF exercises soon, so keep posted.

It’s 3 Months Before the Next Exam! 4 Things To do

Yes, it’s three months before the next 2014 Civil Service Exam.If the original schedule pushes through, then the next exam will be on October 26th, exactly 3 months from now.

I think it is the perfect time for you to start your review seriously. Here are some of the things that you can do.

1.) Know the scope of the exam.

The exam is mainly composed of English and Mathematics. The details of the scope of the Civil Service Professional Exam and Sub-professional Exam can be found here. Focus on these types of exams, read, and practice everyday.  » Read more

When to Use the Personal Pronouns I and Me

When do we use the personal pronouns I or me?

We use the word “I” when the pronoun is the subject of the verb. Meanwhile, we use the “me” if we are referring to the object of the verb.

Quick and dirty tip!

If you are confused, try to temporarily take out the other subject and read out loud. If it sounds nice, then it should be the correct one.

Example: (I, me) will go to Dumaguete with Jhody.

1. I will go to will go to Dumaguete with Jhody.
2. Me will go to Dumaguete with Jhody.  » Read more

How to Calculate the Circumference of a Circle

In the previous post, we have learned about the basic terminologies about circles. We continue this series by understanding the meaning of circumference of a circle. The circumference of a circle is basically the distance around the circle itself. If you want to find the circumference of a can, for example, you can get a measuring tape and wrap around it.

The animation below shows, the meaning of circumference. As we can see, the circle with diameter 1 has circumference $\pi$ or approximately $3.14$.

Note: If you want to know where $\pi$ came from, read Calculating the Value of Pi.

Example 1

What is the perimeter of a circle with diameter 1 unit?  » Read more

Introduction to the Basic Concepts of Circles

The Civil Service Exams also contain geometry problems, and so far, our discussions are mostly algebra problems. In this new series of posts, we will discuss how to solve geometry and measurement problems particularly about circles. However, before we start solving problems, let us first discuss the basic terminologies about circles.

A circle is a set of points equidistant to a point called the center of the circle. As I go around to give trainings and lectures , I usually hear the wrong definition below. I am not sure where this definition originated, but this is wrong.  » Read more

Grammar Tutorial: Subject-Verb Agreement

Subject-verb agreement:

If the subject is singular the verb should have “s” at the end. If the subject is plural there is no “s” at the end of the verb, except for the word “I” which always take the plural form of the verb.

Example: Jenna writes a poem.

In this sentence, the subject Jenna is singular, so the verb writes has “s” at the end.

Example: We visit our grandparents every Sunday.

In this sentence, the subject we is plural, so the verb visit has no “s.”

Grammar and Correct Usage Quiz 7

This is the seventh part of the Grammar and Correct Usage Quiz Series.

Grammar and Correct Usage Quiz 7

Fill in the blanks with the most appropriate word.

1. The group insisted on an investigation of ___ member’s dismissal and threatened to sue the company.

a.) its
b.) their
c.) there
d.) it’s

a. its (group is a singular noun)

2. People with _____ problems are likely to have a more positive outlook in life.

a.) less
b.) fewer
c.) more

Grammar and Correct Usage Quiz 6

It seems that everybody enjoyed the previous grammar quizzes, so I plan to create a few more. Below is the sixth of the Grammar Quiz Series.

Grammar and Correct Usage Quiz 6

Fill in the blanks with the most appropriate word.

1. The coffee is sweet. I think you put too ___ sugar.

a.) many
b.) much
c.) more
d.) excessive

format: plain


text:
# 6.R: Periodic Functions (Review)

## 6.1: Graphs of the Sine and Cosine Functions

For the exercises 1-8, graph the functions for two periods and determine the amplitude or stretching factor, period, midline equation, and asymptotes.

1) $$f(x)=-3\cos x+3$$

amplitude: $$3$$; period: $$2\pi$$; midline: $$y=3$$$;$no asymptotes

2) $$f(x)=\dfrac{1}{4}\sin x$$

3) $$f(x)=3\cos\left ( x+\dfrac{\pi }{6} \right )$$

amplitude: $$3$$; period: $$2\pi$$; midline: $$y=0$$; no asymptotes

4) $$f(x)=-2\sin\left ( x-\dfrac{2\pi }{3} \right )$$

5) $$f(x)=3\sin\left ( x-\dfrac{\pi }{4} \right )-4$$

amplitude: $$3$$; period: $$2\pi$$; midline: $$y=-4$$; no asymptotes

6) $$f(x)=2\left (\cos\left ( x-\dfrac{4\pi }{3} \right )+1 \right )$$

7) $$f(x)=6\sin\left ( 3x-\dfrac{\pi }{6} \right )-1$$

amplitude: $$6$$; period: $$dfrac{2\pi }{3}$$; midline: $$y=-1$$; no asymptotes

8) $$f(x)=-100\sin(50x-20)$$

## 6.2: Graphs of the Other Trigonometric Functions

For the exercises 1-4, graph the functions for two periods and determine the amplitude or stretching factor, period, midline equation, and asymptotes.

1) $$f(x)=\tan x-4$$

stretching factor: none; period: $$\pi$$$;$midline: $$y=-4$$$;$asymptotes: $$x=\dfrac{\pi }{2}+\pi k$$, where $$k$$ is an integer

2) $$f(x)=2\tan \left ( x-\dfrac{\pi }{6} \right )$$

3) $$f(x)=-3\tan (4x)-2$$

stretching factor: $$3$$; period: $$\dfrac{\pi }{4}$$; midline: $$y=-2$$; asymptotes: $$x=\dfrac{\pi }{8}+\dfrac{\pi }{4}k$$, where $$k$$ is an integer

4) $$f(x)=0.2\cos(0.1x)+0.3$$

For the exercises 5-10, graph two full periods. Identify the period, the phase shift, the amplitude, and asymptotes.

5) $$f(x)=\dfrac{1}{3}\sec x$$

amplitude: none; period: $$2\pi$$; no phase shift; asymptotes: $$x=\dfrac{\pi }{2}k$$, where $$k$$ is an integer

6) $$f(x)=3\cot x$$

7) $$f(x)=4\csc (5x)$$

amplitude: none; period: $$\dfrac{2\pi }{5}$$; no phase shift; asymptotes: $$x=\dfrac{\pi }{5}k$$, where $$k$$ is an integer

8) $$f(x)=8\sec \left (\dfrac{1}{4}x \right )$$

9) $$f(x)=\dfrac{2}{3}\csc \left (\dfrac{1}{2}x \right )$$

amplitude: none; period: $$4\pi$$; no phase shift; asymptotes: $$x=2\pi k$$, where $$k$$ is an integer

10) $$f(x)=-\csc (2x+\pi)$$

For the exercises 11-15, use this scenario: The population of a city has risen and fallen over a $$20$$-year interval. Its population may be modeled by the following function: $$y=12,000+8,000\sin(0.628x)$$, where the domain is the years since 1980 and the range is the population of the city.

11) What is the largest and smallest population the city may have?

largest: $$20,000$$; smallest: $$4,000$$

12) Graph the function on the domain of $$[0,40]$$.

13) What are the amplitude, period, and phase shift for the function?

amplitude: $$8,000$$; period: $$10$$; phase shift: $$0$$

14) Over this domain, when does the population reach $$18,000$$? $$13,000$$?

15) What is the predicted population in 2007? 2010?

In 2007, the predicted population is $$4,413$$. In 2010, the population will be $$11,924$$.

For the exercises 16a-16d, suppose a weight is attached to a spring and bobs up and down, exhibiting symmetry.

16) Suppose the graph of the displacement function is shown in the Figure below, where the values on the $$x$$-axis represent the time in seconds and the $$y$$-axis represents the displacement in inches.

1. Give the equation that models the vertical displacement of the weight on the spring.
2. At $$\text{time} = 0$$, what is the displacement of the weight?

$$5$$ in.

1. At what time does the displacement from the equilibrium point equal zero?
2. What is the time required for the weight to return to its initial height of $$5$$ inches? In other words, what is the period for the displacement function?

$$10$$ seconds

## 6.3: Inverse Trigonometric Functions

For the exercises 1-11, find the exact value without the aid of a calculator.

1) $$\sin ^{-1}(1)$$

2) $$\cos ^{-1}\left ( \dfrac{\sqrt{3}}{2} \right )$$

$$\dfrac{\pi }{6}$$

3) $$\tan ^{-1}(-1)$$

4) $$\cos ^{-1}\left ( \dfrac{1}{\sqrt{2}} \right )$$

$$\dfrac{\pi }{4}$$

5) $$\sin ^{-1}\left ( \dfrac{-\sqrt{3}}{2} \right )$$

6) $$\sin ^{-1}\left (\cos \left (\dfrac{\pi }{6} \right ) \right )$$

$$\dfrac{\pi }{3}$$

7) $$\cos ^{-1}\left (\tan \left (\dfrac{3\pi }{4} \right ) \right )$$

8) $$\sin \left (\sec^{-1} \left (\dfrac{3}{5} \right ) \right )$$

No solution

9) $$\cot \left (\sin^{-1} \left (\dfrac{3}{5} \right ) \right )$$

10) $$\tan \left (\cos^{-1} \left (\dfrac{5}{13} \right ) \right )$$

$$\dfrac{12}{5}$$

11) $$\sin \left (\cos^{-1} \left (\dfrac{x}{x+1} \right ) \right )$$

12) Graph $$f(x)=\cos x$$ and $$f(x)=\sec x$$ on the interval $$[0,2\pi )$$ and explain any observations.

The graphs are not symmetrical with respect to the line $$y=x$$.They are symmetrical with respect to the $$y$$-axis.

13) Graph $$f(x)=\sin x$$ and $$f(x)=\csc x$$ and explain any observations.

14) Graph the function $$f(x)=\dfrac{x}{1}-\dfrac{x^3}{3!}+\dfrac{x^5}{5!}-\dfrac{x^7}{7!}$$ on the interval $$[-1,1]$$ and compare the graph to the graph of $$f(x)=\sin x$$ on the same interval. Describe any observations.

The graphs appear to be identical.

## Practice Test

For the exercises 1-13, sketch the graph of each function for two full periods. Determine the amplitude, the period, and the equation for the midline.

1) $$f(x)=0.5\sin x$$

amplitude: $$0.5$$; period: $$2\pi$$$;$midline $$y=0$$


text:
# Lagrange multipliers: PCA and SVM¶

###### COMP4670/8600 - Statistical Machine Learning - Tutorial¶

In this lab we will apply Lagrange multipliers to solve and implement both principal component analysis (PCA) and support vector machines (SVM).

## Textbook Questions¶

These questions are hand picked to both be of reasonable difficulty and demonstrate what you are expected to be able to solve. The questions are labelled in Bishop as either $\star$, $\star\star$, or $\star\star\star$ to rate its difficulty.

• Question 11.1: (Difficulty $\star$, simple algebraic derivation)
• Question 11.2: (Difficulty $\star$, simple algebraic derivation)
• Question 11.3: (Difficulty $\star$, simple algebraic derivation)
• Question 11.4: This question is easier if you've completed the earlier 3 questions. Do not attempt first.(Difficulty $\star \star$, simple algebraic derivation)
• Question 11.5: This question will give you a good understanding of how the co-variance matrix works. (Difficulty $\star$, simple algebraic derivation)
• Question 11.7: This is basically just another version of Q11.3 (Difficulty $\star$, simple algebraic derivation)
• Question 11.9: This is a fun question to verify your understanding. Do this last. Basically, you can invent a dataset and apply your python program to it (Difficulty $\star \star$, but in reality this is easy if you understand rejection sampling enough to implement it)
• Question 11.10: (Difficulty $\star$, simple algebraic derivation)

### Assumed knowledge:¶

• Optimisation in Python (lab)
• PCA (lecture)
• SVM (lecture)

### After this lab, you should be comfortable with:¶

• Applying Lagrange multipliers to optimisation problems
• Implementing solutions with Lagrange multipliers
In [ ]:
import matplotlib.pyplot as plt
import numpy as np
import scipy.optimize as opt

%matplotlib inline

For this lab we will use a spam email dataset. This dataset contains 57 features which are word and character frequencies, as well as whether an email is spam or not. The last column of the dataset is the label, which indicates whether or not something is spam.

Load and shuffle the data. Currently, the labels are an element of {0, 1}. Convert the labels into {-1 ,1} (as preparation for SVM). Then normalise the data to have zero mean and unit variance.

In [ ]:
import csv

# Load the data into features and labels.
indices = np.arange(len(data))
np.random.shuffle(indices)
features = np.nan_to_num(data[indices, :-1])
# Convert binary labels into {-1, 1} (for the SVM later in the lab).
labels = data[indices, -1].astype(bool) * 2 - 1

# Normalise the data.
features -= features.mean(axis=0, keepdims=True)
features /= features.std(axis=0, keepdims=True)

N = len(features)

features.shape

## Lagrange multipliers¶

One way to solve optimisation problems with equality constraints is to use Lagrange multipliers. We can write such optimisation problems in the following form:

\begin{align*} \underset{x}{\mathrm{maximise}}&\ f(x)\\ \mathrm{such\ that}&\ h(x) = 0. \end{align*}

We have an objective function $f : \mathbb{R}^n \to \mathbb{R}$, a set of (vectorised) equality constraints $h : \mathbb{R}^n \to \mathbb{R}^m$, and an optimisation parameter $x \in \mathbb{R}^n$.

Lagrange multipliers are additional parameters $\lambda \in \mathbb{R}^m$, which we introduce by defining the Lagrange function $\mathcal L$ of this problem. The Lagrange function is

$$\mathcal L(x, \lambda) = f(x) - \lambda \cdot h(x).$$

Once we have a Lagrange function, we then need to find its stationary points, i.e. $\nabla \mathcal L_{x, \lambda}(x, \lambda) = 0$.

For an inequality constraint, we require our multipliers to be $\lambda \geq 0$.

Spend a few minutes dicuss with your neighbour why solving the lagrangian is equivalent to solving the original optimisation problem.

## 1. Principal component analysis¶

In PCA, we have $D$-dimensional observations $x_1, \dots, x_N \in \mathbb{R}^D$. We want to find a 1-dimensional subspace with maximum variance. We can represent this subspace by a normal unit vector $u \in \mathbb R^D$.

We can also write the set of observations in matrix form: $X \in \mathbb R^{N \times D}$.

Each observation is projected onto the subspace: for an observation $x$, the projected observation is $u^Tx$. The variance of the projected data is $u^TSu$ with covariance matrix $S = \frac{1}{N} \sum_{i = 1}^N \left(x_i - \bar x\right) \left(x_i - \bar x\right)^T$ where $\bar x$ is the mean observation.

We want to maximise the variance of observations projected onto $u$.

(If necessary, refer to week 6 lab for more detail)

### 1a.¶

Write down the optimisation problem in the form shown above, clearly showing the objective function and equality constraints.

--- replace this with your solution, add and remove code and markdown cells as appropriate ---

### 1b.¶

Write down the Lagrange function for this problem.

--- replace this with your solution, add and remove code and markdown cells as appropriate ---

### 1c.¶

By differentiating the Lagrange function with respect to $u$ and $\lambda$ and equating the derivatives to zero, show that the stationary points are unit eigenvectors of $S$.

--- replace this with your solution, add and remove code and markdown cells as appropriate ---

### 1d.¶

Find the stationary point that maximises the variance.

--- replace this with your solution, add and remove code and markdown cells as appropriate ---

### 1e.¶

In general, we can have a $k$-dimensional subspace. The $k$ principal components are the $k$ eigenvectors associated with the $k$ largest eigenvalues.

Using np.linalg, find the first two principal components of the spam email features, project the data onto these components, then scatter plot these components with matplotlib. Colour the points in the plot by their label.

In [ ]:
# replace this with your solution, add and remove code and markdown cells as appropriate

## 2. Support vector machines¶

Support vector machines (SVM) are a maximum-margin classifier. From the lectures (7B slides 'Maximum Margin Classifiers'), we can write an SVM as a quadratic problem:

\begin{align*} &\underset{w}{\mathrm{minimise}}\ \frac{1}{2} \langle w, w \rangle\\ &\mathrm{such\ that}\ t_i \langle w, x_i \rangle - 1 \geq 0, i = 1 \dots N \end{align*}

where we have data points $x_1, \dots, x_N$ with associated labels $t_1, \dots, t_N \in \{-1, 1\}$.

What assumption are we making about the feature map? Note bias is ignored as it does not affect the dual representation.

### 2a.¶

Write down the Lagrange function for this problem. Note the minimise. (7B slide 'Lagrange Multipliers for General Case')

--- replace this with your solution, add and remove code and markdown cells as appropriate ---

### 2b.¶

By differentiating, find the stationary points of the Lagrange function. Use these as constraints to eliminate $w$ in the Lagrange function and hence show that the dual representation of the SVM is:

\begin{align*} &\underset{\lambda}{\mathrm{maximise}}\ -\frac{1}{2}\sum_{i = 1}^N \sum_{j = 1}^N \lambda_i \lambda_j t_i t_j \langle x_i, x_j \rangle + \sum_{i = 1}^N \lambda_i\\ &\mathrm{such\ that}\ \lambda_i \geq 0, i = 1 \dots N \end{align*}

--- replace this with your solution, add and remove code and markdown cells as appropriate ---

### 2c.¶

The dual representation for this problem in the non-separable case, which we won't derive here, is:

\begin{align*} &\underset{\lambda}{\mathrm{maximise}}\ -\frac{1}{2}\sum_{i = 1}^N \sum_{j = 1}^N \lambda_i \lambda_j t_i t_j \langle x_i, x_j \rangle + \sum_{i = 1}^N \lambda_i\\ &\mathrm{such\ that}\ 0 \leq \lambda_i \leq C, i = 1 \dots N \end{align*}

for box parameter $C > 0$. We can vectorise this by introducing the matrix $Q$ such that

$$Q_{nm} = t_n t_m \langle x_n, x_m \rangle.$$

The dual representation becomes

\begin{align*} &\underset{\lambda}{\mathrm{maximise}}\ -\frac{1}{2} \lambda^T Q \lambda + 1^T \lambda\\ &\mathrm{such\ that}\ 0 \leq \lambda_i \leq C, i = 1 \dots N \end{align*}

The gradient of the objective function is

$$-\lambda^T Q + 1$$

and the Hessian is $-Q$.

Implement a function make_Q(features, labels) that generates the matrix Q as defined above. Then implement the function svm_objective(l, Q) which calculates the value of the dual objective function for $Q$. Make sure to use the vector form of the objective function so that your function is efficient.

In [ ]:
# replace this with your solution, add and remove code and markdown cells as appropriate

In [ ]:
Q = make_Q(features, labels)
svm_objective(np.random.normal(size=N), Q)

### 2d.¶

Implement a function train(Q, C) which maximises the dual objective. Use opt.fmin_l_bfgs_b. Assume $C = 1$. Dont forget to supply the gradient to the optimisation function. Also note that the optimisation function finds fmin.

In [ ]:
# replace this with your solution, add and remove code and markdown cells as appropriate

In [ ]:
lambdas = train(Q, C=1)

### 2e.¶

The support vectors are all $x_n$ such that $\lambda_n > 0$. Repeat your PCA scatter plot, but highlight the support vectors.

In [ ]:
# replace this with your solution, add and remove code and markdown cells as appropriate

### 2f. Prediction¶

$\mathcal S$ is the set of support vectors and $N_{\mathcal S}$ is the number of support vectors.

We make predictions with an SVM using the equation

$$f(x) = w^Tx +b$$

Hint what should this equation be when x is matrix?

Where the weight is computed by

$$w = \sum_{n \in \mathcal S} \lambda_n t_n \phi (x_n)$$

$b$ is the bias, which is given by

$$b = \frac{1}{N_{\mathcal S}} \sum_{n \in \mathcal S} \left(t_n - \sum_{m \in \mathcal S} \lambda_m t_m \langle x_m, x_n \rangle\right).$$

Write a function predict(lambdas, features, labels) which returns predictions.

Plot and colour-code the points by their predicted label.

In [ ]:
# replace this with your solution, add and remove code and markdown cells as appropriate

### 2g. Kernels¶

The data in our SVM only enters through the inner product $\langle x_m, x_n \rangle$. By replacing this with a kernel, we can kernalise the SVM.

Write a function make_Q_gaussian(features, labels, sigma=1) which generates the matrix $Q$ using a Gaussian kernel with bandwidth $\sigma$.

Gaussian Kernel is defined as:

$$k(x,x')=exp(-||x-x'||^2/2\sigma^2)$$

We now make predictions with an SVM using the equation $$f(x) = \sum_{n = 1}^N \lambda_n t_n k (x, x_n) + b.$$

Write a new prediction fuction predict_k(lambdas, kernel, labels) that make use of the kernel in prediction and make prediction on the dataset using this new kernel.

Note that the feature space is infinite dimensional so the weight is generally intractable. However, the classifier can still be obtain using the kernel.

In [ ]:
# replace this with your solution, add and remove code and markdown cells as appropriate

In [ ]:


text:
View Single Post
 P: 825 Newtons third law states that there is a counter force to every force. Unfortunately this doesn't seem to work for moving point charges. The Coulomb force cancels out but the B-Field of a moving point charge is: $$\mathbf{B}=\frac{\mu_0}{4\pi}q \frac{\mathbf{v}\times\mathbf{r}}{\left|r\right|^3}$$ And the Lorenz force is $$\mathbf{F}=q\, \mathbf{v}\times \mathbf{B}$$ Lets assume that the two charges have velocities $\mathbf{v}_1,\mathbf{v}_1$ Therefore the two Lorenz forces are $$\mathbf{F}_1=k(r)\, \mathbf{v}_1 \times (\mathbf{v}_2 \times\mathbf{r})$$ and $$\mathbf{F}_2=k(r)\, \mathbf{v}_2 \times (\mathbf{v}_1 \times (- \mathbf{r}))$$ Due to the Jacobi identity the sum of the two forces is not zero $$\mathbf{F}_1+\mathbf{F}_2=- k(r)\, \mathbf{r}\times(\mathbf{v}_1\times \mathbf{v}_2)$$ What is the solution here? The Pointing vector? Relativity? I think that the basic formulas must be correct for slowly moving charges. So it shouldn't be due to non linear trajectories, neglected acceleration or some such thing.


text:
# Why is the empty set open?

1. May 18, 2008

### Epsilon36819

The definition of an open set S is that there exists, for any point x element of S, an open ball with center x, all of whose points belong to S.

But if S is the empty set, then it contains no point. How can we say that the above is valid if there is no point around which to build an open ball?

I can understand why the empty set is closed. Since any closed set contains all its accumulation points and since the empty set has no such accumulation point, the set of all accumulation points is empty and is therefore contained (an equal!) to the empty set.

But in the case of openness, we are faced with a P => Q where P is not true. In such case, we cannot say anything about Q, so to me, the question of whether the empty set is open or not has no answer...

I'd appreciate your mathematical wisdom on this one...

PS. After more thought, I have come to a possible "explanation". Since any statement is either true or false and since the statement that the empty set is open clearly is not false (as in not falsifiable), then it must be true. (Of course, I could also say that it is not true, so it must be false...)

Last edited: May 18, 2008
2. May 18, 2008

### exk

From wikipedia: http://en.wikipedia.org/wiki/Empty_set

Considered as a subset of the real number line (or more generally any topological space), the empty set is both closed and open. All its boundary points (of which there are none) are in the empty set, and the set is therefore closed; while for every one of its points (of which there are again none), there is an open neighbourhood in the empty set, and the set is therefore open. Moreover, the empty set is a compact set by the fact that every finite set is compact.

3. May 19, 2008

### tiny-tim

I'm confused.

If the empty set is open, then its complement must be closed.

But the complement of the empty set is the whole set, which needn't be closed.

4. May 19, 2008

### CRGreathouse

An open set is one that, for all x in the set, blah blah blah. $$\forall x\in\emptyset\varphi(x)$$ is true for all predicates $$\varphi$$ since there aren't any members to falsify it.

1. If a set is open, its complement is closed.
2. The empty set is open.
3. The complement of the empty set is closed.
4. The complement of the empty set need not be closed.

Steps 1 and 2 are true; step 3 follows. Step 4 is false.

Last edited: May 19, 2008
5. May 19, 2008

### Epsilon36819

But it wouldn't be a contradiction to say: "for every one of its points (of which there are again none), there is no open neighbourhood in the empty set, and the set is therefore closed."

There is no point around which to build a n-ball so any statement drawn from the use of such n-balls is bound to be inconclusive. At least, that's how I see it...

Anyone?

6. May 19, 2008

### CRGreathouse

Why is this a problem? The definition is "for all x in the set, stuff", not "for all x in the set, stuff, plus there is some x in the set". Every member of the empty set is a pony. Every member of the empty set is an inaccessible cardinal. Every member of the empty set is your father.

7. May 19, 2008

### CRGreathouse

The negation of
$$\forall x\in S,\varphi(x)$$
is
$$\exists x\in S,\neg\varphi(x)$$
not
$$\forall x\in S,\neg\varphi(x)$$

The negation of "all cats are mammals" is "there is a cat that is not a mammal".

Last edited: May 19, 2008
8. May 19, 2008

### Epsilon36819

The complement of the empty set (the real line in 1D, for example) is also both open and closed.

For instance, any neighborhood of any point element of the real is also element of the real, so the set is open. Also, all accumulation points are elements of the real, so the set is closed.

9. May 19, 2008

### Epsilon36819

HA! Get it!

Thanks!

10. May 19, 2008

### HallsofIvy

Staff Emeritus
The empty set is open because the statement: "if x in A, some neighborhood of x is a subset of A" is true!

If A is empty, the hypothesis: "if x in A" is false and so the statement is vacuously true.

Last edited: May 19, 2008
11. May 19, 2008

### LukeD

Closed is not the opposite of open, it is the dual. I.e., if a set A is open, you do not know that it is not closed, but you do know that the complement of A is closed. (same goes if we switch all instances of open and closed in that sentence)

Someone said that it is not necessarily the case that the entire space is closed. However, when a set is open or closed, it is open or closed with respect to some set. As we have shown, the empty set is both open and closed with respect to any metric space. The complement of the empty set is the entire metric space, so this means that the entire metric space is both open and closed with respect to itself. Think about what this means for a while, and you'll see that it's obviously true.

A comment that might help: For a sequence to have a limit the limit needs to lie in the metric space. For instance, if our metric space is $$\mathbb{Q}$$ and we have a sequence whose limit is $$\sqrt{2}$$ then the sequence does not have a limit because $$\sqrt{2} \notin \mathbb{Q}$$. This means that the set $$[0, \sqrt{2}) \cap \mathbb{Q}$$ is closed in $$\mathbb{Q}$$

12. May 19, 2008

### Epsilon36819

Actually, that example was quite insightful. I am just reading Apostol's Methematical Analysis text and so far the setting is R-n. Of course, the definition of a closed set is given as a set whose complement in R-n is open, but I had not realized that the definition could be extended to the complement in any set and that a set could be open wrt a given set and closed wrt another set.

13. May 21, 2008

### HallsofIvy

Staff Emeritus
The definition of "topological space" (as opposed to the narrower "metric space) is a set, X, together with a collection, T, of subsets of X (called a "topology" for X) such that:
1) All unions of members of T are members of T
2) All finite intersections of T are members of T
3) X itself is in T
4) The empty set is in T

Of course, the members of T are called "open" sets. If the empty set weren't open in a "metric topology", it wouldn't be a topology!

14. May 21, 2008

### LukeD

Exactly. You can prove that the open sets of a metric space form a topology, and the question posed in this topic was about part of that proof. (Of course, the definition of a topological space in general is often not presented in your first exposure to analysis)

15. Jan 12, 2010

### Prologue

This has always bothered me, why does it mean that the implication is true? I am more inclined to say the implication makes no sense, doesn't apply, is undefined, in our case. You could define the result of that implication to be true, but why would it follow from 'sense' that it is true? In other words, how do you know that the implication actually is true? Can't I say, if the moon is made of cheese, then books are made of hair?

How is that implication true?

Also, if you can merely define it to be true then you could define it to be false, and now what?

Last edited: Jan 12, 2010
16. Jan 12, 2010

### VeeEight

17. Jan 12, 2010

### JSuarez

The particular implication used in Mathematics is called "material implication" and it's defined by a truth table in which, for the cases where the antecedent is false, the implication is true. This may seem (and it is) at odds with our use of conditional sentences "If...then...", because we give them, consciously or not, a causal meaning; as in Mathematics, notions like causality and modality don't have significant roles, this type of implication works quite well, despite the occasional feeling of oddness (it occurs particularly in these limit cases that "stretch" the definitions).

But material implication is only one of a class of logical entities known as Conditionals, and there are others that are more intuitive; the downside is that we don't have a clear and developed semantics for them.

18. Jan 13, 2010

### Prologue

Never heard of it as an 'entity', checking it out now.

Edit: quote from wikipedia

'They are true because a material conditional is defined to be true when the antecedent is false (or the conclusion is true).'

Looked up material conditional and it seems that there are two conditionals, logical and material. Logical seems to follow my intuition, where the answer is undefined if the antecedent is false (because it doesn't allow F antecedents). Material follows the conventional assignment of T to the implication when the antecedent is false.

I still have seen no motivation for picking T over F in the assignment of the value of the material implication when the antecedent is false. (or a reason to pick either of them, for that matter)

To pick out another non-sensical (to me) conditional: If the moon is made entirely of cheese, then the moon is made entirely of hair.

And that statement is true?

Edit 2: Didn't see that last post. I am not claiming any causality between them. I am familiar with such things as "If the ocean is blue, then a car has an engine." That seems vacuously true to me, where it is known that each is true and you just tie them together with an implication and call it good. It only seems to make sense to analyze the situation when you have variables in the conditional, say

$$(x>0) \rightarrow (y\le 5)$$

But anytime x is less than zero, somehow the implication is chosen to be true. It seems very arbitrary. Why can't I just pick a vacuous fallacy?

Edit 3: Since there is a logical equivalent using only ands/ors/nots, why not just leave out the entire idea of implication? Why bother with it if it has an already well defined equivalent?

Last edited: Jan 13, 2010
19. Jan 13, 2010

### JSuarez

The motivation to pick a definite truth value lies in the principle of bivalence, that states that all meaningful statements must be either true or false.

The choice of the "true" truth value when the antecedent is false is because a number of reasons, for example:

(1) When is a statement "If A then B" clearly false? Intuitively, when A is true and B is false; but this is the expression $$A \wedge \neg B$$; so, the negation of this expression must be true; but the de Morgan's laws then state that $$\neg A\vee B$$ must be true, and is this last expression that it's used as a classical equivalent to the material implication.

(2) Another reason is quantified statements like this one: "All men are mortal". Its logical form is:

$$\forall x\left(A\left(x\right)\rightarrow B\left(x\right)\right)$$

But suppose you are quantifying over a domain larger than that of men; you still want that expression to be true, but the antecedent will be false for some elements of the enlarged domain, so it makes sense to consider the whole implication true.

Regarding your example, if you interpret the If...then as the material conditional, then you have no other choice but to consider it true; but remember that, in natural language, the material implication is not always the best choice, and in that specific case, called a "counterfactual" is particularly bad.
Suppose that, in some possible world, the moon is indeed a large hunk of cheese; then, in that world, the statement is false. Consider now a stronger form of implication that is only true if it's true in every possible world: with this implication, your statement would be false (but this is a case of a kind of modality, and mathematics is not modal, so material implication works well).

Check the following links, if you are interested:

http://plato.stanford.edu/entries/logic-conditionals/

http://plato.stanford.edu/entries/conditionals/

EDIT: just saw your last post. You know why that sentence seems vacuously true? Because the consequent is very likely to be true. Those are easier to accept. It's also true (I wrote some of if above) that implication may be classically defined as $$\neg A \vee B$$ (but not, for example, if you want to give it a constructivist meaning, but that's another story); the reason it's not eliminated is because the If...then... construct seems to be very basic to our reasoning and inference processes; it would be very awkward to reason only in terms of "or" and "not".

Last edited: Jan 13, 2010
20. Jan 13, 2010

### Staff: Mentor

I know it is OT, but I just started to wonder if I trust more mathematicians or lawyers.


text:
# Global Financial Cycles and risk premiums

Felix Ward, Moritz Schularick, Òscar Jordà and Alan M Taylor

In April the Bank hosted a workshop organised jointly with the IMF and ECB, on the theme of “International Spillovers of Shocks and Macroeconomic Policies”. In this guest post, the authors of one of the papers presented look at how and why co-movement of international equity prices has increased over time.

Asset markets in advanced economies have become integrated to a degree never seen before in the history of modern finance. This is especially true for global equities starting in the 1990s. We find that this increase in synchronization is primarily driven by fluctuations in risk-appetite rather than in risk-free rates, or in dividends. Moreover, we find that U.S. monetary policy plays a major role in explaining such fluctuations. This transmission channel affects economies with both fixed and floating exchange rates, although the effects are more muted in floating rate regimes.

The Global Financial Crisis highlighted the need to better understand the role of financial fluctuations for the performance of the overall economy. In a recent paper we analyze global financial cycles over the past 150 years across a sample of 17 advanced economies. An important innovation in our analysis is that, for the first time, we now have long-run data on credit growth, house and equity prices, as well as equity share dividends.

Financial comovement: the facts

A simple way to assess common movements in credit, house prices, and equity prices internationally is to calculate 15-year rolling window correlation coefficients. Figure 1 shows that harmonization in financial cycles has risen substantially over time. The comovement of credit and equity markets is at a historical peak today, with correlation coefficients of about 0.4 and 0.8 respectively. Particularly notable is the rise in equity price correlation. Since the 1990s, this correlation has continued to increase, now reaching near perfect global integration, and far exceeding the correlation in equity prices during the declines associated with the Great Depression.

Abstracting from bouts of house price comovement associated with WW1 and WW2 housing busts, international house prices are also generally more correlated today than in previous decades. However, since the financial crisis, global house prices have increasingly diverged, slowing down the increasing synchronization of recent years. Overall and to varying degrees, the comovement in credit, house prices, and equity prices is higher now than in previous decades. In this sense it is possible to speak about a global financial cycle among developed economies.

Figure 1: Average bilateral financial cycle correlation

Understanding global equity market comovements

Why have equity prices become increasingly correlated across markets starting in the 1990s? We investigate the mechanisms that may explain this phenomenon by decomposing equity prices into two components. The first component describes how a risk-neutral investor would value equities based on the stream of future dividends (D) discounted by future risk-free rates (R): $Q_t^{RN}=\Sigma_{k=1}^\infty(\pi_{j=1}^{k-1}R_{t+j}^{-1} ) D_{t+k}$. Assuming a terminal value for $Q_t^{RN}$ at the sample end this risk-neutral component can be calculated recursively according to $Q_t^{RN} =\frac{D_{t+1}}{R_{t+1}} + \frac{Q_{t+1}^{RN}}{R_{t+1}}$. The remaining second component then primarily describes an investor’s ability and willingness to hold risk.

These two components are useful approximations based on traditional asset pricing concepts. We label the first component the “risk-neutral price,” and the second component “risk-appetite.” Obviously, risk-appetite is a summary term that comprises a diverse range of forces, such as risk aversion, consumption habits, the ability of intermediaries to supply credit, as well as investor sentiment, to cite a few. Using each of these two components, we then ask how much of the comovement in equity prices is due to comovements in dividends and risk-free rates, and how much is due to the synchronization of risk-appetite based on our broad definition.

Figure 2 shows that until the 1990s the comovement in equity prices was mostly accounted for by the comovement in the risk-neutral price component. Starting in the 1990s, however, it is the synchronization in the risk-appetite component that increasingly binds together equity prices among advanced economies. And it is difficult to overstate how dramatic that increase is when seen against the last 150 years of the history of modern finance.

Figure 2: Average bilateral equity price correlation

Monetary policy and the synchronization of risk-taking

What might explain the increasing synchronization of risk-appetite across global equity markets? A popular view, often embraced by practitioners in financial markets, is that monetary policy in global financial centers (in particular the U.S. Federal Reserve) plays an important role in affecting risk-taking in international financial markets. This can occur through different channels. For example, if a Fed tightening lowers U.S. equity prices, this negatively affects the balance sheet of any bank that marks-to-market its U.S. assets, causing banks around the world to cut down their risk-taking in sync with U.S. banks. Alternatively, U.S. monetary policy may directly act as a focal point that synchronizes risk perceptions of international investors.

One way to assess this view is to use local projections to examine how global equity prices react to a +1 percentage point (ppt) shock in financial center policy rates. We again distinguish between the risk-neutral price response of dividends and risk-free rates versus the response of equity prices themselves. The difference between these two responses measures the degree to which global risk-appetite responds to financial center monetary policy. Our measure for the financial center policy rate is the U.S. short-term rate after 1947, and the U.K. short-term rate prior to 1914. Between WW1 and WW2, we use the average of U.S. and U.K. short-term rates instead.

Does financial center monetary policy act as a driver of global risk-appetite? Figure 3 provides the answer: The left panel shows the full sample results, while the middle and right panels focus on the two eras of financial globalization: before 1914, and after 1980.

Our first result is that the response of equity prices has become stronger over time. The international response to a +1 ppt interest rate hike in the financial center has almost doubled from the full sample average of about -4% to the post-1980 trough of -8%. Importantly, the implied risk-neutral equity price, calculated from the dividend and risk-free rate responses, suggests that dividend and risk-free rate responses explain only about 25% of the post-1980 equity price response over 4 years. Fluctuations in risk-appetite are by far the most important driver, accounting for three quarters of the response.

By contrast, before 1914, equity markets reacted to rate changes much as would be expected from a risk-neutral investor perspective. Equity prices declined in response to a +1 ppt increase of the policy rate of the Bank of England, but there is no major impact above and beyond the risk-neutral path. Thus, monetary policy in financial centers have become an important driver of global risk-taking and this is a new and recent phenomenon. Possible explanations a shift from gold-backed to fiat currency, a more prominent role of leveraged financial intermediaries as shock amplifiers, growing use of the dollar as a funding currency, and growth in cross-border banks in the world economy today.

Figure 3: Response of global equity markets to +1 ppt center rate hike

Flexible exchange rates are not a perfect insulator

Risk-appetite spillovers of US monetary policy are substantial. Do floating exchange rates help countries avoid such spillovers? Floating exchange rates are thought to insulate domestic interest rates from foreign rates by allowing movements in the exchange rate to compensate for the interest rate differential across both regions. However, risk-appetite and hence equity prices might fluctuate more than the interest rates that determine the exchange rate. In this case risk-appetite fluctuations can overwhelm the insulation provided by floating exchange rates. To address this question, we analyze the response of global equity prices to financial center policy rate shocks conditional on a country’s exchange rate regime.

The top half of Table 1 shows the international responses of equity prices for the full sample. The equity price response tends to be stronger for countries whose exchange rate is pegged to the USD, or pegs. Over the full sample, equity prices are down by 3% in year 1, while there is no significant response among economies that allow their exchange rate to freely float, or floats. A test for equality of the impulse responses confirms that historically, the response to center-country monetary policy changes has been significantly more pronounced for pegs.

The bottom half of Table 1 shows the post-WW2 subsample results. As our previous results show, this is the period when risk premium spillovers were strongest. We find that for the post-WW2 sample the peg-float dichotomy is somewhat less stark. Equity prices for floats now also show a response to center-country interest rate changes, but on a smaller scale. Pegs on average still exhibit a much stronger response, based on point estimates. However, in this smaller sample, the precision of these estimates is weaker, and the difference between the two responses is no longer statistically significant. In sum, the transmission effects are stronger for fixed exchange rate regimes, but they are still sizable for floats.

Table 1: Exchange rate regime and equity price response

(a) Full sample:

(b) Post-1945:

Conclusion

Over the past few decades financial comovement has reached historical highs. In particular, the post-1990 synchronization of equity prices cannot be easily accounted for by the behavior of fundamentals, such as dividends or risk-free rates, but instead must be attributed to global fluctuations in risk appetite. Moreover, we find that U.S. monetary policy has become an important driver of such fluctuations. Importantly, policy-makers in small open economies should not expect flexible exchange rates to fully insulate an economy against fluctuations in global risk-appetite.

Felix Ward is an assistant professor at Erasmus University. Moritz Schularick is a professor of economics at the University of Bonn, Òscar Jordà is a Vice President at the Federal Reserve Bank of San Francisco, Alan M Taylor is a professor of economics at UC Davis


text:
# Revision history [back]

### building opencv3 with ros kinetic

Hi,

I have the default ros kinetic installed from the package manager. I get the following error when I try to compile my nodes with imgproc and highgui include.

Here is the relevant parts of my CMakeLists.txt file

find_package(OpenCV 3 REQUIRED)
src/cv_qt_ros.cpp
)
${catkin_LIBRARIES}${OpenCV_LIBS}
\${OpenCV_LIBRARIES}
)

Here is the compilation error: No rule to make target 'opencv_calib3d-NOTFOUND', needed by '../devel/lib/cv_pose/cv_qt_ros'. Stop.

This is the output of the cmake variables:

-- OpenCV include directories /opt/ros/kinetic/include/opencv-3.3.1;/opt/ros/kinetic/include/opencv-3.3.1/opencv
-- OpenCV libraries opencv_calib3d;opencv_core;opencv_dnn;opencv_features2d;opencv_flann;opencv_highgui;opencv_imgcodecs;opencv_imgproc;opencv_ml;opencv_objdetect;opencv_photo;opencv_shape;opencv_stitching;opencv_superres;opencv_video;opencv_videoio;opencv_videostab;opencv_viz;opencv_aruco;opencv_bgsegm;opencv_bioinspired;opencv_ccalib;opencv_cvv;opencv_datasets;opencv_dpm;opencv_face;opencv_fuzzy;opencv_hdf;opencv_img_hash;opencv_line_descriptor;opencv_optflow;opencv_phase_unwrapping;opencv_plot;opencv_reg;opencv_rgbd;opencv_saliency;opencv_stereo;opencv_structured_light;opencv_surface_matching;opencv_text;opencv_tracking;opencv_xfeatures2d;opencv_ximgproc;opencv_xobjdetect;opencv_xphoto;opencv_calib3d;opencv_core;opencv_dnn;opencv_features2d;opencv_flann;opencv_highgui;opencv_imgcodecs;opencv_imgproc;opencv_ml;opencv_objdetect;opencv_photo;opencv_shape;opencv_stitching;opencv_superres;opencv_video;opencv_videoio;opencv_videostab;opencv_viz;opencv_aruco;opencv_bgsegm;opencv_bioinspired;opencv_ccalib;opencv_cvv;opencv_datasets;opencv_dpm;opencv_face;opencv_fuzzy;opencv_hdf;opencv_img_hash;opencv_line_descriptor;opencv_optflow;opencv_phase_unwrapping;opencv_plot;opencv_reg;opencv_rgbd;opencv_saliency;opencv_stereo;opencv_structured_light;opencv_surface_matching;opencv_text;opencv_tracking;opencv_xfeatures2d;opencv_ximgproc;opencv_xobjdetect;opencv_xphoto

There are some similar questions but they do not address this specific case: question1, question2


text:
# Thread: Summation Notation Problem

1. ## Summation Notation Problem

How could this be simplified in summation notation:

5 * y1 + 25 * y2 + 125 * y3

Thanks!

2. Welcome to the forum

$5 \times y^1 + 25 \times y^2 + 125 \times y^3$

$(5\times y)^1 +(5\times y)^2 + (5\times y)^ 3$

$
\sum_{r= 1}^{3}{(5\times y)^r}

$

What about this, if I was putting it in summation notation using sigma?

4 * x(sub)i + 4 * x(sub)i^2 + 4 * x(sub)i^3 + 4 * x(sub)i^4

Thanks!

4. Originally Posted by genkislaw

What about this, if I was putting it in summation notation using sigma?

4 * xi + 4 * xi^2 + 4 * xi^3 + 4 * xi^4

Thanks!
$4 \times \xi + 4 \times \xi^2 + 4 \times \xi^3 + 4 \times \xi^4$

$= 4( \xi + \xi^2 + \xi^3 + \xi^4)$

$= 4 \sum_{r=1}^{4}{\xi}^r.....\text{I can't really understand x(sub)i but you can put it in place of }\xi$

Guess : I think you mean x_i ...if its so then your answer is

$~ =~ 4 \sum_{r=1}^{4}{x_i}^r$

5. Thanks!


text:
# Cash Flows from Operating Activities—Indirect Method 1 answer below »

The net income reported on the income statement for the current year was $378,000. Depreciation recorded on equipment and a building amounted to$112,500 for the year. Balances of the current asset and current liability accounts at the beginning and end of the year are as follows:

End of year; beginn...

AMALA K

Net Income.................................\$378,000
Depreciation*.............................. -112,500
Decrease in Acc. Receivable............. 4,320

Looking for Something Else? Ask a Similar Question


text:
# Astronomy:Primordial black hole

Short description: Hypothetical type of black hole

Primordial black hole (also abbreviated as PBH)[1][2] is a hypothetical type of black hole that formed soon after the Big Bang. In the early universe, high densities and heterogeneous conditions could have led sufficiently dense regions to undergo gravitational collapse, forming black holes. Yakov Borisovich Zel'dovich and Igor Dmitriyevich Novikov in 1966 first proposed the existence of such black holes.[3] The theory behind their origins was first studied in depth by Stephen Hawking in 1971.[4] Since primordial black holes did not form from stellar gravitational collapse, their masses can be far below stellar mass (c. 2×1030 kg).

## Theoretical history

Depending on the model, primordial black holes could have initial masses ranging from 10−8 kg [5](the so-called Planck relics) to more than thousands of solar masses. However, primordial black holes originally having mass lower than 1011 kg would not have survived to the present due to Hawking radiation, which causes complete evaporation in a time much shorter than the age of the Universe. Primordial black holes are non-baryonic[6] and as such are plausible dark matter candidates.[7][8][9][10][11] Primordial black holes are also good candidates for being the seeds of the supermassive black holes at the center of massive galaxies, as well as of intermediate-mass black holes.[12]

Primordial black holes belong to the class of massive compact halo objects (MACHOs). They are naturally a good dark matter candidate: they are (nearly) collision-less and stable (if sufficiently massive), they have non-relativistic velocities, and they form very early in the history of the Universe (typically less than one second after the Big Bang).[13] Nevertheless, critics maintain that tight limits on their abundance have been set up from various astrophysical and cosmological observations, which would exclude that they contribute significantly to dark matter over most of the plausible mass range.[14] However, new research has provided for the possibility again, whereby these black holes would sit in clusters with a 30-solar-mass primordial black hole at the center.[15][16]

In March 2016, one month after the announcement of the detection by Advanced LIGO/VIRGO of gravitational waves emitted by the merging of two 30 solar mass black holes (about 6×1031 kg), three groups of researchers proposed independently that the detected black holes had a primordial origin.[17][18][19][20] Two of the groups found that the merging rates inferred by LIGO are consistent with a scenario in which all the dark matter is made of primordial black holes, if a non-negligible fraction of them are somehow clustered within halos such as faint dwarf galaxies or globular clusters, as expected by the standard theory of cosmic structure formation. The third group claimed that these merging rates are incompatible with an all-dark-matter scenario and that primordial black holes could only contribute to less than one percent of the total dark matter. The unexpected large mass of the black holes detected by LIGO has strongly revived interest in primordial black holes with masses in the range of 1 to 100 solar masses. It is however still debated whether this range is excluded or not by other observations, such as the absence of micro-lensing of stars,[21] the cosmic microwave background anisotropies, the size of faint dwarf galaxies, and the absence of correlation between X-ray and radio sources towards the galactic center.

In May 2016, Alexander Kashlinsky suggested that the observed spatial correlations in the unresolved gamma-ray and X-ray background radiations could be due to primordial black holes with similar masses, if their abundance is comparable to that of dark matter.[22]

In April 2019, a study was published suggesting this hypothesis may be a dead end. An international team of researchers has put a theory speculated by the late Stephen Hawking to its most rigorous test to date, and their results have ruled out the possibility that primordial black holes smaller than a tenth of a millimeter (7 × 1022 kg) make up most of dark matter.[23][24]

In August 2019, a study was published opening up the possibility of making up all dark matter with asteroid-mass primordial black holes (3.5 × 10−17 – 4 × 10−12 solar masses, or 7.0 × 1013 – 8 × 1018 kg).[25]

In September 2019, a report by James Unwin and Jakub Scholtz proposed the possibility of a primordial black hole (PBH) with mass 5–15 Template:M+ (Earth masses), about the diameter of a tennis ball, existing in the extended Kuiper Belt to explain the orbital anomalies that are theorized to be the result of a 9th planet in the solar system.[26][27]

## Formation

Formation of the universe with and without primordial black holes

Primordial black holes could have formed in the very early Universe (less than one second after the Big Bang), during the so-called radiation dominated era. The essential ingredient for the formation of a primordial black hole is a fluctuation in the density of the Universe, inducing its gravitational collapse. One typically requires density contrasts $\displaystyle{ \delta \rho / \rho \sim 0.1 }$ (where $\displaystyle{ \rho }$ is the density of the Universe) to form a black hole.[28] There are several mechanisms able to produce such inhomogeneities in the context of cosmic inflation (in hybrid inflation models, for example axion inflation), reheating, or cosmological phase transitions.

## Observational limits and detection strategies

A variety of observations have been interpreted to place limits on the abundance and mass of primordial black holes:

• Lensing of gamma-ray bursts: Compact objects can induce a change in the luminosity of gamma-ray bursts when passing close to their line-of-sight, through the gravitational lensing effect. The Fermi Gamma-Ray Burst Monitor experiment found that primordial black holes cannot contribute importantly to the dark matter within the mass range 5 x 1014 – 1017 kg.[30] A re-analysis, however, has removed this limit after properly taking into account the extended nature of the source as well as wave optics effects.[31]
• Capture of primordial black holes by neutron stars: If primordial black holes with masses between 1015 kg and 1022 kg had abundances comparable to that of dark matter, neutron stars in globular clusters should have captured some of them, leading to the rapid destruction of the star.[32] The observation of neutron stars in globular clusters can thus be used to set a limit on primordial black hole abundance. However, a detailed study of the capture dynamics has challenged this limit and led to its removal.[25]
• Survival of white dwarfs: If a primordial black hole passes through a C/O white dwarf, it may ignite the carbon and subsequently produce a runaway explosion. The observed white dwarf mass distribution can thus provide a limit on primordial black hole abundance. Primordial black holes in the range of ~1016 – 1017 kg have been ruled out for being a dominant constituent of the local dark matter density. Furthermore, the runaway explosion may be seen as a Type Ia supernova. Primordial black holes in the mass range 1017–1019  kg are limited by the observed supernova rate, though these bounds are subject to astrophysical uncertainties.[33] A detailed study with hydrodynamic simulations have challenged these limits and led to the re-opening of these mass ranges.[25]
• Micro-lensing of stars: If a primordial black hole passes between us and a distant star, it induces a magnification of these stars due to the gravitational lensing effect. By monitoring the magnitude of stars in the Magellanic Clouds, the EROS and MACHO surveys have put a limit on the abundance of primordial black holes in the range 1023 – 1031 kg. By observing stars in the Andromeda Galaxy (M31), the Subaru/HSC have put a limit on the abundance of primordial black holes in the range 1019 - 1024 kg. According to these surveys, primordial black holes within this range cannot constitute an important fraction of the dark matter.[34][35][24] However, these limits are model-dependent. It has been also argued that if primordial black holes are regrouped in dense halos, the micro-lensing constraints are then naturally evaded.[18] The micro-lensing technique suffers from the finite-size source effect and the diffraction when probing primordial black holes with smaller masses. Scaling laws were derived to demonstrate that the optical micro-lensing is unlikely to limit the abundance of primordial black holes with masses below ~1018 kg in a foreseeable future.[25]
• Micro-lensing of Ia supernovae: Primordial black holes with masses larger than 1028 kg would magnify distant type Ia supernova (or any other standard candle of known luminosity) due to gravitational lensing. These effects would be apparent if primordial black holes were a significant contribution to the dark matter density, which is constrained by current data sets.[36][37]
• Temperature anisotropies in the cosmic microwave background: Accretion of matter onto primordial black holes in the early Universe should lead to energy injection in the medium that affects the recombination history of the Universe. This effect induces signatures in the statistical distribution of the cosmic microwave background (CMB) anisotropies. The Planck observations of the CMB exclude that primordial black holes with masses in the range 100 – 104 solar masses contribute importantly to the dark matter,[38] at least in the simplest conservative model. It is still debated whether the constraints are stronger or weaker in more realistic or complex scenarios.
• Gamma-ray signatures from annihilating dark matter: If the dark matter in the Universe is in the form of weakly interacting massive particles or WIMPs, primordial black holes would accrete a halo of WIMPs around them in the early universe.[39] The annihilation of WIMPs in the halo leads to a signal in the gamma-ray spectrum which is potentially detectable by dedicated instruments such as the Fermi Gamma-ray Space Telescope.[40]

At the time of the detection by LIGO of the gravitational waves emitted during the final coalescence of two 30 solar mass black holes, the mass range between 10 and 100 solar masses was still only poorly constrained. Since then, new observations have been claimed to close this window, at least for models in which the primordial black holes have all the same mass:

• from the absence of X-ray and optical correlations in point sources observed in the direction of the galactic center.[41]
• from the dynamical heating of dwarf galaxies[42]
• from the observation of a central star cluster in the Eridanus II dwarf galaxy (but these constraints can be relaxed if Eridanus II owns a central intermediate mass black hole, which is suggested by some observations).[43] If primordial black holes exhibit a broad mass distribution, those constraints could nevertheless still be evaded.
• from the gravitational micro-lensing of distant quasars by closer galaxies, allowing only 20% of the galactic matter to be in the form of compact objects with stellar masses, a value consistent with the expected stellar population.[44]
• from micro-lensing of distant stars by galaxy clusters, suggesting that the fraction of dark matter in the form of primordial black holes with masses comparable to those found by LIGO must be less than 10%.[45]

In the future, new limits will be set up by various observations:

• The Square Kilometre Array (SKA) radio telescope will probe the effects of primordial black holes on the reionization history of the Universe, due to energy injection into the intergalactic medium, induced by matter accretion onto primordial black holes.[46]
• LIGO, VIRGO and future gravitational waves detectors will detect new black hole merging events, from which one could reconstruct the mass distribution of primordial black holes.[18] These detectors could allow distinguishing unambiguously between primordial or stellar origins if merging events involving black holes with a mass lower than 1.4 solar mass are detected. Another way would be to measure the large orbital eccentricity of primordial black hole binaries.[47]
• Gravitational wave detectors, such as the Laser Interferometer Space Antenna (LISA) and pulsar timing arrays will also probe the stochastic background of gravitational waves emitted by primordial black hole binaries, when they are still orbiting relatively far from each other.[48]
• New detections of faint dwarf galaxies, and the observations of their central star cluster, could be used to test the hypothesis that these dark matter-dominated structures contain primordial black holes in abundance.
• Monitoring star positions and velocities within the Milky Way could be used to detect the influence of a nearby primordial black hole.
• It has been suggested[49][50] that a small black hole passing through the Earth would produce a detectable acoustic signal. Because of its tiny diameter, large mass compared to a nucleon, and relatively high speed, such primordial black holes would simply transit Earth virtually unimpeded with only a few impacts on nucleons, exiting the planet with no ill effects.
• Another way to detect primordial black holes could be by watching for ripples on the surfaces of stars. If the black hole passed through a star, its density would cause observable vibrations.[51][52]
• Monitoring quasars in the microwave wavelength and detection of the wave optics feature of gravitational microlensing by the primordial black holes.[53]
• The other observational consequence would be the collision of primordial blackholes with Earth and trapping inside it that is studied by S. Rahvar in 2021. Considering the whole dark matter is made of primordial blackholes with the mass function allowed in the observational range, the probability of this event is much smaller than the age of the Universe. [54]

## Implications

Problems for which primordial black holes have suggested as a solution include the dark matter problem, the cosmological domain wall problem[55] and the cosmological monopole problem.[56] Since primordial black holes do not necessarily have to be small (they can have any size), they may have contributed to the later formation of galaxies.

Even if they do not solve these problems, the low number of primordial black holes (as of 2010, only two intermediate mass black holes were confirmed) aids cosmologists by putting constraints on the spectrum of density fluctuations in the early universe.

## String theory

Main page: Physics:String theory

General relativity predicts the smallest primordial black holes would have evaporated by now, but if there were a fourth spatial dimension – as predicted by string theory – it would affect how gravity acts on small scales and "slow down the evaporation quite substantially".[57] This could mean there are several thousand black holes in our galaxy. To test this theory, scientists will use the Fermi Gamma-ray Space Telescope which was put in orbit by NASA on June 11, 2008. If they observe specific small interference patterns within gamma-ray bursts, it could be the first indirect evidence for primordial black holes and string theory.

## References

1. Primordial black holes as a dark matter candidate - Journal of Physics G: Nuclear and Particle Physics
2. [1] - Frontiers in Astronomy and Space Sciences
3. Zel'dovitch & Novikov (14 March 1966). "The Hypothesis of Cores Retarded During Expansion and the Hot Cosmological MOdel". Soviet Astronomy 10 (4): 602–603. Bibcode1966AZh....43..758Z.
4. Hawking, S (1971). "Gravitationally collapsed objects of very low mass". Mon. Not. R. Astron. Soc. 152: 75. doi:10.1093/mnras/152.1.75. Bibcode1971MNRAS.152...75H.
5. Carr, B.J.; Hawking, S.W. (2004). "Black holes in the early Universe". Monthly Notices of the Royal Astronomical Society 168 (2): 399–416. doi:10.1093/mnras/168.2.399. Bibcode1974MNRAS.168..399C.
6. Overduin, J. M.; Wesson, P. S. (November 2004). "Dark Matter and Background Light". Physics Reports 402 (5–6): 267–406. doi:10.1016/j.physrep.2004.07.006. Bibcode2004PhR...402..267O.
7. Frampton, Paul H.; Kawasaki, Masahiro; Takahashi, Fuminobu; Yanagida, Tsutomu T. (22 April 2010). "Primordial Black Holes as All Dark Matter". Journal of Cosmology and Astroparticle Physics 2010 (4): 023. doi:10.1088/1475-7516/2010/04/023. ISSN 1475-7516. Bibcode2010JCAP...04..023F.
8. Espinosa, J. R.; Racco, D.; Riotto, A. (23 March 2018). "A Cosmological Signature of the Standard Model Higgs Vacuum Instability: Primordial Black Holes as Dark Matter". Physical Review Letters 120 (12): 121301. doi:10.1103/PhysRevLett.120.121301. PMID 29694085. Bibcode2018PhRvL.120l1301E.
9. Clesse, Sebastien; García-Bellido, Juan (2018). "Seven Hints for Primordial Black Hole Dark Matter". Physics of the Dark Universe 22: 137–146. doi:10.1016/j.dark.2018.08.004. Bibcode2018PDU....22..137C.
10. Lacki, Brian C.; Beacom, John F. (12 August 2010). "Primordial Black Holes as Dark Matter: Almost All or Almost Nothing" (in en). The Astrophysical Journal 720 (1): L67–L71. doi:10.1088/2041-8205/720/1/L67. ISSN 2041-8205. Bibcode2010ApJ...720L..67L.
11. Kashlinsky, A. (23 May 2016). "LIGO gravitational wave detection, primordial black holes and the near-IR cosmic infrared background anisotropies". The Astrophysical Journal 823 (2): L25. doi:10.3847/2041-8205/823/2/L25. ISSN 2041-8213. Bibcode2016ApJ...823L..25K.
12. Clesse, S.; Garcia-Bellido, J. (2015). "Massive Primordial Black Holes from Hybrid Inflation as Dark Matter and the seeds of Galaxies". Physical Review D 92 (2): 023524. doi:10.1103/PhysRevD.92.023524. Bibcode2015PhRvD..92b3524C.
13. Ali-Haïmoud, Yacine; Kovetz, Ely D.; Kamionkowski, Marc (2017-12-19). "The merger rate of primordial-black-hole binaries". Physical Review D 96 (12): 123523. doi:10.1103/PhysRevD.96.123523. ISSN 2470-0010. Bibcode2017PhRvD..96l3523A.
14. Jedamzik, Karsten (2020-09-14). "Primordial Black Hole Dark Matter and the LIGO/Virgo observations". Journal of Cosmology and Astroparticle Physics 2020 (9): 022. doi:10.1088/1475-7516/2020/09/022. ISSN 1475-7516. Bibcode2020JCAP...09..022J.
15. Jedamzik, Karsten (September 2020). "Primordial black hole dark matter and the LIGO/Virgo observations" (in en). Journal of Cosmology and Astroparticle Physics 2020 (9): 022. doi:10.1088/1475-7516/2020/09/022. ISSN 1475-7516. Bibcode2020JCAP...09..022J.
16. Bird, S.; Cholis, I. (2016). "Did LIGO Detect Dark Matter?". Physical Review Letters 116 (20): 201301. doi:10.1103/PhysRevLett.116.201301. PMID 27258861. Bibcode2016PhRvL.116t1301B.
17. Clesse, S.; Garcia-Bellido, J. (2017). "The clustering of massive Primordial Black Holes as Dark Matter: Measuring their mass distribution with Advanced LIGO". Physics of the Dark Universe 10 (2016): 142–147. doi:10.1016/j.dark.2016.10.002. Bibcode2017PDU....15..142C.
18. Sasaki, M.; Suyama, T.; Tanaki, T. (2016). "Primordial Black Hole Scenario for the Gravitational-Wave Event GW150914". Physical Review Letters 117 (6): 061101. doi:10.1103/PhysRevLett.117.061101. PMID 27541453. Bibcode2016PhRvL.117f1101S.
19. Khalouei, E.; Ghodsi, H.; Rahvar, S.; Abedi, J. (2021-04-02). "Possibility of primordial black holes as the source of gravitational wave events in the advanced LIGO detector". Physical Review D 103 (8): 084001. doi:10.1103/PhysRevD.103.084001. Bibcode2021PhRvD.103h4001K.
20. Kashlinsky, A. (2016). "LIGO gravitational wave detection, primordial black holes and the near-IR cosmic infrared background anisotropies". The Astrophysical Journal 823 (2): L25. doi:10.3847/2041-8205/823/2/L25. Bibcode2016ApJ...823L..25K.
21. "Dark matter is not made up of tiny black holes". ScienceDaily. 2 April 2019.
22. Niikura, H. et al. (2019). "Microlensing constraints on primordial black holes with Subaru/HSC Andromeda observations". Nature Astronomy 3 (6): 524–534. doi:10.1038/s41550-019-0723-1. Bibcode2019NatAs...3..524N.
23. Montero-Camacho, Paulo; Fang, Xiao; Vasquez, Gabriel; Silva, Makana; Hirata, Christopher M. (2019-08-23). "Revisiting constraints on asteroid-mass primordial black holes as dark matter candidates". Journal of Cosmology and Astroparticle Physics 2019 (8): 031. doi:10.1088/1475-7516/2019/08/031. ISSN 1475-7516. Bibcode2019JCAP...08..031M.
24. Schultz, J.; Unwin, J. (2019). "What if Planet 9 is a Primordial Black Hole?". High Energy Physics - Phenomenology.
25. Anderson, D.; Hunt, B. (5 December 2019). "Why astrophysicists think there's a black hole in our solar system".
26. Harada, T.; Yoo, C.-M.; Khori, K. (2013). "Threshold of primordial black hole formation". Physical Review D 88 (8): 084051. doi:10.1103/PhysRevD.88.084051. Bibcode2013PhRvD..88h4051H.
27. Hawking, S.W. (1977). "The quantum mechanics of black holes". Scientific American 236: 34–40. doi:10.1038/scientificamerican0177-34. Bibcode1977SciAm.236a..34H.
28. Barnacka, A.; Glicenstein, J.; Moderski, R. (2012). "New constraints on primordial black holes abundance from femtolensing of gamma-ray bursts". Physical Review D 86 (4): 043001. doi:10.1103/PhysRevD.86.043001. Bibcode2012PhRvD..86d3001B.
29. Katz, Andrey; Kopp, Joachim; Sibiryakov, Sergey; Xue, Wei (2018-12-05). "Femtolensing by dark matter revisited". Journal of Cosmology and Astroparticle Physics 2018 (12): 005. doi:10.1088/1475-7516/2018/12/005. ISSN 1475-7516. Bibcode2018JCAP...12..005K.
30. Capela, Fabio; Pshirkov, Maxim; Tinyakov, Peter (2013). "Constraints on primordial black holes as dark matter candidates from capture by neutron stars". Physical Review D 87 (12): 123524. doi:10.1103/PhysRevD.87.123524. Bibcode2013PhRvD..87l3524C.
31. Graham, Peter W.; Rajendran, Surjeet; Varela, Jaime (2015-09-09). "Dark matter triggers of supernovae" (in en). Physical Review D 92 (6): 063007. doi:10.1103/PhysRevD.92.063007. ISSN 1550-7998. Bibcode2015PhRvD..92f3007G.
32. Tisserand, P.; Le Guillou, L.; Afonso, C.; Albert, J. N.; Andersen, J.; Ansari, R.; Aubourg, E.; Bareyre, P. et al. (2007). "Limits on the Macho Content of the Galactic Halo from the EROS-2 Survey of the Magellanic Clouds". Astronomy and Astrophysics 469 (2): 387–404. doi:10.1051/0004-6361:20066017. Bibcode2007A&A...469..387T.
33. Collaboration, EROS; Collaboration, MACHO; Alves, D.; Ansari, R.; Aubourg, É.; Axelrod, T. S.; Bareyre, P.; Beaulieu, J.-Ph. et al. (1998). "EROS and MACHO Combined Limits on Planetary Mass Dark Matter in the Galactic Halo". The Astrophysical Journal 499 (1): L9. doi:10.1086/311355. Bibcode1998ApJ...499L...9A.
34. Zumalacárregui, Miguel; Seljak, Uroš (2018-10-01). "Limits on Stellar-Mass Compact Objects as Dark Matter from Gravitational Lensing of Type Ia Supernovae". Physical Review Letters 121 (14): 141101. doi:10.1103/PhysRevLett.121.141101. PMID 30339429. Bibcode2018PhRvL.121n1101Z.
35. "Black holes ruled out as universe's missing dark matter" (in en-US). Berkeley News. 2018-10-02.
36. Ali-Haimoud, Y.; Kamionkowski, M. (2017). "Cosmic microwave background limits on accreting primordial black holes". Physical Review D 95 (4): 043534. doi:10.1103/PhysRevD.95.043534. Bibcode2017PhRvD..95d3534A.
37. Eroshenko, Yuri (2016). "Dark Matter Density Spikes around Primordial Black Holes". Astronomy Letters 42 (6): 347–356. doi:10.1134/S1063773716060013. Bibcode2016AstL...42..347E.
38. Boucenna, Sofiane M.; Kühnel, Florian; Ohlsson, Tommy; Visinelli, Luca (2018). "Novel Constraints on Mixed Dark-Matter Scenarios of Primordial Black Holes and WIMPs". Journal of Cosmology and Astroparticle Physics 1807 (7): 003. doi:10.1088/1475-7516/2018/07/003. Bibcode2018JCAP...07..003B.
39. Gaggero, D.; Bertone, G.; Calore, F.; Connors, R.; Lovell, L.; Markoff, S.; Storm, E. (2017). "Searching for primordial black holes in the X-ray and radio sky". Physical Review Letters 118 (24): 241101. doi:10.1103/PhysRevLett.118.241101. PMID 28665632. Bibcode2017PhRvL.118x1101G.
40. Green, A.M. (2016). "Microlensing and dynamical constraints on primordial black hole dark matter with an extended mass function". Phys. Rev. D 94 (6): 063530. doi:10.1103/PhysRevD.94.063530. Bibcode2016PhRvD..94f3530G.
41. Li, T. S.; Simon, J. D.; Drlica-Wagner, A.; Bechtol, K.; Wang, M. Y.; García-Bellido, J.; Frieman, J.; Marshall, J. L. et al. (2016). "Farthest Neighbor: The Distant Milky Way Satellite Eridanus II". The Astrophysical Journal 838 (1): 8. doi:10.3847/1538-4357/aa6113. Bibcode2017ApJ...838....8L.
42. Mediavilla, E.; Jimenez-Vicente, J.; Munoz, J. A.; Vives Arias, H.; Calderon-Infante, J. (2017). "Limits on the Mass and Abundance of Primordial Black Holes from Quasar Gravitational Microlensing". The Astrophysical Journal 836 (2): L18. doi:10.3847/2041-8213/aa5dab. Bibcode2017ApJ...836L..18M.
43. Diego, Jose M. (2017). "Dark matter under the microscope: Constraining compact dark matter with caustic crossing events". The Astrophysical Journal 857 (1): 25. doi:10.3847/1538-4357/aab617. Bibcode2018ApJ...857...25D.
44. Tashiro, H.; Sugiyama, N. (2012). "The effect of primordial black holes on 21 cm fluctuations". Monthly Notices of the Royal Astronomical Society 435 (4): 3001. doi:10.1093/mnras/stt1493. Bibcode2013MNRAS.435.3001T.
45. Cholis, I.; Kovetz, E.D.; Ali-Haimoud, Y.; Bird, S.; Kamionkowski, M.; Munoz, J.; Raccanelli, A. (2016). "Orbital eccentricities in primordial black hole binaries". Physical Review D 94 (8): 084013. doi:10.1103/PhysRevD.94.084013. Bibcode2016PhRvD..94h4013C.
46. Clesse, Sebastien; Garcia-Bellido, Juan (2016). "Detecting the gravitational wave background from primordial black hole dark matter". Physics of the Dark Universe 18: 105–114. doi:10.1016/j.dark.2017.10.001. Bibcode2017PDU....18..105C.
47. Khriplovich, I. B.; Pomeransky, A. A.; Produit, N.; Ruban, G. Yu. (2008). "Can one detect passage of a small black hole through the Earth?". Physical Review D 77 (6): 064017. doi:10.1103/PhysRevD.77.064017. Bibcode2008PhRvD..77f4017K.
48. I. B. Khriplovich, A. A. Pomeransky, N. Produit and G. Yu. Ruban, Passage of small black hole through the Earth. Is it detectable?, preprint
49. Kesden, Michael; Hanasoge, Shravan (2011). "Transient Solar Oscillations Driven by Primordial Black Holes". Physical Review Letters 107 (11): 111101. doi:10.1103/PhysRevLett.107.111101. PMID 22026654. Bibcode2011PhRvL.107k1101K.
50. Naderi, Tayebeh; Mehrabi, Ahmad; Rahvar, Sohrab (2018). "Primordial black hole detection through diffractive microlensing". Physical Review D 97 (10): 103507. doi:10.1103/PhysRevD.97.103507. Bibcode2018PhRvD..97j3507N.
51. Rahvar, Sohrab (2021). "Possibility of Primordial black holes Collision with Earth and the Consequences of this Collision". Monthly Notices of the Royal Astronomical Society 507 (1): 914–918. doi:10.1093/mnras/stab2239.
52. D. Stojkovic; K. Freese; G. D. Starkman (2005). "Holes in the walls: primordial black holes as a solution to the cosmological domain wall problem". Phys. Rev. D 72 (4): 045012. doi:10.1103/PhysRevD.72.045012. Bibcode2005PhRvD..72d5012S.  preprint
53. D. Stojkovic; K. Freese (2005). "A black hole solution to the cosmological monopole problem". Phys. Lett. B 606 (3–4): 251–257. doi:10.1016/j.physletb.2004.12.019. Bibcode2005PhLB..606..251S.  preprint
54. McKee, Maggie. (2006) NewScientistSpace.com – Satellite could open door on extra dimension


text:
# NASA-Sloan Atlas

The NASA-Sloan Atlas is a catalog of images and parameters of local galaxies derived from Sloan Digital Sky Survey imaging, and with the addition of Galaxy Evolution Explorer (GALEX) data for the ultraviolet part of the spectral energy distribution. The primary documentation can be found at the NASA-Sloan Atlas website.

The version of the NASA-Sloan Atlas used by MaNGA for its targeting is v1_0_1. This version contains some new features relative to the previous publicly released version (v0_1_2). These include an expanded redshift range (to z = 0.15),
and the calculation of elliptical Petrosian aperture photometry.

## Summary File

The summary catalog file for v1_0_1: nsa_v1_0_1.fits (2.5 Gbytes; datamodel) is included in our data release. A table is available in CAS corresponding to this data (nsa).

The SDSS images are based on the DR13 recalibration using PanSTARRS-1. The object detection, deblending, and other details regarding the image analysis can be found in Blanton et al. (2011). Broadly speaking, this process is better tuned for large, bright galaxies than the standard SDSS processing. Nevertheless, it is still susceptible to some similar failure modes (over or underdeblending).

The elliptical Petrosian aperture photometry is a new addition since that paper, and is considered the most reliable photometry available in this catalog. The definition of the Petrosian radius used for the apertures is based on the SDSS r-band and is identical to the usual SDSS definition except using elliptical instead of circular apertures. The position angle and axis ratio of the ellipses used are determined from the second moments of the light distribution at around the 90% light radius (as determined using the circular Petrosian fluxes). Based on simulations, these magnitudes avoid the dependence on ellipticity of the circular Petrosian magnitudes and avoid the biases associated with the single-component Sérsic fits released in v0_1_2. They do have the expected dependence of Petrosian magnitudes on profile shape, leading to an underestimate of the total flux for pure de Vaucouleurs galaxies.

We have also applied aperture corrections to the photometry, to account for the variation in point spread function between the bandpasses, particularly for GALEX. We do so by using the measured curve-of-growth to predict the aperture correction for an ideal elliptical galaxy, and applying this correction to the real data. For GALEX, these corrections can be of order 30% to 50% for galaxies with half-light radii around an arcsec; for SDSS they are always negligible.

All absolute magnitudes in the NASA-Sloan Atlas are given with H0 = 100 h km s-1 Mpc-1, so should be interpreted as M – 5 log10 h.

## Detection and measurement images

### Structure of directories

For each galaxy in the summary file, there is a directory with all of the images used to produce the parameter measurements. In these directories are both calibrated mosaic images on which the analysis is done, and individual deblended atlas images just with the light from the analyzed galaxy, and a number of associated other files.

The structure of the directory tree is as follows:

• detect
• galex (original GALEX images)
• sdss (original SDSS images)
• v1_0
• [RA]h
• [mp][Dec]
• [IAUNAME]
• atlases
• [PID]

This tree is constructed to break up the sky into hour-wide RA ranges (“00h”, “01h”, …, “23h”) and 2 degree-wide Dec ranges (where, e.g., “m04” is between -4 and -6 deg Dec, and “p12” is between +12 and +14 deg Dec, etc.). Within each RA/Dec bin, each directory is named by an object’s IAUNAME, which is the object IAU-style name (e.g. “J123456.78+012345.6”). IAUNAME and also SUBDIR (the directory path to the object) are given for each object in the summary file. PID is the parent ID associated with the object, and is also specified for each object in the summary file. Note that although many disjoint parent objects may be detected by the NSA, only the parent object identified to contain the galaxy of interest is analyzed.

### Mosaic Images

The IAUNAME directory contains several types of file related to the mosaic images analyzed for the NSA. These are the full, calibrated images which the NSA analysis is applied to. These are files that users would need to deblend and analyze the same images with different methods.

### Atlas Images and Measurements

The PID directory contains files related to the particular parent identified with the galaxy of interest. They also contain the deblended child images containing just the light from the object of interest.

These are files that users would need to analyze the parent images with different methods, or to dig deeply into how the NSA decided to deblend and analyze a particular galaxy. Some of the file names include AID, which indicates which deblended child the file refers to; only one AID is analyzed, which is specified in the summary file.

For the undeblended parent object, there exists:

For the deblended child there are the following files:

## Summary of other subdirectories

There are several subdirectories other than “detect” under the top-level NSA directory. These directories have intermediate files and metadata that is not generally useful. The files are fully documented in the data model. The directories are:

• catalogs: Input catalogs for the NSA process, and the results of combining them into a single general input.
• derived: Derived quantities (K-corrections, distances, final redshifts, etc). The majority of useful information is propagated to the summary file.
• measure: Rolled-up results of the image measurement processes. The majority of useful information is propagated to the summary file.
• misc: Miscellaneous files used (currently only the velocity field grid used for distances).


text:
Find Paper, Faster
Example：10.1021/acsami.1c06204 or Chem. Rev., 2007, 107, 2411-2502
Homogeneous non-degenerate 3-(α,δ)-Sasaki manifolds and submersions over quaternionic Kähler spaces
Annals of Global Analysis and Geometry  (IF0.846),  Pub Date : 2021-04-26, DOI: 10.1007/s10455-021-09762-9
Ilka Agricola, Giulia Dileo, Leander Stecker

We show that every 3-$$(\alpha ,\delta )$$-Sasaki manifold of dimension $$4n + 3$$ admits a locally defined Riemannian submersion over a quaternionic Kähler manifold of scalar curvature $$16n(n+2)\alpha \delta$$. In the non-degenerate case we describe all homogeneous 3-$$(\alpha ,\delta )$$-Sasaki manifolds fibering over symmetric Wolf spaces and over their non-compact dual symmetric spaces. If $$\alpha \delta > 0$$, this yields a complete classification of homogeneous 3-$$(\alpha ,\delta )$$-Sasaki manifolds. For $$\alpha \delta < 0$$, we provide a general construction of homogeneous 3-$$(\alpha , \delta )$$-Sasaki manifolds fibering over non-symmetric Alekseevsky spaces, the lowest possible dimension of such a manifold being 19.