text:
# Records: [TGM] Miscellaneous Challenges

Thread in 'Competition' started by Ai, 10 Jan 2010.

1. ### Ai

A thread for miscellaneous TGM challenges. The remaining TGM modes without leaderboard will be kept here and I'll add other challenges when someone submits a personal best (e.g. CLOSE CALL GM). Don't hesitate to make suggestions for new leaderboards you think might be interesting and/or challenging.

SCORE ATTACK

Only Gm scores will be accepted. This means you can post S9s with a score over 126000. 20G MODE scores are also welcome and will be added to this leaderboard. Please do mention that the score was acquired in 20G MODE and I'll make sure to add it to the comments.

Code:
    Player      Score        Time        Grade       Comment
--------------------------------------------------------------------------------
1. rednefed    290323       13:23:05    [gl]S9[/gl]
2. mfm005      281308       12:15:23    Gm
3. Vesly       267837       14:42:11    [gl]S9[/gl]
4. DeHackEd    257594       10:50:00    Gm
5. Kitaru      248508       13:19:85    [gl]S9[/gl]
6. cyberguile  235421       12:05:26    Gm
7. COL         230839       11:34:46    Gm
-. COL         204886       11:24:20    Gm          20G MODE
8. LOst        203046       11:29:26    Gm
9. Ai          196855       12:47:46    [gl]S9[/gl]
10. an ass      185022       11:46:73    Gm

MONO MODE

To start MONO MODE use the following key combination at the title screen: RRRUCBA.

Code:
   Player       Grade  Level    Time       Comment
--------------------------------------------------------------------------------
1. 777          Gm     999      [URL="http://ameblo.jp/eiji777xyz1105/entry-11439129084.html"]09:02:60[/URL]
2. dzag55555    Gm     999      [URL="http://www.youtube.com/watch?v=4_m5evjwiOM&feature=sub"]09:51:80[/URL]   UKI MODE
3. rednefed     Gm     999      10:19:18
4. cyberguile   Gm     999      10:21:68
5. DeHacked     Gm     999      10:36:25
6. Ai           Gm     999      11:39:15
7. COL          Gm     999      11:57:81

MONO 20G MODE

To start MONO 20G MODE use the following key combinations at the title screen: RRRUCBA and DDDDDDDDCBA.

Code:
   Player       Grade  Level    Time       Comment
--------------------------------------------------------------------------------
1. 777          Gm     999      [URL="http://ameblo.jp/eiji777xyz1105/entry-11297468948.html"]08:46:40[/URL]
2. rednefed     Gm     999      10:08:28
3. cyberguile   Gm     999      10:16:25
4. Ai           Gm     999      11:10:58

SLOW CLEAR

The opposite of the main TGM time attack leaderboard. Only times above 20 minutes will be accepted. You need to clear the game and grade isn't important. Though you should still post if you have a top time without clearing the game. I will then probably change the leaderboard format since I'm interested in very slow play.

Code:
   Player       Time            Grade       Comment
--------------------------------------------------------------------------------
1. 777          41:35:15        S8          More details can be found [URL="http://ameblo.jp/eiji777xyz1105/entry-11085422920.html"]here[/URL]!
2. Ai           32:22:33        S8
3. cyberguile   31:12:65        S8
4. Edo          29:20:93        S9

NO SOFT DROP 20G MODE

To start NORMAL 20G MODE use the following key combination at the title screen: DDDDDDDDCBA. When the code is activated just complete a game as fast as possible by letting gravity doing the dropping for you. So using the down motion to lock pieces manually faster isn't allowed.

Code:
   Player       Grade  Level    Time       Score       Comment
--------------------------------------------------------------------------------
1. cyberguile   S9     999      14:38:86   180520

MONO BIG MODE

To start MONO BIG MODE use the following key combinations at the title screen: RRRUCBA and LLLLDCBA.

Code:
   Player       Grade  Level    Time       Comment
--------------------------------------------------------------------------------
1. Ai           S7     318      02:58:80

MONO REV MODE

To start MONO REV MODE use the following key combinations at the title screen: RRRUCBA and DUUDCBA.

Code:
   Player       Grade  Level    Time       Comment
--------------------------------------------------------------------------------
1. Ai           S3     399      06:47:63

Last edited: 3 Sep 2013
2. ### rednefed

Mono:

Gm, 999 @ 11:23:83

3. ### Ai

Thanks for participating. And good job!

Just posting my MONO screenshot over here.

EDIT:

Last edited: 17 Jan 2010

5. ### Ai

Just under 12 minutes and got GM right at the end. Should be able to do better. A time around 11:45 is realistic.

Please do post your highest TGM scores. My current best is just over 160000, but I never played for high scores. I'll give it a serious try later this weekend. Scores over 126000 will be accepted and I won't mind slower S9 grades.

6. ### rednefed

Score attack: I believe I had a ~231k game (screen erased...), a 228k game, and my highest confirmed one was 220159.

7. ### DeHackEdgreen Gm

I have no screen shot, but my best recorded time in Mono mode is 11:30.18 when I stopped playing that mode. That would have been some time in 2007.

I don't know what my best score is. Put me down for 203,470 for now (also my record GM time in basic mode) and I'll give it a proper go tomorrow.

8. ### Ai

Score attack leaderboard added. I got 176640 a few moments ago. Will play more this weekend, try to break 200k and post a screenshot. I put your highest score on the leaderboard rednefed. Any idea what the record is for this challenge? I think I saw a score around 250000, but I could be mistaken.

EDIT:

9. ### rednefed

Mono: GM, 999 @ 11:01:10

10. ### COL

204886
20G code score(It's the simplest way to avoid the infamous 400-500 speed ), used some combos.

11. ### COL

11:57:81
It is so easy to make mistakes here... Players with good peripheral vision should be avantaged. I think I can do better, I'll play it again.

12. ### Ai

@COL:

EDIT:

I tried playing a few times earlier today. Looks like I have a hard time getting a decent score with my current 20G play. ; Congrats COL!

Last edited: 7 Feb 2010
13. ### COL

no code: 218783 gm in 12:07:75 (level stop abuse... I wasn't very lucky at the end. I think >230k is possibleand I'll try it)

EDIT:

Combos definitely help

Last edited: 7 Feb 2010
14. ### rednefed

Mono:

Decent score and a personal time best, 10:44:31.

15. ### Ai

Great job both of you. It's hard to believe that you can't do better in TGM rednefed. I'd say you should at least be 10 seconds faster. Or do you have an explanation for this unique performance? As for me I need some 20G clean stacking practice for higher scores.

Oh and you should both look into posting over here.

16. ### AmnesiaPiece of Cake

Come back mfm and show him...
You gave me an interesting challenge, I will try it, no need damn speed for this, that will give me some rest..

18. ### Ai

Thanks for the link COL. Some of those records have been posted on the forum. Nice x99 level stop abuse. This is exactly why I decided to allow S9. I didn't know about the following:

• TGM GM in 10:51:30
• TAP Master Gold SK around level 547
• TAP Master Big Mode Gold SK around level 58
• Getting S9 using level 701 and 801 level block cheat with scores over 500000 and times just over 15 minutes
• TAP T.A. Death level 436 in 03:02:33


text:
## anonymous 4 years ago Choose the equation below that represents the line passing through the point (-3, -1)with a slope of 4 y - 1 = 4(x - 3) y - 3 = 4(x + 1) y + 1 = 4(x + 3) y + 3 = 4(x - 1)

1. anonymous

y+1=4(x+3)

2. Hero

$\text{The point slope form is} \space y-y_1 = m(x-x_1)$

format: plain


text:
# 8.1   Specifications

## 8.1.1   Instrument Overview

The High-resolution Airborne Wideband Camera (HAWC+) is a multi-wavelength far-infrared imager and polarimeter with continuum bandpasses from 40 um to 300 um. HAWC+ Total Intensity Imaging uses a filter wheel and a polarizing grid to split incoming light into two orthogonal components of lineal polarization, the reflected (R) and transmitted (T) rays. For Polarimetry Imaging, a rotating half-wave plate (HWP) is introduced before the filter wheels. The current state of the instrument includes a 64x40 array measuring the R polarization state and a 32x40 array for the T polarization state. HAWC+ observations are diffraction-limited with a spatial resolution of 5 to 20 arcsec and a field of view (FOV) of 2 to 8 arcmin. HAWC+ is currently not offering observations at 63 um (Band B).

### 8.1.1.1   Design

A schematic of the HAWC+ optical design is shown in Figure 8-1. Prior to entering the HAWC+ cryostat, light from the SOFIA telescope enters the set of warm fore-optics mounted outside the cryostat. The light is reflected from a folding mirror to a field mirror, capable of imaging the SOFIA pupil at the cold pupil inside the HAWC+ cryostat. After the fore-optics, light enters the cryostat through a 7.6 cm diameter high-density polyethylene (HDPE) window, then passing through a cold pupil on a rotatable carousel, a near-infrared blocking filters to define each bandpass and lenses designed to optimize the plate scale. The pupil carousel and the filter wheel are at a temperature of ~10 K. The carousel contains eight aperture positions, four of which contain half wave plates (HWPs) for HAWC+ bands, an open aperture whose diameter is matched to the SOFIA pupil, and three aperture options meant only for instrument alignment tests.

After the pupil carousel, the light passes through a wire grid that reflects one component of linear polarization and transmits the orthogonal component to the detector arrays (R and T arrays, respectively—see Figure 8-2). The polarizing grid is heat-sunk to the HAWC+ 1 Kelvin stage.

To perform polarimetry observations, a HWP matched to the band-pass is rotated (usually through four discrete angles) to modulate the incident light and allow computation of the Stokes parameters. The total intensity can be measured simply by removing the HWPs from the optical path and using the open pupil position, then summing the signal from the R & T arrays.

The 64x40 HAWC+ detector array is composed of two co-mounted 32x40 subarrays from NASA/GSFC and NIST. The detectors are superconducting transition-edge sensor (TES) thermometers on membranes with a wide-band absorber coating. The detector array is indium bump bonded to a matched array of superconducting quantum interference device (SQUID) amplifiers, all cooled to an operating temperature of ~0.2 K in flight.

Figure 8-1.

Figure 8-1. Schematic of the HAWC+ optics. Light from the SOFIA telescope is incident from the right. The field and folding mirrors are mounted on the HAWC+ cryostat but extend into the SOFIA Nasmyth tube. At the polarizing grid the light is split into two orthogonal components of linear polarization and detected at the two separate arrays.

Figure 8-2.

Figure 8-2. HAWC+ utilizes two coaligned arrays of TES detectors, each array receiving polarized light from the source either by reflection (the R array) or transmission (the T array). The R array is populated with two 32x40 subarrays separated by 2.0 pixels, referred to as R0 (top left) and R1 (top right). The arrays are coaligned such that R0 and T0 (bottom left) observe the same patch of sky. Polarization observations are only supported using the R0 and T0 subarrays, and therefore observations are limited to the left half of the nominal field of view, or 32x40 pixels. Total intensity observations are supported using the combined R0 and R1 field of view, or 64x40 pixels with a 2.0 pixel gap between them.

## 8.1.2   Performance

The absorbing coatings on the HAWC+ detector arrays were optimized to produce about 50% efficiency across the wide (40–300 μm) range of bandpasses. The TESs were designed to optimize the sensor time constants and background power at which they saturate, with the goal being operation at both laboratory and stratospheric background levels. The final design includes a superconducting transition temperature of ~0.3 K and a detector yield of > 50%. Measurements of detector noise show that their contribution to total measurement uncertainties is negligible such that noise levels are dominated by background photons from the atmosphere.

Measurements of the HAWC+ optical system in the laboratory are consistent with optical models, and flight data have confirmed that the observations are diffraction limited at all wavelengths.

Table 8-1 shows the Full Width Half Maxiumum (FWHM) of each bandpass as measured using Gaussian profiles, the finite size of the HAWC+ detectors, and a convolution across the measured filter bandpasses. The Instrumental Polarization (IP) of HAWC+ at each band is shown in terms of the normalized Stokes parameters, q and u, which were estimated using the observations of planets during several observing runs on November 2016 and May 2017. The IP is mainly derived from the tertiary mirror of SOFIA with the position angle of polarization perpendicular to the tertiary mirror direction. The filter transmission curves (text tables) are available as a zip file or individually from Table 8-1.

For polarimetry observations, the current configuration of HAWC+ lacks a second T polarization state array; as such, the field of view is reduced to approximately half in the largest side of the array, providing a 32x40 pixel size rather than 64x40 pixels (the first element of the Field of View in Table 8-1).  Total intensity observations are unaffected and can use the whole field of view via the R polarization state.

Table 8-1: Instrument Characteristics
Important: Sensitivity values were updated on June 15, 2018 to reflect final commissioning analysis based on Cycle 5 & Cycle 6 observations.
Parameter Units Band A Band C Band D Band E
Mean Wavelength (λ0) μm 53 89 154 214
Bandwidth (Δλ) - 9.01 16.91 33.88 42.8
Beam Size (FWHM) arcsec 4.85 7.8 13.6 18.2
Pixel Sizea arcsec 2.55 4.02 6.90 9.37
Total Intensity FOV arcmin 2.8x1.7 4.2x2.7 7.4x4.6 10.0x6.3
Polarimetry FOV arcmin 1.4x1.7 2.1x2.7 3.7x4.6 5.0x6.3
NESBb (photo) MJy sr-1 h1/2 18.8 6.3 1.6 0.8
MDCFc mJy 250 300 154 214
Mapping Speedd See footnote d 0.0027 0.029 1.1 7
MDCPFe % Jy 40 20 21 24
IPf q -0.0154 -0.0151 0.0028 -0.0129
u -0.0030 0.0090 0.0191 0.0111
MIfPg MJy sr-1 h1/2 28,000 6,000 2,000 1,300
Response Curve

png file

txt file

png file

txt file

png file

txt file

png file

txt file

a The center-to-center spacing of the pixels; pixel sizes (the space taken up by the photon sensitive area) are smaller by 0.21 arcsec at 53 μm and 0.75 arcsec at 215 μm.
b Noise Equivalent Surface Brightness for S/N = 1 into a single HAWC+ beam (FWHM given here).
c Minimum Detectable Continuum Flux for a point source with S/N = 4 in a 900 second integration.
d Real scan rate required to achieve a given an NESB. Units: arcmin2 h-1 (MJy sr-1)-2
e Minimum Detectable Continuum Polarized Flux for a point source with a S/N = 4 in a 900 second integration.
fInstrumental Polarization estimated using the observations of planets during several observing runs. The uncertainty of the instrumental polarization is smaller than 0.003 in both Stokes q and u.
gMinimum total Intensity required to measure Polarization (MIfP) to an uncertainty level σp ≤ 0:3%. All chop/nod and polarization overhead values have been applied to this value.

HAWC+ point source sensitivities were updated on June 2, 2017 and the values given here are based on the in-flight performance of the instrument. Note that values used in previous SOFIA observing cycles (Cycles 4 & 5) were estimates that contained an error (approximately a factor of two) in the expected point source sensitivity, so proposals should be updated accordingly for Cycle 6 before submission.

All photometric sensitivity estimates assume 100% observing efficiency without chopping and nodding. These values are pre-flight estimates and subject to change after the HAWC+ instrument has been commissioned. The USPOT time calculator will estimate the correct overhead values for NMC.

Additionally, analysis of data obtained on flights suggest the sensitivity may be lower than expected. The MDCF values will be correspondingly higher than the predicted pre-flight ones shown in Table 8-1 and used in Figure 8-4. The SOFIA webpages should be checked for the most current information.

Entries in blue represent predicted values; Band B is currently unavailable due to saturation in the band but may be offered as shared risk in future cycles.

### 8.1.2.1   Filters

HAWC+ can produce images using continuum bandpasses in either Total Intensity Imaging or Polarimetry Imaging configurations. In Polarimetry Imaging, the dual-beam nature of HAWC+ allows for the simultaneous measurement of both orthogonal lineal polarization components and obtain the Stokes parameters I, Q, and U. In Total Intensity Imaging, the sum of the R and T arrays provides the total intensity, Stokes I. As the HWP are used in Polarimetry Imaging, there is a slight loss of sensitivity as the HWP transmission is < 100% and additional overhead is required to account for rotating the HWP.

Both observing modes can utilize any one of five filters (however, to reiterate, Band B is not currently available). Figure 8-3 shows transmission profiles including all filters for all bandpasses. The effective wavelengths and bandwidths averaged over the total filter transmission are given in Table 8-1.

Figure 8-3.

Figure 8-3.

### 8.1.2.2   Total Intensity Imaging Sensitivities

Observations with HAWC+ for measurements of Total Intensity can be performed using either on-the-fly scanning (OTFMAP, where the telescope moves continuously at rates of ~10–200 arcsec/second without chopping of the secondary mirror) or using rapid modulation (chopping ~ 5–10 Hz) of the secondary accompanied by slow nodding of the telescope. The chopping option consists of a two-position chop, parallel to the nod direction where the chop amplitude matches the nod amplitude (NMC).

Figure 8-4 and Table 8-1 present HAWC+ imaging sensitivities for point sources, surface brightness, and mapping speed through each bandpass. Surface brightness is measured in units of MJy/sr and is the intensity required for a S/N = 1 observation in a one-hour integration time averaged over a single HAWC+ beam. The Minimum Detectable Continuum Flux into a HAWC+ beam is that needed to obtain a S/N = 4 in 900 seconds of on-source integration time. Figure 8-4 plots the MDCF for both observing modes OTFMAP and NMC where the latter follows from the former based on overheads related to chopping and nodding the telescope. NMC and OTFMAP are covered extensively in Section 8.2.

Figure 8-4.

Figure 8-4. HAWC+ Sensitivity estimates in units of the Minimum Detectable Continuum Flux (MDCF) into a single HAWC+ beam. (Recall that the beam area changes with bandpass). Values plotted here take into account all expected overheads. For example, Table 8-1 gives an MDCF of 57 mJy at 53 μm in OTFMAP, but is plotted here as 66 mJy to account for a 75% array detector yield. For Polarimetry, the plotted data show the polarized intensity p x I, where p is the fractional polarization (not percent). Note: analysis of data obtained on flights suggest the sensitivity may be lower than expected. The MDCF values will be correspondingly higher than the predicted pre-flight ones shown in Table 8-1 and used in Figure 8-3.

HAWC+ time estimates should be made using the on-line exposure time calculator, SITE. Note that integration times scale as shown in Equation 8-1 and Equation 8-2 from the values in Table 8-1:

(Eq. 8-1) $t=(NESBσ)2$

(Eq. 8-2) $t=(900 s)(NESBσ)2$

where t is the integration time and σ is the desired sensitivity for S/N = 1, each in the appropriate units. For OTFMAP, a useful sensitivity value is the mapping speed given in Equation 8-3:

(Eq. 8-3) $M=dΩdt=γΩarrays2$

where γ is related to the filling factor, Ωarray is the solid angle of the HAWC+ detector array, and s is some measure of the instrument sensitivity (e.g., MDCF or NESB). The values in Table 8-1 are given for S/N = 1 in a one-hour integration time assuming γ = 1, while SITE and Figure 8-3 use a more realistic value γ = 0.75. The time to map an area Ω (≥ Ωarray) to a sensitivity level σ is given by Equation 8-4:

(Eq. 8-4)

Note that this scaling only applies to map areas larger than the array field of view.

Atmospheric transmission will affect sensitivity, depending on water vapor overburden as will telescope zenith angle and telescope emissivity. For the estimates in Table 8-1 and Figure 8-3 we use a precipitable water vapor of 7.3 μm, a 50° zenith angle, and a telescope emissivity of 15%.

### 8.1.2.3   Polarimetry Imaging Sensitivities

HAWC+ contains four monochromatic HWPs. For Bands C, D, and E, the HWP thicknesses are matched to the bandpass filters. The thickness of the Band A HWP is matched to a wavelength between those of Bands A (53 μm) and B (63 μm), approximately 58 μm. However, this slight mismatch should not introduce significant systematics into the system. For the pre-flight HAWC+ sensitivity estimate here, the total system polarization efficiency (HWP + polarizing grid + all other optics) is assumed to be 90% for all five passbands.

The polarization sensitivity σp follows from the imaging sensitivity σI so that Equation 8-5 is true:

(Eq. 8-5) $σP=σI2ηpI$

where I is the source intensity, ηp is the system polarization efficiency, and σp is measured in units of percent (%). The Minimum Detectable Continuum Polarized Flux (MDCPF) reported in Table 8-1 is the value σp x I above, and follows from the total intensity MDCF. USPOT will add overhead values appropriate to NMC mode for polarimetry.

For Polarimetry Imaging, another useful quantity is the Minimum total Intensity required in order to measure polarization (MIfP) to a given depth in a given time interval. Choosing σp = 0.3% allows a polarization S/N = 3 for a source polarization of 1%, a value not atypical of bright Galactic clouds and a likely lower limit for HAWC+ systematic uncertainties. Table 8-1 lists these values for a one-hour integration time in units of surface brightness for an extended source where, unlike other values in Table 8-1, all appropriate overhead values have been added.

HAWC+ time estimates should be made using the on-line exposure time calculator, SITE. Note that integration times scale as shown in Equation 8-6 and Equation 8-7 from the values in Table 8-1:

(Eq. 8-6) $t=(1 h)(MIfPI)2(0.3%σp)2$

(Eq. 8-7) $t=(900 s)(MDCPF4σpI)2$

where t is the integration time and σp is the desired sensitivity for S/N = 1, each in the appropriate units.

A simple estimate for the polarization angle uncertainty is given by Equation 8-8:

(Eq. 8-8) $σφ=180πσp2p[degrees]$

Current best estimates for systematic uncertainties are 0.8% in percent polarization and 10° in polarization position angle.


text:
Elementary Algebra

a) We see from the ratio that 3/8 of students are male. Since there are around 1200 students, we guess that 450 are male. We check: $= (1096)(3/8) = 411$ b) The square footage is between twice and three times as much, so we guess that twice to three times the amount of fertilizer is needed. We guess 35 pounds. We check: $= 3000 (15/1200) = 37.5$ c) It is 3/2 as much money, so we need 3/2 the amount of the investment. We guess 7500 dollars, which is the answer. d) Its width is about 3/8 of the length. The length is almost 80, so the width must be a bit less than 30. We guess 28. We now check: $70(3/8) = 26.25$


text:
# Social Distancing for Retail Settings Reference Implementation

Version: 1   Published: 03/16/2021

Last Updated: 06/18/2021

## Overview

This reference implementation showcases a retail capacity limit application, line monitoring application, one-way monitoring application and social distancing application.

• Retail capacity limit application showcases where a people counter keeps track of how many people are in the store based on the detected people entering and exiting the store. Single virtual line is configured for both entrance and exit areas to indicate the limits of entering and exiting the area of interest.
• One-way retail application monitors if people are walking in the correct direction in a one-way direction store aisle and reports the people walking in the wrong direction.
• Line monitoring retail application counts people standing in, waiting line at a retail store. The application estimates how many people are waiting in a line by doing an intersection between the people detected and a virtual line.
• Social distancing application gives count of people who do not maintain social distance.

 Time to Complete Programming Language Available Software 20 - 30 minutes Python* 3 Intel® Distribution of OpenVINO™ toolkit Release

Recommended Hardware
The below hardware is recommended for use with this reference implementation. See the Recommended Hardware page for other suggestions.

## Target System Requirements

• Ubuntu* 18.04.3 LTS
• 6th to 11th Generation Intel® Core™ processors with Intel® Iris® Plus Graphics or Intel® HD Graphics
• USB webcam (optional)

## How It Works

The application uses the Inference Engine and Model Downloader included in the Intel® Distribution of OpenVINO™ toolkit doing the following steps:

1. Ingests video from a file, processing frame by frame.
2. Detects people in the frame using a pre-trained DNN model.
3. Extracts features from people detected using a second pre-trained DNN in order to do a tracking of the people.
4. If analytics field is socialdistancing in the camera_config.json file, then the application computes Euclidean distance between all the people and checks to see whether any people are violating N pixels apart.
5. If analytics field is capacitylimit in the camera_config.json file, then the application checks if people cross the predefined virtual gates based on the coordinates and identify in which direction the virtual gate was closed to determine if it is an entry or exit event.
6. The people counter is updated based on the entry and exit data.
7. If analytics field is capacitylimit in the camera_config.json file, then the application checks if any of the tracked persons are not going in the predefined allowed direction.
8. The oneway counter is updated based on the people violating the specified direction.
9. If analytics field is linemonitoring in the camera_config.json file, then the application checks for the count of people in the line area. The queue line area is defined by a virtual line in the configuration file. The result of the amount of people in line are showcased in the screen.
10. Store total violations count of social distancing data in InfluxDB*.
11. Visualize the stored data of InfluxDB on Grafana* dashboard.

The DNN models are optimized for Intel® architecture and are included with the Intel® Distribution of OpenVINO™ toolkit.

## Get Started

### Step 1: Install the Reference Implementation

unzip social_distancing_for_retail_settings.zip

2.  Go to social_distancing_for_retail_settings/ directory:
cd social_distancing_for_retail_settings

3. Change permission of the executable edgesoftware file:
chmod 755 edgesoftware

4. Run the command below to install the Reference Implementation:
./edgesoftware install

5. During the installation, you will be prompted for the Product Key. The Product Key is contained in the email you received from Intel confirming your download.

6. When the installation is complete, you see the message “Installation of package complete” and the installation status for each module.

7. Go to the working directory:
cd  Social_Distancing_for_Retail_Settings_<version>/Social_Distancing_for_Retail_Settings/retail-settings

NOTE: In the command above, <version> is the Intel® Distribution of OpenVINO™ toolkit version.

### Step 2: Build the Docker Images

NOTE: Run the commands mentioned below from the working directory, unless specified otherwise.

Build the Docker images with the command:

sudo -E docker-compose build

## Run the Application

NOTE: The steps below use sample videos included with the Reference Implementation. For instructions on how to run the application with feed from a camera or how to use other videos, see Optional Steps section.

1. Set the HOST_IP environment variable with the command:
export HOST_IP=$(hostname -I | cut -d' ' -f1) 2. Start the application with the command: sudo -E docker-compose up -d 3. Check if the containers are running properly with the command: sudo -E docker-compose ps 4. Check retailpandemic container logs with the command: sudo docker logs -f retailpandemic Example output: ### Visualize the Data on Grafana 1. Open an Internet Browser and go to http://localhost:3000. NOTE: If accessing remotely, go to http://:3000. Get host system IP address using: hostname -I | cut -d' ' -f1 2. Log in with user as admin and password as admin. 3. Click Home and Select the RPS to open the main dashboard. ### Dashboards Below are the dashboards for different analytics, which are mentioned in the camera_config.json To open the Grafana Dashboard for a particular camera with the detection results and other data metrics, click on the camera feed on the small window, as shown in the figure below. NOTE: To close the small window with camera feed, click the close button (X) on the top left corner of the window. To view the detection results of all the configured camera feeds, click on View All Streams from top right corner from the main Grafana Dashboard, i.e., RPS (refer to Figure 7: Grafana Main Dashboard – RPS) NOTE: To open combined streams in full tab go to http://localhost:5000/get_all_streams. ### Optional Steps #### Configure the Input The camera_config.json file on the working directory contains all the necessary configurations including the path to default input video. If you wish to change the input, edit camera_config.json file and add the required information. The role of elements in the camera_config.json file are: • analytics: Name of the application such as socialdistance, linemonitoring, onewaymonitoring and capacitylimit. • capacity_coords: Coordinates of the door/line segment. • capacity_limit: Total capacity of people in retail. • oneway_coords: Coordinates of the door/line segment. • oneway_area: Buffer area of interest around the coordinates to find oneway violation. • oneway_direction: Direction of violation such as “Up”, “Down”, “Right” or “Left”. • linemonitoring_coords: Coordinates of the door/line segment. • device: Hardware Device to be used for inferencing. (e.g.: CPU) NOTE: Supported hardware devices are CPU, HDDL and MYRIAD. You can also use a combination of these using MULTI (e.g.: MULTI:CPU,HDDL) • path: path to the input video. NOTE: Input videos should always be placed in the /resources folder. To use camera stream instead of video, replace the video file name with /dev/video0. To use RTSP stream instead of video, replace the video file name with the RTSP link. NOTE: If any of the device value in camera_config.json has MYRIAD, add the following line to smartcity service in docker-compose.yml file: privileged: true Validate the configuration file after changes (optional) with the command: cd app/ && python3 validate_config.py && cd ../ Restart the container: sudo docker restart retailpandemic #### Stop the application Stop all the containers using the command: sudo docker-compose down ## Summary and Next Steps This application successfully leverages Intel® Distribution of OpenVINO™ toolkit plugins for detecting and measuring distance between the people and storing data to InfluxDB*. ## Learn More To continue learning, see the following guides and software resources: ## Known Issues ### Limitation in Distance between Individual Cameras The distance between individual cameras, which is configured using their geographic coordinates, should not exceed to the range of hundreds of kilometers. If the distance exceeds the limit, all the Map drop pins may not be displayed on the home screen. ### Issue with Running the Application on GPU Device You might face an issue running the application on GPU device. ## Troubleshooting ### Address already in use If running the application results in Error starting userland proxy: listen tcp4 0.0.0.0:3000: bind: address already in use, use the following command to check and force stop the process: sudo kill$(pgrep grafana)

NOTE: If the issue persists, it may be possible that Grafana is running in a Docker container. In that case, stop the container using:

sudo docker stop \$(sudo docker ps -q --filter expose=3000)

### Support Forum

If you're unable to resolve your issues, contact the Support Forum.

#### Product and Performance Information

1

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.


text:
# Wave function of a free particle

1. Jun 17, 2005

### Feynmanfan

A short question:

I've learned that the wave function corresponding to a free particle has this form:

Psi(x,0)=1/sqrt(2*Pi)*Integral[g(k)*E^(ikx)dx] (i can't write it in Latex, sorry)

Is it just for the free particle, or any quantum state of a system can be represented in this form, where g(k) is the fourier transf. of Psi?

Can any function of x, represent the state of the free particle?

2. Jun 17, 2005

### dextercioby

It's a wave packet.It's an element of the $\tilde{M}$ which is the space of the continuous linear functionals on the nuclear subspace $M$.

That is $g(k)\in \tilde{M}$ and $\Psi (x,0)\in\tilde{M}$.

The free particle's (nonrelativistic) hamiltonian is a densly defined essentially self-adjoint linear operator with a completely continuous spectrum.It is unbounded,therefore the correct mathematical description of the system (free particle)is achived through the construct of rigged Hilbert space.The dual space of the nuclear subspace can be realized as a Hilbert space itself,by defining the scalar product of functionals and "moving" the Hamiltonian from $M$ to $\tilde{M}$.

As for quantum states,they are built from the fundamental theorems of Wigner & Bargmann.The quantum states are elements of the Rigged Hilbert space of the unitary/antiunitary ray/projective representations of the symmetry groups of the Hamiltonian.

Daniel.

Last edited: Jun 17, 2005


text:
# Number of distinct base

Hello, everyone.

I would like to get some concrete examples of the number of distinct bases of k-dimensional vector space W over a finite field F with q elements.

The formula for the number of distinct bases of W is ( p 412 Dummit )
(q^k - 1 )(q^k - q)(q^k - q^2)....(q^k - q ^(k-1) )

I am having a hard time finding an example of F with 2 elements and W be 2-dimensional vector space. According to the formula, 6 distinct bases of W should be acquired.

I will appreciate if anyone shows these 6 distinct bases of W.

Related Linear and Abstract Algebra News on Phys.org
take the $$Z_2$$ field and the vector space $$(Z_2)^2$$ meaning the vectors are { (0,0), (0,1), (1,0), (1,1) }
any two of the three last vectors are a base for the vector space

6 distinct bases of W might be

(0,1)(1,0)
(0,1)(1,1)
(1,0)(0,1)
(1,0)(1,1)
(1,1)(0,1)
(1,1)(1,0)

But my question is second one and fifth one, for instance, does not look distinct. So it seems to me just four distinct bases exists for W.

Any suggestion?

morphism


text:
# American Institute of Mathematical Sciences

September  2006, 1(3): 353-377. doi: 10.3934/nhm.2006.1.353

## Asymptotic analysis of an array of closely spaced absolutely conductive inclusions

 1 Department of Mathematics and Materials Research Institute, Penn State University, University Park, PA 16802, United States 2 Department of Engineering–University of Sannio, Benevento, Italy 3 Department of Mathematics, Pennsylvania State University, University Park, PA 16802, United States 4 LaMUSE–University Jean Monnet, Saint Etienne, France

Received  February 2006 Revised  June 2006 Published  July 2006

We consider the conductivity problem in an array structure with square closely spaced absolutely conductive inclusions of the high concentration, i.e. the concentration of inclusions is assumed to be close to 1. The problem depends on two small parameters: $\varepsilon$, the ratio of the period of the micro-structure to the characteristic macroscopic size, and $\delta$, the ratio of the thickness of the strips of the array structure and the period of the micro-structure. The complete asymptotic expansion of the solution to problem is constructed and justified as both $\varepsilon$ and $\delta$ tend to zero. This asymptotic expansion is uniform with respect to $\varepsilon$ and $\delta$ in the area $\{\varepsilon=O(\delta^{\alpha}),~\delta =O(\varepsilon^{\beta})\}$ for any positive $\alpha, \beta.$
Citation: Leonid Berlyand, Giuseppe Cardone, Yuliya Gorb, Gregory Panasenko. Asymptotic analysis of an array of closely spaced absolutely conductive inclusions. Networks & Heterogeneous Media, 2006, 1 (3) : 353-377. doi: 10.3934/nhm.2006.1.353
 [1] Yue-Jun Peng, Shu Wang. Asymptotic expansions in two-fluid compressible Euler-Maxwell equations with small parameters. Discrete & Continuous Dynamical Systems - A, 2009, 23 (1&2) : 415-433. doi: 10.3934/dcds.2009.23.415 [2] Micol Amar. A note on boundary layer effects in periodic homogenization with Dirichlet boundary conditions. Discrete & Continuous Dynamical Systems - A, 2000, 6 (3) : 537-556. doi: 10.3934/dcds.2000.6.537 [3] Grégoire Allaire, Alessandro Ferriero. Homogenization and long time asymptotic of a fluid-structure interaction problem. Discrete & Continuous Dynamical Systems - B, 2008, 9 (2) : 199-220. doi: 10.3934/dcdsb.2008.9.199 [4] Masahiro Suzuki. Asymptotic stability of a boundary layer to the Euler--Poisson equations for a multicomponent plasma. Kinetic & Related Models, 2016, 9 (3) : 587-603. doi: 10.3934/krm.2016008 [5] Kurusch Ebrahimi-Fard, Dominique Manchon. The tridendriform structure of a discrete Magnus expansion. Discrete & Continuous Dynamical Systems - A, 2014, 34 (3) : 1021-1040. doi: 10.3934/dcds.2014.34.1021 [6] Weixia Zhao. The expansion of gas from a wedge with small angle into a vacuum. Communications on Pure & Applied Analysis, 2013, 12 (5) : 2319-2330. doi: 10.3934/cpaa.2013.12.2319 [7] Fujun Zhou, Junde Wu, Shangbin Cui. Existence and asymptotic behavior of solutions to a moving boundary problem modeling the growth of multi-layer tumors. Communications on Pure & Applied Analysis, 2009, 8 (5) : 1669-1688. doi: 10.3934/cpaa.2009.8.1669 [8] Renjun Duan, Xiongfeng Yang. Stability of rarefaction wave and boundary layer for outflow problem on the two-fluid Navier-Stokes-Poisson equations. Communications on Pure & Applied Analysis, 2013, 12 (2) : 985-1014. doi: 10.3934/cpaa.2013.12.985 [9] Tetsutaro Shibata. Boundary layer and variational eigencurve in two-parameter single pendulum type equations. Communications on Pure & Applied Analysis, 2006, 5 (1) : 147-154. doi: 10.3934/cpaa.2006.5.147 [10] Erik Kropat, Silja Meyer-Nieberg, Gerhard-Wilhelm Weber. Bridging the gap between variational homogenization results and two-scale asymptotic averaging techniques on periodic network structures. Numerical Algebra, Control & Optimization, 2017, 7 (3) : 223-250. doi: 10.3934/naco.2017016 [11] Cui-Ping Cheng, Wan-Tong Li, Zhi-Cheng Wang. Asymptotic stability of traveling wavefronts in a delayed population model with stage structure on a two-dimensional spatial lattice. Discrete & Continuous Dynamical Systems - B, 2010, 13 (3) : 559-575. doi: 10.3934/dcdsb.2010.13.559 [12] Freddy Dumortier, Robert Roussarie. Canard cycles with two breaking parameters. Discrete & Continuous Dynamical Systems - A, 2007, 17 (4) : 787-806. doi: 10.3934/dcds.2007.17.787 [13] Hiroshi Matano, Ken-Ichi Nakamura, Bendong Lou. Periodic traveling waves in a two-dimensional cylinder with saw-toothed boundary and their homogenization limit. Networks & Heterogeneous Media, 2006, 1 (4) : 537-568. doi: 10.3934/nhm.2006.1.537 [14] Güher Çamliyurt, Igor Kukavica. A local asymptotic expansion for a solution of the Stokes system. Evolution Equations & Control Theory, 2016, 5 (4) : 647-659. doi: 10.3934/eect.2016023 [15] Thierry Paul, Mario Pulvirenti. Asymptotic expansion of the mean-field approximation. Discrete & Continuous Dynamical Systems - A, 2019, 39 (4) : 1891-1921. doi: 10.3934/dcds.2019080 [16] Gung-Min Gie, Chang-Yeol Jung, Roger Temam. Recent progresses in boundary layer theory. Discrete & Continuous Dynamical Systems - A, 2016, 36 (5) : 2521-2583. doi: 10.3934/dcds.2016.36.2521 [17] X. Liang, Roderick S. C. Wong. On a Nested Boundary-Layer Problem. Communications on Pure & Applied Analysis, 2009, 8 (1) : 419-433. doi: 10.3934/cpaa.2009.8.419 [18] Yao Xu, Weisheng Niu. Periodic homogenization of elliptic systems with stratified structure. Discrete & Continuous Dynamical Systems - A, 2019, 39 (4) : 2295-2323. doi: 10.3934/dcds.2019097 [19] Victor Wasiolek. Uniform global existence and convergence of Euler-Maxwell systems with small parameters. Communications on Pure & Applied Analysis, 2016, 15 (6) : 2007-2021. doi: 10.3934/cpaa.2016025 [20] Sunghan Kim, Ki-Ahm Lee, Henrik Shahgholian. Homogenization of the boundary value for the Dirichlet problem. Discrete & Continuous Dynamical Systems - A, 2019, 0 (0) : 1-22. doi: 10.3934/dcds.2019234

2018 Impact Factor: 0.871


text:
10

Duality and the coarse assembly map

One of the most influential conjectures in coarse geometry is the coarse Baum-Connes conjecture. It states that the so-called coarse assembly map

$$\mu\colon K{\mathcal X}_*(X)\to K_*(C^*X)$$

should be an isomorphism for metric spaces $$X$$ of bounded geometry.

One way to investigate rational injectivity of the coarse assembly map is by investigating the coarse co-assembly map, since they are related by index pairings.

We want to investigate another relation between assembly and co-assembly, namely through the cap product. Concretely, one might hope to construct more counter-examples to the surjectivity-part of the coarse Baum-Connes conjecture by twisting a single counterexample with suitable elements from the domain of the co-assembly map.

Cap products may also be used to prove Poincaré duality in certain situations. Another goal of this project is to construct a secondary cap products on coarse (co-)homology and on coarse K-(co-)homology. Coarse Poincaré duality is then expected to hold true for open cones over compact spaces. This will be used to investigate visual hyperbolic spaces since coarsely they are cones over their geodesic boundaries.

## Publications

This paper is a systematic approach to the construction of coronas (i.e. Higson dominated boundaries at infinity) of combable spaces. We introduce three additional properties for combings: properness, coherence and expandingness. Properness is the condition under which our construction of the corona works. Under the assumption of coherence and expandingness, attaching our corona to a Rips complex construction yields a contractible $$\sigma$$-compact space in which the corona sits as a $$\mathbb{Z}$$-set. This results in bijectivity of transgression maps, injectivity of the coarse assembly map and surjectivity of the coarse co-assembly map. For groups we get an estimate on the cohomological dimension of the corona in terms of the asymptotic dimension. Furthermore, if the group admits a finite model for its classifying space $$BG$$, then our constructions yield a $$\mathbb{Z}$$-structure for the group.

Related project(s):
10Duality and the coarse assembly map

• 1

## Team Members

Dr. Christopher Wulff


text:
Mizar
Search…
Labeling Methods
Building better targets for your model.
In supervised learning, every model requires target labels, without target labels it is not possible to fit a machine learning model with features, as the model does not know what the outcomes should be. In financial machine learning, the target labels can be constructed in various ways.
Fixed Time Horizon Method
The most common way to construct target labels for a trading strategy is to use fixed time horizons, for example, we take the price
$p_t$
at time
$t$
and look ahead with a fixed horizon
$k$
at price
$p_{t+k}.$
To calculate the target label we take the difference between the two prices, if the difference is positive, then we label this sample with 1 and otherwise -1. Note how this method does not take into account the intermediate prices, i.e. the target ignores the path taken from
$p_t$
to
$p_{t+k}$
, while in practice if you went long and the price dropped or increased significantly in this period, then you would have either have hit your stop-loss or profit-taking levels respectively.
Triple Barrier Labeling Method
The triple barrier labeling method by Prado (2018) takes into account the path taken when a position is taken at time
$t.$
First, we determine what our volatility-adjusted stop-loss and profit-taking levels are, these are the so-called horizontal barriers. We also define after how many periods the position should be closed out, as it is unrealistic to hold the position indefinitely, which we call the vertical barrier.
The triple barrier labeling method determines which of the horizontal and vertical barriers are hit first. In the context of taking a long position, the labels are assigned as follows. If the profit-taking level is hit first, then the label is 1. If the stop loss level is hit, then we label it with -1. If the price moves between the two barriers and hits the vertical barrier then we can either label it with 0 or we determine whether at that point in time whether we have made a loss or a profit and label it -1 or 1 respectively.
This method of creating labels is more in tune with what would actually happen in the real world and is therefore preferred over the fixed time horizon method.
Trend Scanning Method
The barrier levels in the triple barrier labeling are set by the user at their own discretion. The trend scanning method by Prado (2020) determines labels without having to set such barriers. The goal of trend scanning is to determine the dominant trend for a certain period and assign that period a label
$y_t \in \{-1, 0, 1 \},$
which corresponds with a down-trend, no-trend, or up-trend respectively. Consider a time series of prices
$\{p_t\}_{t=1,...,T}$
, to determine the label of
$p_t$
$L$
periods and we compute the following
$p_{t+l} = \beta_{0} + \beta_{1} l + \epsilon_{t+l} \\ \hat{t}_{\beta_1} = \dfrac{\hat{\beta}_1}{\hat{\sigma}_{\beta_1}}$
where
$l=0, ..., L - 1, L$
by taking different values for
$L$
we get different t-values. The label that is assigned to
$p_t$
is determined by the
$L$
for which the absolute value of the t-value
$\big|\hat{t_{\beta_1}}\big|$
is maximised.
References
• De Prado, M. L. (2018). Advances in financial machine learning. John Wiley & Sons.
• López de Prado, Marcos M. 2020. Machine Learning for Asset Managers. Elements in Quantitative Finance. Cambridge: Cambridge University Press. doi:10.1017/9781108883658.


text:
# Titration of Hydrochloric Acid against Standard Sodium Carbonate

Acid-base titration methods based on the dissolution of a sample in excess of standard acid, followed by back titration with a standard base. The hydrochloric acid solutions were standardized against pure sodium carbonate using bromophenol blue as an indicator.

## Aim

Determination of strength of a given solution of dilute Hydrochloric acid by titrating it against standard solution of Sodium Carbonate solution (M/10).

## Theory

Hydrochloric acid solution may be titrated against sodium carbonate solution using methyl orange indicator. When weak base is titrated with a strong acid solution is slightly acidic at end point. If a weak acid is titrated with a strong base the solution is slightly basic because the salt formed will be hydrolysed to a certain extent.

The chemical reactions involved in this titration is given below.

Na2CO3(aq) + 2HCl(aq) → 2NaCl(aq) + CO2(g) + H2O(l)

CO32-(aq) + 2H+(aq) → CO2(g) + H2O(l)

In acid base titrations at the end point the amount of the acid becomes chemically equivalent to the amount of base present. In case of a strong acid and a strong base titration at the end point of solution the solution becomes neutral.

## Materials Required

1. Burette
2. Pipette
4. Burette stand
5. Funnel
6. Stirrer
7. White glazed tile
9. Hydrochloric acid
10. Sodium carbonate
11. Methyl orange
12. Watch glass

## Procedure

### (a) Preparation of standard solution of sodium carbonate

1. Molecular weight of sodium carbonate = 106
2. Amount of sodium carbonate required to prepare solution of 250ml = 1.325g
3. Dissolve 1.325g of sodium carbonate in distilled water and prepare the standard solution in 250ml of measuring flask by adding the required amount of water.

### (b) Titration of hydrochloric acid and sodium carbonate solution

1. Wash, rinse and fill the burette with M/10 Na2CO3 solution. Note the initial reading.
2. Take 10cm3 of HCl solution with the help of a pipette and transfer it into a clean washed titration flask.
4. Add M/10 sodium carbonate solution to the titration flask till the colour changes to the light pink.
5. Note the final reading and find out the volume of sodium carbonate solution used to neutralise HCl solution.
6. Repeat the experiment till you get concordant readings.

## Observations

Volume of HCl solution = 10cm3

Volume of sodium carbonate solution used = V cm3

 S.No Initial reading of the burette Final reading of the burette Volume of Sodium carbonate solution used. 1 a cm3 b cm3 (b-a) cm3 2 b cm3 c cm3 (c-b) cm3 3 c cm3 d cm3 (d-c) cm3

## Calculations

(Sodium carbonate) a1M1V1 = (HCl) a2M2V2

$2\times \frac{1}{10}\times V = 1\times x\times 10$ $x = \frac{V}{5}$ $Strength\ in\ g/L = molarity \times molar\ mass$ $= \frac{V}{5}\times 36.5$

## Results and Discussion

The strength of hydrochloric acid solution is ________ g/L.

## Precautions

1. While weighing do not spill the substance on balance pan.
2. Rotate the knob of balance gently.
3. Keep the weights in weights box at proper places after weighing
4. Wash the watch glass carefully so that even a single crystal is not left on the watch glass.
5. Bring the watch glass close to funnel while transferring weighed substance and transfer it gently. Wash it repeatedly with distilled water.
6. Wash the burette with water after titration is over.
7. Last few drops should be added using pipette to avoid extra addition of distilled water above the mark on the neck of the measuring cylinder.

## Frequently Asked Questions on Titration of Hydrochloric Acid against Standard Sodium Carbonate

### What is normality ?

Normality is defined as number of gram equivalents dissolved per litre of solution. $N = \frac{Strength\ of\ solution\ in\ g/L}{Equivalent\ weight\ of\ solute\ in\ grams}$

### What is burette used for ?

Burette is a glass apparatus used for titration. It is used for delivering out any volume of a liquid under controlled conditions between a certain range.

### What is the end point ?

The stage during titration at which the reaction is just complete is known as end point. At the end point the chemical reaction is said to be completed. Indicators are used to find out the end point accurately.

### Why is it necessary to rinse the burette or pipette with the liquid it is filled ?

It is to be washed with water and then with distilled water only and it is not to be rinsed.

### Name few common indicators.

Phenolphthalein, methyl orange, starch etc are some common indicators used to find out the endpoint in volumetric analysis.


text:
## April 19, 2017

### Functional Equations, Entropy and Diversity: A Seminar Course

#### Posted by Tom Leinster

I’ve just finished teaching a seminar course officially called “Functional Equations”, but really more about the concepts of entropy and diversity.

I’m grateful to the participants — from many parts of mathematics, biology and physics, at levels from undergraduate to professor — who kept coming and contributing, week after week. It was lots of fun, and I learned a great deal.

This post collects together all the material in one place. First, the notes:

Now, the posts I wrote every week:

Posted at 5:06 PM UTC | Permalink | Post a Comment

### The Diversity of a Metacommunity

#### Posted by Tom Leinster

The eleventh and final installment of the functional equations course can be described in two ways:

• From one perspective, I talked about conditional entropy, mutual information, and a very appealing analogy between these concepts and the most basic primary-school Venn diagrams.

• From another, it was about diversity across a metacommunity, that is, an ecological community divided into smaller communities (e.g. geographical sites).

The notes begin on page 44 here.

Posted at 4:59 PM UTC | Permalink | Post a Comment

## April 17, 2017

### On Clubs and Data-Type Constructors

#### Posted by Emily Riehl

Guest post by Pierre Cagne

The Kan Extension Seminar II continues with a third consecutive of Kelly, entitled On clubs and data-type constructors. It deals with the notion of club, first introduced by Kelly as an attempt to encode theories of categories with structure involving some kind of coherence issues. Astonishing enough, there is no mention of operads whatsoever in this article. (To be fair, there is a mention of “those Lawvere theories with only associativity axioms”…) Is it because the notion of club was developed in several stages at various time periods, making operads less identifiable among this work? Or does Kelly judge irrelevant the link between the two notions? I am not sure, but anyway I think it is quite interesting to read this article in the light of what we now know about operads.

Before starting with the mathematical content, I would like to thank Alexander, Brendan and Emily for organizing this online seminar. It is a great opportunity to take a deeper look at seminal papers that would have been hard to explore all by oneself. On that note, I am also very grateful for the rich discussions we have with my fellow participants.

Posted at 12:30 AM UTC | Permalink | Followups (4)

## April 14, 2017

### Value

#### Posted by Tom Leinster

What is the value of the whole in terms of the values of the parts?

More specifically, given a finite set whose elements have assigned “values” $v_1, \ldots, v_n$ and assigned “sizes” $p_1, \ldots, p_n$ (normalized to sum to $1$), how can we assign a value $\sigma(\mathbf{p}, \mathbf{v})$ to the set in a coherent way?

This seems like a very general question. But in fact, just a few sensible requirements on the function $\sigma$ are enough to pin it down almost uniquely. And the answer turns out to be closely connected to existing mathematical concepts that you probably already know.

Posted at 4:17 PM UTC | Permalink | Followups (9)

## April 5, 2017

### Applied Category Theory

#### Posted by John Baez

The American Mathematical Society is having a meeting here at U. C. Riverside during the weekend of November 4th and 5th, 2017. I’m organizing a session on Applied Category Theory, and I’m looking for people to give talks.

Posted at 8:53 PM UTC | Permalink | Followups (1)

### Functional Equations IX: Entropy on a Metric Space

#### Posted by Tom Leinster

Yesterday’s functional equations class can be described in two ways:

From a mathematical point of view, I gave a definition of the entropy of a probability distribution on a metric space. The high point was a newish maximum entropy theorem (joint work with Mark Meckes).

From a biological point of view, it was all about measuring the diversity of a community in a way that factors in the varying similarity between species. This approach is well-adapted to situations where there’s no clear division into “species” — for instance, communities of microbes. It also addresses a point made yesterday on this blog. All this is based on joint work with Christina Cobbold.

You can read the notes from yesterday’s class on pages 35–38 here.

Posted at 12:38 PM UTC | Permalink | Post a Comment

## April 4, 2017

### Elementary (∞,1)-Topoi

#### Posted by Mike Shulman

Toposes come in two varieties: “Grothendieck” and “elementary”. A Grothendieck topos is the category of sheaves of sets on some site. An elementary topos is a cartesian closed category with finite limits and a subobject classifier. Though these definitions seem quite different, they are very closely related: every Grothendieck topos is an elementary topos, while elementary toposes (especially when considered “over a fixed base”) behave very much like Grothendieck ones.

All the fervor about $(\infty,1)$-toposes nowadays has centered on Grothendieck ones: $(\infty,1)$-categories of $\infty$-sheaves of $\infty$-groupoids on $(\infty,1)$-sites. (Technically, this is only true if we use a perhaps-excessively-general notion of “site”, but it’s the right idea.) However, it’s quite natural to speculate about a corresponding notion of elementary $(\infty,1)$-topos. Because an elementary 1-topos is essentially “a category whose internal logic is intuitionistic higher-order type theory”, it’s natural to try to define an elementary $(\infty,1)$-topos to be an $(\infty,1)$-category whose “internal logic” is, or at least should be, a kind of homotopy type theory. However, even laying aside the unresolved questions involved in the “internal logic” of $(\infty,1)$-categories, it’s never been entirely clear to me exactly what “kind” of homotopy type theory we should use here.

Until now, that is. I propose the following definition: an elementary (∞,1)-topos is an $(\infty,1)$-category such that

• It has finite limits and colimits (in the $\infty$-sense, i.e. homotopy limits and colimits).
• It is locally cartesian closed.
• It has a subobject classifier, i.e. a map $\top:1\to \Omega$ such that for any $X$ the hom-$\infty$-groupoid $Hom(X,\Omega)$ is equivalent, by pullback of $\top$, to the $\infty$-groupoid of subobjects of $X$ (which is equivalent to a discrete set). Here a “subobject” is a map $S\to X$ such that each $\infty$-functor $Hom(Z,S) \to Hom(Z,X)$ is fully faithful.
• For any morphism $f:Y\to X$, there exists an object classifier $p:V\to U$ that classifies $f$ (i.e. $f$ is a pullback of $p$) and such that the collection of morphisms it classifies (i.e. the pullbacks of $p$) is closed under composition, finite fiberwise limits and colimits, and dependent products. Here $p:V\to U$ is an “object classifier” if for any $X$, pullback of $p$ yields a fully faithful functor from $Hom(X,U)$ to the core (the maximal sub-$\infty$-groupoid) of the slice $(\infty,1)$-category over $X$.
Posted at 9:08 AM UTC | Permalink | Followups (16)

## April 3, 2017

### Gluing Together Finite Shapes with Kelly

#### Posted by Emily Riehl

Guest post by David Jaz Myers

The Kan Extension Seminar continues with Kelly’s Structures defined by limits in the enriched context, I, or as I like to call it, Presenting categories whose objects are glued together out of finite shapes. This paper hit the presses in 1982 and represented both a condensation and generalization of the theory of locally finitely presentable categories. Kelly achieved both the condensing and the generalizing through his use of weighted (or, as he calls them, indexed) limits and colimits. The resulting theory is slick and highly categorical, but very dense. So, in this post, we’re going to button down a bit and skim over a few details so that we can focus on the story and the powerful results which sustain it, rather than the technicalities. I will label the propositions by where they appear in Kelly’s paper, so that you can find the technicalities if you would like.

At first, it will seem like this post is a radical departure from the previous seminar posts. But as we go on, we’ll see that gluing together finite shapes has a lot to do with the categorical approach to algebra that Evangelia wrote about in the post that kicked off our seminar.

Before I start, I’d like to thank Emily, Alexander, and Brendan for organizing this lovely seminar and inviting me to participate. I’d also like to thank my fellow students for their insight and conversation.

Posted at 1:52 AM UTC | Permalink | Followups (3)

### Enrichment and its Limits

#### Posted by Emily Riehl

Guest post by David Jaz Myers

What are weighted limits and colimits? They’re great, that’s what!

In this post, we prepare for the next part of the Kan Extension Seminar by learning a bit about enrichment and weighted limits and colimits. I’ll also describe the “$\mathcal{V}\,$ point of view” that I’ll be adopting for the next post.

Posted at 1:16 AM UTC | Permalink | Followups (4)

## April 1, 2017

### Jobs at U. C. Riverside

#### Posted by John Baez

The Mathematics Department of the University of California at Riverside is trying to hire some visiting assistant professors. We plan to make decisions quite soon!

The positions are open to applicants who have PhD or will have a PhD by the beginning of the term from all research areas in mathematics. The teaching load is six courses per year (i.e. 2 per quarter). In addition to teaching, the applicants will be responsible for attending advanced seminars and working on research projects.

This is initially a one-year appointment, and with successful annual teaching review, it is renewable for up to a third year term.

For more details, including how to apply, go here:

https://www.mathjobs.org/jobs/jobs/10162

Posted at 7:54 AM UTC | Permalink | Post a Comment

## March 29, 2017

### Functional Equations VIII: Measuring Biodiversity

#### Posted by Tom Leinster

Posts entitled “Such-and-Such Part 8” can be intimidating…! But in this week’s instalment of the functional equations course, we just began a new topic. So if you’ve been interested in this course at a distance, without having actually dived in, now is a decent entry point.

This week, I introduced the difficult conceptual question of how to quantify biological diversity. A partial answer is given by what ecologists call the Hill numbers, which are the exponentials of what others call the Rényi entropies. I explained what these are, how they behave, and how they’re linked to other mathematical concepts.

There were hardly any actual functional equations this week, but they’ll come back soon! This week was mainly just background and intuition.

You can find the notes from this week’s session on pages 30–34 of the notes so far.

Posted at 2:32 AM UTC | Permalink | Followups (4)

## March 22, 2017

### Functional Equations VII: The p-Norms

#### Posted by Tom Leinster

The $p$-norms have a nice multiplicativity property:

$\|(A x, A y, A z, B x, B y, B z)\|_p = \|(A, B)\|_p \, \|(x, y, z)\|_p$

for all $A, B, x, y, z \in \mathbb{R}$ — and similarly, of course, for any numbers of arguments.

Guillaume Aubrun and Ion Nechita showed that this condition completely characterizes the $p$-norms. In other words, any system of norms that’s multiplicative in this sense must be equal to $\|\cdot\|_p$ for some $p \in [1, \infty]$. And the amazing thing is, to prove this, they used some nontrivial probability theory.

All this is explained in this week’s functional equations notes, which start on page 26 here.

Posted at 2:12 AM UTC | Permalink | Post a Comment

## March 21, 2017

### On the Operads of J. P. May

#### Posted by Emily Riehl

Guest post by Simon Cho

We continue the Kan Extension Seminar II with Max Kelly’s On the operads of J. P. May. As we will see, the main message of the paper is that (symmetric) operads enriched in a suitably nice category $\mathcal{V}$ arise naturally as monoids for a “substitution product” in the monoidal category $[\mathbf{P}, \mathcal{V}]$ (where $\mathbf{P}$ is a category that keeps track of the symmetry). Before we begin, I want to thank the organizers and participants of the Kan Extension Seminar (II) for the opportunity to read and discuss these nice papers with them.

Posted at 11:07 AM UTC | Permalink | Followups (3)

## March 15, 2017

### Functional Equations VI: Using Probability Theory to Solve Functional Equations

#### Posted by Tom Leinster

A functional equation is an entirely deterministic thing, such as $f(x + y) = f(x) + f(y)$ or $f(f(f(x))) = x$ or $f\Bigl(\cos\bigl(e^{f(x)}\bigr)\Bigr) + 2x = \sin\bigl(f(x+1)\bigr).$ So it’s a genuine revelation that one can solve some functional equations using probability theory — more specifically, the theory of large deviations.

This week and next week, I’m explaining how. Today (pages 22-25 of these notes) was mainly background:

• an introduction to the theory of large deviations;

• an introduction to convex duality, which Simon has written about here before;

• how the two can be combined to get a nontrivial formula for sums of powers of real numbers.

Next time, I’ll explain how this technique produces a startlingly simple characterization of the $p$-norms.

Posted at 12:56 AM UTC | Permalink | Post a Comment

## March 10, 2017

### The Logic of Space

#### Posted by Mike Shulman

Mathieu Anel and Gabriel Catren are editing a book called New Spaces for Mathematics and Physics, about all different kinds of notions of “space” and their applications. Among other things, there are chapters about smooth spaces, $\infty$-groupoids, topos theory, stacks, and various other things of interest to $n$-Cafe patrons, all of which I am looking forward to reading. There are chapters by our own John Baez about the continuum and Urs Schreiber about higher prequantum geometry. Here is my own contribution:

Posted at 12:58 PM UTC | Permalink | Followups (15)


text:
# Solve 2-9Z / 17-4Z = 4/5

Given: $(\frac{2 – 9z}{17 – 4z}) = (\frac{4}{5})$

5 (2 – 9z) = 4 (17 – 4z)

= 10 – 45z = 68 – 16z

= 10 – 68 = 16z + 45z

= -58 = 29z

= z = -58/29

= z = -2

Explore more such questions and answers at BYJU’S.


text:
## HD 77407 and GJ 577: Two new young stellar binaries. Detected with the Calar Alto Adaptive Optics system ALFA

Mugrauer, M., Neuhäuser, R., Guenther, E. W., Hatzes, A. P., Huélamo, N., Fernández, M., Ammler, M., Retzlaff, J., König, B., Charbonneau, D., Jayawardhana, R., and Brandner, W.
Astronomy and Astrophysics, v.417, p.1031-1038 (2004)
04/2004

#### ABSTRACT

We present the first results from our search for close stellar and sub-stellar companions to young nearby stars on the northern sky. Our infrared imaging observations are obtained with the 3.5 m Calar Alto telescope and the AO system ALFA. With two epoch observations which were separated by about one year, we found two co-moving companion candidates, one close to HD 77407 and one close to GJ 577. For the companion candidate near GJ 577, we obtained an optical spectrum showing spectral type M 4.5; this candidate is a bound low-mass stellar companion confirmed by both proper motion and spectroscopy. We estimate the masses for HD 77407 B and GJ 577 B to be ˜0.3 to 0.5 Msun and ˜0.16 to 0.2 Msun, respectively. Compared to Siess et al. (\cite{Siess2000}) models, each of the two pairs appears co-eval with HD 77407 A, B being 10 to 40 Myrs and GJ 577 A, B being ≥100 Myrs old. We also took multi-epoch high-resolution spectra of HD 77407 to search for sub-stellar companions, but did not find any with 3 MJup as upper mass (m sin i) limit (for up to 4 year orbits); however, we detected a long-term radial velocity trend in HD 77407 A, consistent with a ˜0.3 Msun companion at ˜50 AU separation, i.e. the one detected by the imaging. Hence, HD 77407 B is confirmed to be a bound companion to HD 77407 A. We also present limits for undetected, but detectable companions using a deep image of HD 77407 A and B, also observed with the Keck NIRC2 AO system; any brown dwarfs were detectable outside of 0.5 arcsec (17 AU at HD 77407), giant planets with masses from ˜6.5 to 12 MJup were detectable at ≥1.5 arcsec.


text:
GeometricProbability AMC10/12 Difficult
2015

Problem - 1249
Let $S$ be a square of side length $1$. Two points are chosen independently at random on the sides of $S$. Find the probability that the straight-line distance between the points is at least $\dfrac{1}{2}$.


text:
SEARCH HOME
 Math Central Quandaries & Queries
 Question from Ralph: How many combinations are possible if a "safe" has four buttons and you can use a six digit code? (these are just single press buttons..)For example, this could be one possible combination: Button 4 Button 1 Button 1 Button 3 Button 2 Button 4. Thanks!

Hi Ralph,

You have a six digit code where the digits can be 1, 2, 3 or 4.

The first digit can be 1, 2, 3 or 4 and regardless of your choice for the first digit the second digit can also be either 1, 2, 3 or 4. Thus there are $4 \times 4$ possible choices for the first two digits. The choices are 11, 12, 13, 14, 21, 22, 23, 24, 31, 32, 33, 34, 41, 42, 43 and 44.

Now the third digit. Regardless of your choice for the first two digits the third digit can also be either 1, 2, 3 or 4. Hence there are $4 \times 4 \times 4$ choices for the first three digits. They are 111, 112, 113 and so on.

I hope this helps,
Penny

Math Central is supported by the University of Regina and the Imperial Oil Foundation.


text:
### Calculate the molar mass of each of the following…

View
MC
The University of Alabama

This question is in the process of being solved. The video shown is an answer to a question that covers similar topics.

Problem 10

Calculate the molar mass of each of the following:
$$\begin{array}{llll}{\text { (a) } \mathrm{SnO}} & {\text { (b) } \mathrm{BaF}_{2}} & {\text { (c) } \mathrm{Al}_{2}\left(\mathrm{SO}_{4}\right)_{3}} & {\text { (d) } \mathrm{MnCl}_{2}}\end{array}$$

Check back soon!
Chapter 3
Stoichiometry of Formulas and Equations
CHEMISTRY: The Molecular Nature of Matter and Change 2016

## Discussion

You must be signed in to discuss.

## Video Transcript

No transcript available


text:
A Nonlinear Plancherel Theorem with Applications to Global Well-Posedness for the Defocusing Davey-Stewartson Equation and to the Inverse Boundary Value Problem of Calderón
Open Access Publications from the University of California

## A Nonlinear Plancherel Theorem with Applications to Global Well-Posedness for the Defocusing Davey-Stewartson Equation and to the Inverse Boundary Value Problem of Calderón

We prove a Plancherel theorem for a nonlinear Fourier transform in two dimensions arising in the Inverse Scattering method for the defocusing Davey-Stewartson II equation. We then use it to prove global well-posedness and scattering in $L^2$ for defocusing DSII. This Plancherel theorem also implies global uniqueness in the inverse boundary value problem of Calder on in dimension $2$, for conductivities $\sigma>0$ with $\log \sigma \in \dot H^1$. The proof of the nonlinear Plancherel theorem includes new estimates on classical fractional integrals, as well as a new result on $L^2$-boundedness of pseudo-differential operators with non-smooth symbols, valid in all dimensions.


text:
# how to use opencv2.4.4 flann

Hi,

I'm using opencv 2.4.4 flann.

to do KNN.

I have a matrix(8000*32) flann_m. There are 8000 data and each with 32 features.

I wrote code like this:

    flann::Index flann_index(flann_m, flann::LinearIndexParams());
flann_index.save("flann_index.fln");

Mat resps(ROW,K,CV_32F);
Mat nresps(ROW,K,CV_16S);
Mat dist(ROW,K,CV_32F);

flann_index.knnSearch(flann_m,nresps,dist,K,flann::SearchParams(64));

And I could get the KNN results in nresps and dist, with nresps the indexes of N neighbors, and dist the distances.

But I don't know how to set different distance algorithm (ChiSquare, Euclidean, etc.) in opencv flann. I checked flann.cpp, and it seems the set_distance() function is deperecated.

edit retag close merge delete

Sort by » oldest newest most voted

Actually something like

cv::flann::GenericIndex<cv::L1<float> > index()

should work or worked some while ago. However, I get a compiler error here. So afaik - maybe I am wrong here! - this works only with the cvflann-namespace:

cvflann::Index<cvflann::ChiSquareDistance<float> > flann_index(flann_m, cvflann::LinearIndexParams());

However, then you also need to convert your flann_m and your other matrices to flann-matrices, e.g.

cvflann::Matrix<float> samplesMatrix((float*)flann_m.data, flann_m.rows, flann_m.cols);

But in the case you need to use the cvflann-namespace I would immediatly chose to use the original up-to-date flann-library (http://www.cs.ubc.ca/~mariusm/index.php/FLANN/FLANN), their you need to do the same steps but have the advantage of a bug-fixed version (be aware that you don't mix the flann:: and the cv::flann:: namespaces) - this is what I actually use. Let me know if you get it working with the cv::flann::-namespace. Good luck!

UPDATE: Adding working example: (both namespaces cvflann:: and flann:: (using the original library) produced same results

int test_rank = 10;
cvflann::Matrix<float> data( (float*)all_data.data, all_data.rows, all_data.cols );
cvflann::Index<cvflann::ChiSquareDistance<float> > index(data, cvflann::LinearIndexParams());
index.buildIndex();

// make cv::Mat-header for easier access
// (you can do the same with the dists-matrix if you need it)
cv::Mat1i ind(data.rows, test_rank);
CV_Assert(ind.isContinuous());
cvflann::Matrix<int> indices((int*) ind.data, ind.rows, ind.cols);
cvflann::Matrix<float> dists(new float[data.rows*test_rank], data.rows, test_rank);
index.knnSearch(data, indices, dists, test_rank, cvflann::SearchParams(all_data.cols-1));

more

Thanks a lot. I will give it a try.

( 2013-04-08 10:20:49 -0500 )edit

Hi, I tried the original FLANN, and to solve namespace conflict is painful. But I don't know how to link the compiled package to my Visual Studio C++ project, and how to use this FLANN. Could you give me a sample?

By the way, I also tried cvflann namespace, but knnSearch didn't work (abort() has been called)

Matrix<float> samplesMatrix((float*)flann_m.data, flann_m.rows, flann_m.cols); Index<cvflann::ChiSquareDistance<float>> flann_index(samplesMatrix, cvflann::LinearIndexParams()); Matrix<int> nresps; Matrix<float>dist; flann_index.knnSearch(samplesMatrix,nresps,dist,K,SearchParams(64));

( 2013-04-12 01:16:47 -0500 )edit

I am not using Visual Studio C++, but it shouldn't be too difficult. FLANN provides also a cmake file if you are using cmake.

Back to topic: You need to initialize the matrices nresps and dist. I just tried both versions of your code, once using cvflann:: and once using the original flann:: and both worked fine, even gave me both times the same results, so you can also use cvflann:: instead of flann:: . One note: too large training matrices which don't fit in your memory will of course result in an abort(). I will update my post with a small example. Since the problem is solved, please mark the question as correct.

( 2013-04-13 11:28:57 -0500 )edit

Another note (just looked it up): with LinearIndex the SearchParams are ignored.

( 2013-04-13 16:23:27 -0500 )edit

Official site

GitHub

Wiki

Documentation


text:
# Homework Help: Show the gamma density function integrates to 1

1. Jun 29, 2013

### Catchfire

1. The problem statement, all variables and given/known data
Show the gamma density function integrates to 1.

2. Relevant equations
Assume α > 0, λ > 0, t > 0
g(t) = $\frac{λ^α}{\Gamma (α)} t^{α-1}e^{-λt}$
$\Gamma (α)= \int_0^∞ t^{α-1} e^{-t} dt$
3. The attempt at a solution

Show $\int_0^∞ \frac{λ^α}{\Gamma (α)} t^{α-1}e^{-λt} dt = 1$

$\int_0^∞ \frac{λ^α}{\Gamma (α)} t^{α-1}e^{-λt} dt$
= $\frac{λ^α}{\Gamma (α)} \int_0^∞ t^{α-1}e^{-λt}dt$
= $\frac{λ^α}{\Gamma (α)} \int_0^∞ t^{α-1}e^{-t}e^λdt$
= $\frac{λ^αe^λ}{\Gamma (α)} \int_0^∞ t^{α-1}e^{-t}dt$
= $\frac{λ^αe^λ \Gamma (α)}{\Gamma (α)}$
= $λ^αe^λ$

...where did I lose the plot?

2. Jun 29, 2013

### Dick

You lost it when you said $e^{-λt}=e^{-t}e^λ$. That's not true. I would try the variable substitution $u=λt$.

Last edited: Jun 29, 2013
3. Jul 1, 2013

### Catchfire

Looks like I need to refresh myself on the laws of exponents.

That substitution did the trick, thanks.


text:
(a) In the discussion above, where did the figure 601 come from? In other words, show how the...

(a) In the discussion above, where did the figure 601 come from? In other words, show how the equation 2401pq = n leads to the conclusion that n = 601.

(b) If you have more information, a smaller sample may be sufficient. For example, suppose you're SURE no fewer than 70% of the votes will be cast for your candidate. What sample size would you require to estimate the true percentage to within four percentage points?

Plagiarism Checker

Submit your documents and get free Plagiarism report

Free Plagiarism Checker


text:
# Does an unbalanced sample matter when doing logistic regression?

Okay, so I think I have a decent enough sample, taking into account the 20:1 rule of thumb: a fairly large sample (N=374) for a total of 7 candidate predictor variables.

My problem is the following: whatever set of predictor variables I use, the classifications never get better than a specificity of 100% and a sensitivity of 0%. However unsatisfactory, this could actually be the best possible result, given the set of candidate predictor variables (from which I can't deviate).

But, I couldn't help but think I could do better, so I noticed that the categories of the dependent variable were quite unevenly balanced, almost 4:1. Could a more balanced subsample improve classifications?

• It is hard to imagine how this could be. Perhaps you are cutting the predicted probability at 0.5? If so, try varying the cutoff. – Aniko Jan 7 '11 at 20:30
• The area under the ROC-curve is .585, a rather poor result. This implies that there really isn't a cutoff value where the specificity/sensitivity trade-off is worth it. Fiddling with the cutoff won't improve classifications much, as it would just decrease the specificity by roughly as much as it increases the sensitivity. – Michiel Jan 11 '11 at 7:52
• Are any of the Variables coefficients significantly different from $0$ (say more than five standard errors)? If not your problem Could be that you just don't have much explanatory power with your set of variables. – probabilityislogic Jan 21 '13 at 11:20
• Note also that your sample size in terms of making good predictions is really the number of unique patterns in the predictor variable, and not the number of sampled individuals. For example, a model with a single categorical predictor variable with two levels can only fit a logistic regression model with two parameters (one for each category), even if there are millions people in the sample. – probabilityislogic Jan 21 '13 at 11:32
• – amoeba Nov 6 '18 at 21:33

Balance in the Training Set

For logistic regression models unbalanced training data affects only the estimate of the model intercept (although this of course skews all the predicted probabilities, which in turn compromises your predictions). Fortunately the intercept correction is straightforward: Provided you know, or can guess, the true proportion of 0s and 1s and know the proportions in the training set you can apply a rare events correction to the intercept. Details are in King and Zeng (2001) [PDF].

These 'rare event corrections' were designed for case control research designs, mostly used in epidemiology, that select cases by choosing a fixed, usually balanced number of 0 cases and 1 cases, and then need to correct for the resulting sample selection bias. Indeed, you might train your classifier the same way. Pick a nice balanced sample and then correct the intercept to take into account the fact that you've selected on the dependent variable to learn more about rarer classes than a random sample would be able to tell you.

Making Predictions

On a related but distinct topic: Don't forget that you should be thresholding intelligently to make predictions. It is not always best to predict 1 when the model probability is greater 0.5. Another threshold may be better. To this end you should look into the Receiver Operating Characteristic (ROC) curves of your classifier, not just its predictive success with a default probability threshold.

• If you don't know the operational class frequencies, they can be estimated by EM without knowing the labels of the test/operational samples. The details are in Saerens et al. "Adjusting the Outputs of a Classifier to New a Priori Probabilities: A Simple Procedure", Neural Computation, vol. 14, no. 1, pp. 21-41, 2002 ( dx.doi.org/10.1162/089976602753284446 ). I've used this a couple of times and was impressed at how well it worked. Note however that the theoretical correction is not normally optimal, and setting it via e.g. cross-validation is often better. – Dikran Marsupial Jan 8 '11 at 17:17
• Yeah, I should have mentioned that the results from the ROC-curve weren't convincing also. In this case I think there isn't a threshold that gives satisfactory results. – Michiel Jan 11 '11 at 7:58
• Regarding making predictions: how can I take into account size of my training set for 0 and 1 outcomes? I indeed don't want to use threshold of 0.5, but not sure how to do this in R. – Perlnika Jun 3 '15 at 15:39
• @Perlnika The details are in the paper link (in the simplest case you change the estimated intercept). To threshold not at 0.5, just get the predicted probabilities using predict and compute for each whether it is greater than the new threshold. – conjugateprior Jun 4 '15 at 11:19
• @SassaNF It's true that an intercept shift can be offset by by a threshold change. However, that couples your probability estimation (inference) to relative costliness of errors (loss function), whereas the latter might differ in applications. For example, when the cost of mistaking a 1 for a 0 is C times the cost of mistaking a 0 for a 1, then you'd want to threshold your estimated probability at 1/(1+C). – conjugateprior May 25 '17 at 18:16

The problem is not that the classes are imbalanced per se, it is that there may not be sufficient patterns belonging to the minority class to adequately represent its distribution. This means that the problem can arise for any classifier (even if you have a synthetic problem and you know you have the true model), not just logistic regression. The good thing is that as more data become available, the "class imbalance" problem usually goes away. Having said which, 4:1 is not all that imbalanced.

If you use a balanced dataset, the important thing is to remember that the output of the model is now an estimate of the a-posteriori probability, assuming the classes are equally common, and so you may end up biasing the model too far. I would weight the patterns belonging to each class differently and choose the weights by minimising the cross-entropy on a test set with the correct operational class frequencies.

• +1 If you use a balanced dataset, the important thing is to remember that the output of the model is now an estimate of the a-posteriori probability – Zhubarb Jan 8 '15 at 12:17

Think about the underlying distributions of the two samples. Do you have enough sample to measure both sub- populations without a massive amount of bias in the smaller sample?

See here for a longer explanation.

https://statisticalhorizons.com/logistic-regression-for-rare-events

• This does not seem to answer the question. – Michael Chernick May 28 '17 at 18:13
• That is because there is no definite answer! It is about how you apply it and the amount of bias one is willing to allow into the estimation process. – Paul Tulloch May 28 '17 at 18:53
• I think this is great answer. As far as I understand all attempts to correct imbalance rely on some external knowledge not captured in the experiment. In particular knowing underlying distribution would help with corrections. – user1700890 Jun 2 '17 at 20:32


text:
# Aligning systems of equations by symbol and variable

Using this code:

\begin{flalign}
& +3x+2y-5z=+04 \\
& +2x+4y-1z=+12 \\
& -4x-8y+9z=-06 &
\end{flalign}

I produce this output:

However, I'd like to produce a similar alignment, but without leading 0's, 1's, and +'s.

I would like my code to produce this:

How do I modify my code to produce this?

## Variant with \hphantom

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{flalign}
& \mathbin{\hphantom{+}}3x+2y-5z=\hphantom{+0}4 \\
& \mathbin{\hphantom{+}}2x+4y-\hphantom{1}z=\hphantom{+}12 \\
& -4x-8y+9z=\hphantom{0}{-}6 &
\end{flalign}
\end{document}

• The space after the = is a little too large, because the needed space is the maximum of two digits or one digit with sign instead of one sign with two digits. Since the sign is larger than a digit, the 1 of 12 is set via \llap.

• Also, I do not think, the first sign in the line -4x should be spaced as binary operator, thus the following example uses an unary minus sign instead:

Example:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{flalign}
& \hphantom{+}3x+2y-5z = \hphantom{+}4 \\
& \hphantom{+}2x+4y-\hphantom{1}z = \hphantom{+}\llap{$1$}2 \\
& {-}4x-8y+9z = {-}6 &
\end{flalign}
\end{document}

As @vonbrand said, you can easily write systems of equations using systeme package, sadly for me the documentation is in french.

Code:

\documentclass{article}
\usepackage{systeme}

\begin{document}

\systeme{3x+2y-5z=4,2x+4y-z=12,-4x-8y+9z=-6}%Default settings

\medskip

\sysdelim{.}{.}\systeme{3x+2y-5z=4,2x+4y-z=12,-4x-8y+9z=-6}%Without the left brace

\medskip

\sysdelim{.}{.}\systeme{3x+2y-5z=4@E_{*},2x+4y-z=12,-4x-8y+9z=-6}%Equations with numbers

\end{document}

Output

UPDATE

This question shows you how to the change the alignment of the RHS of the equations in order to do that you just need to redefine the command \SYS@makesyspreamble@i as @egreg mentioned

UPDATE Code

\documentclass{article}
\usepackage{systeme}

\usepackage{regexpatch}

\makeatletter
\xpatchcmd{\SYS@makesyspreamble@i}
{$##$\hfil\null}% left alignment
{\hfil$##$\null}% right alignment
{}{}
\makeatother

\begin{document}

\systeme{3x+2y-5z=4,2x+4y-z=12,-4x-8y+9z=-6}

\medskip

\sysdelim{.}{.}\systeme{3x+2y-5z=4,2x+4y-z=12,-4x-8y+9z=-6}

\medskip

\sysdelim{.}{.}\systeme{3x+2y-5z=4@E_{*},2x+4y-z=12,-4x-8y+9z=-6}

\end{document}

• The alignment of the RHS does not match what the OP requests. – Werner Sep 1 '15 at 1:47

The systeme package (in TeXlive and MikTeX) is geared towards this. Haven't used it, though.


text:
# Find $\sum_{i\in\mathbb{N}}(n-2i)^k\binom{n}{2i+1}$

Find $$\sum_{i\in\mathbb{N}}(n-2i)^k\binom{n}{2i+1},$$ where both $n$ and $k$ are natural numbers.

I know the following identity: $$\sum_{i\in\{0\}\cup\mathbb{N}}i(i-1)\cdots(i-p)\binom{n}{2i+1}=(n-p-2)(n-p-3)\cdots(n-2p-2)2^{n-2p-3}.$$

But I am not sure whether this is helpful.

• what is $k$ here? What kind of variable? – Dr. Sonnhard Graubner Jul 8 '15 at 15:37
• $k$ is a natural number. What I am asking for is a closed form expression in terms of $n$ and $k$. – No_way Jul 8 '15 at 15:41

$\newcommand{\stirtwo}[2]{\left\{{#1}\atop{#2}\right\}}$ Using Stirling Numbers of the Second Kind, we can write monomials as sums of binomial coefficients: $$j^k=\sum_i\stirtwo{k}{i}i!\binom{j}{i}\tag{1}$$ Thus, \begin{align} \sum_{j\in\mathbb{N}}(n-2j)^k\binom{n}{2j+1} &=\sum_{j\in\mathbb{N}}(n-j)^k\binom{n}{j+1}\frac{1+(-1)^j}2\\ &=\sum_{j\in\mathbb{N}}j^k\binom{n}{n-j+1}\frac{1+(-1)^{n-j}}2\\ &=\sum_{j\in\mathbb{N}}j^k\binom{n}{j-1}\frac{1+(-1)^{n-j}}2\\ &=\frac1{n+1}\sum_{j\in\mathbb{N}}j^{k+1}\binom{n+1}{j}\frac{1+(-1)^{n-j}}2\\ &=\frac1{n+1}\sum_{i=1}^{k+1}\sum_{j\in\mathbb{N}}\stirtwo{k+1}{i}i!\binom{j}{i}\binom{n+1}{j}\frac{1+(-1)^{n-j}}2\\ &=\frac1{n+1}\sum_{i=1}^{k+1}\sum_{j\in\mathbb{N}}\stirtwo{k+1}{i}i!\binom{n+1-i}{j-i}\binom{n+1}{i}\frac{1+(-1)^{n-j}}2\\ &=\frac1{n+1}\sum_{i=1}^{k+1}\stirtwo{k+1}{i}i!\,2^{n-i}\binom{n+1}{i}-\frac12\stirtwo{k+1}{n+1}n!\\ &=\bbox[5px,border:2px solid #C0A000]{\sum_{i=1}^{k+1}\stirtwo{k+1}{i}(i-1)!\,2^{n-i}\binom{n}{i-1}\color{#C00000}{-\frac12\stirtwo{k+1}{n+1}n!}}\tag{2} \end{align} Note that the part in red vanishes when $n\gt k$.

A Note on the Second to Last Equality in $\boldsymbol{(2)}$

To clarify the justification of $(2)$, notice that \begin{align} \frac12\binom{n+1}{i}\sum_{j\in\mathbb{N}}\binom{n+1-i}{j-i} &=\frac12\binom{n+1}{i}(1+1)^{n+1-i}\\ &=2^{n-i}\binom{n+1}{i}\tag{3} \end{align} and \begin{align} \frac12\binom{n+1}{i}\sum_{j\in\mathbb{N}}(-1)^{n-j}\binom{n+1-i}{j-i} &=\frac12\overbrace{\binom{n+1}{i}}^{0\text{ if }i\gt n+1}(-1)^{n-i}\overbrace{(1-1)^{n+1-i}\vphantom{\binom{n+1}{i}}}^{0\text{ if }i\lt n+1}\\ &=-\frac12\big[i=n+1\big]\tag{4} \end{align} where $[\,\cdot\,]$ are Iverson Brackets.

Therefore, $$\sum_{j\in\mathbb{N}}\binom{n+1-i}{j-i}\binom{n+1}{i}\frac{1+(-1)^{n-j}}2 =2^{n-i}\binom{n+1}{i}-\frac12\big[i=n+1\big]\tag{5}$$

• Thanks for the answer, but is it possible to take $i$ away from the scene? I thought the answer could be expressed in closed form in terms of $n$ and $k$ only. Maybe this is too much to ask for... – No_way Jul 8 '15 at 16:37
• For a given $k$, this is a polynomial of degree $k$ times a power of $2$. For example, for $k=2$, $(2)$ gives $2^{n-3}(n^2+5n+4)$. – robjohn Jul 8 '15 at 16:50
• @No_way It's unlikely that we could get rid of the polynomial factor with $k$ as well. – r9m Jul 8 '15 at 16:56
• (+1), It was interesting reading this answer. To facilitate understanding I point out that the switch on the next to last line produces either all binomial coefficients ${n+1-i\choose q}$ yielding $2^{n+1-i}$ or those same coefficients with alternating signs which gives zero. Except when $i=n+1$ which produces zero-choose-zero so the sum does not give the correct value in that case and we must subtract it to get the correct answer. I believe we discussed this before. – Marko Riedel Jul 8 '15 at 22:13
• @MarkoRiedel: I have added a section with more explanation for $(2)$. – robjohn Jul 8 '15 at 23:04

Suppose we seek to evaluate $$\sum_{q=0}^n (n-2q)^k {n\choose 2q+1}.$$

We observe that $$(n-2q)^k = \frac{k!}{2\pi i} \int_{|z|=\epsilon} \frac{1}{z^{k+1}} \exp((n-2q)z) \; dz.$$

This yields for the sum $$\frac{k!}{2\pi i} \int_{|z|=\epsilon} \frac{1}{z^{k+1}} \sum_{q=0}^n {n\choose 2q+1} \exp((n-2q)z) \; dz \\ = \frac{k!}{2\pi i} \int_{|z|=\epsilon} \frac{\exp((n+1)z)}{z^{k+1}} \sum_{q=0}^n {n\choose 2q+1} \exp((-2q-1)z) \; dz$$

which is $$\frac{1}{2}\frac{k!}{2\pi i} \int_{|z|=\epsilon} \frac{\exp((n+1)z)}{z^{k+1}} \\ \times \left(\sum_{q=0}^n {n\choose q} \exp(-qz) - \sum_{q=0}^n {n\choose q} (-1)^q \exp(-qz)\right) \; dz.$$

This yields two pieces, call them $A_1$ and $A_2.$ Piece $A_1$ is $$\frac{1}{2}\frac{k!}{2\pi i} \int_{|z|=\epsilon} \frac{\exp((n+1)z)}{z^{k+1}} (1+\exp(-z))^n \; dz \\ = \frac{1}{2}\frac{k!}{2\pi i} \int_{|z|=\epsilon} \frac{\exp(z)}{z^{k+1}} (\exp(z)+1)^n \; dz$$ and piece $A_2$ is $$\frac{1}{2}\frac{k!}{2\pi i} \int_{|z|=\epsilon} \frac{\exp((n+1)z)}{z^{k+1}} (1-\exp(-z))^n \; dz \\ = \frac{1}{2}\frac{k!}{2\pi i} \int_{|z|=\epsilon} \frac{\exp(z)}{z^{k+1}} (\exp(z)-1)^n \; dz.$$

Recall the species equation for labelled set partitions: $$\mathfrak{P}(\mathcal{U}\mathfrak{P}_{\ge 1}(\mathcal{Z}))$$

which yields the bivariate generating function of the Stirling numbers of the second kind $$\exp(u(\exp(z)-1)).$$

This implies that $$\sum_{n\ge q} {n\brace q} \frac{z^n}{n!} = \frac{(\exp(z)-1)^q}{q!}$$ and $$\sum_{n\ge q} {n\brace q} \frac{z^{n-1}}{(n-1)!} = \frac{(\exp(z)-1)^{q-1}}{(q-1)!} \exp(z).$$

Now to evaluate $A_1$ proceed as follows:

$$\frac{1}{2}\frac{k!}{2\pi i} \int_{|z|=\epsilon} \frac{\exp(z)}{z^{k+1}} (2+\exp(z)-1)^n \; dz \\ = \frac{1}{2}\frac{k!}{2\pi i} \int_{|z|=\epsilon} \frac{\exp(z)}{z^{k+1}} \sum_{q=0}^n {n\choose q} 2^{n-q} (\exp(z)-1)^q \; dz \\ = \sum_{q=0}^n {n\choose q} 2^{n-q} \times q!\times \frac{1}{2}\frac{k!}{2\pi i} \int_{|z|=\epsilon} \frac{\exp(z)}{z^{k+1}} \frac{(\exp(z)-1)^q}{q!} \; dz.$$

Recognizing the differentiated Stirling number generating function this becomes $$\sum_{q=0}^n {n\choose q} 2^{n-q-1} \times q! \times {k+1\brace q+1}.$$

Now observe that when $n\gt k+1$ the Stirling number for $k+1\lt q\le n$ is zero, so we may replace $n$ by $k+1.$ Similarly, when $n\lt k+1$ the binomial coefficient for $n\lt q\le k+1$ is zero so we may again replace $n$ by $k+1.$ This gives the following result for $A_1:$

$$\sum_{q=0}^{k+1} {n\choose q} 2^{n-q-1} \times q! \times {k+1\brace q+1}.$$

Moving on to $A_2$ we observe that when $k\lt n$ the contribution is zero because the series for $\exp(z)-1$ starts at $z.$ This integral is simple and we have

$$\frac{1}{2}\frac{k!\times n!}{2\pi i} \int_{|z|=\epsilon} \frac{\exp(z)}{z^{k+1}} \frac{(\exp(z)-1)^n}{n!} \; dz.$$

Recognizing the Stirling number this yields $$\frac{1}{2} \times n! \times {k+1\brace n+1}.$$

which correctly represents the fact that we have a zero contribution when $k\lt n.$

This finally yields the closed form formula $$\sum_{q=0}^{k+1} {n\choose q} 2^{n-q-1} \times q! \times {k+1\brace q+1} - \frac{1}{2} \times n! \times {k+1\brace n+1}.$$

confirming the previous results.

This MSE link has a computation that is quite similar.


text:
# Tag Info

The variance of a random variable $X$ is the expected squared deviation from its mean:
$$\mbox{Var}\left[X\right] = \mbox{E}\left[\left(X - \mbox{E}\left[X\right]\right)^2\right] = \mbox{E}\left[X^2\right] - \left(\mbox{E}\left[X\right]\right)^2.$$
The two kinds of variance are related. Variance in the first sense is a property of a random variable. One way to estimate that property from data (viewed as $n$ independent realizations of the variable) uses the population variance of the data. A related estimator called the "sample variance." It is equal to $n/(n-1)$ times the population variance.
Not all random variables have finite variance. This occurs when $\mbox{E}\left[X^2\right]$ diverges. For example, the Cauchy distribution (Student t distribution with 1 degree of freedom) does not have a finite variance.