text:
## art brut [no!]

Posted in pictures, Statistics, Travel with tags , , , , , , , , , , , , on June 27, 2019 by xi'an

## ENSEA & CISEA 2019

Posted in Books, pictures, Statistics, Travel, University life with tags , , , , , , , , , , , on June 26, 2019 by xi'an

I found my (short) trip to Abdijan for the CISEA 2019 conference quite fantastic as it allowed me to meet with old friends, from the earliest days at CREST and even before, and to meet new ones. Including local students of ENSEA who had taken a Bayesian course out of my Bayesian Choice book. And who had questions about the nature of priors and the difficulty they had in accepting that several replies were possible with the same data! I wish I had had more time to discuss the relativity of Bayesian statements with them but this was a great and rare opportunity to find avid readers of my books! I also had a long chat with another student worried about the use or mis-use of reversible jump algorithms to draw inference  on time-series models in Bayesian Essentials, chat that actually demonstrated his perfect understanding of the matter. And it was fabulous to meet so many statisticians and econometricians from West Africa, most of them French-speaking. My only regret is not having any free time to visit Abidjan or the neighbourhood as the schedule of the conference did not allow for it [or even for a timely posting of a post!], especially as it regularly ran overtime. (But it did provide for a wide range of new local dishes that I definitely enjoyed tasting!) We are now discussing further opportunities to visit there, e.g. by teaching a short course at the Master or PhD levels.

## Bayesian conjugate gradients [open for discussion]

Posted in Books, pictures, Statistics, University life with tags , , , , , on June 25, 2019 by xi'an

When fishing for an illustration for this post on Google, I came upon this Bayesian methods for hackers cover, a book about which I have no clue whatsoever (!) but that mentions probabilistic programming. Which serves as a perfect (?!) introduction to the call for discussion in Bayesian Analysis of the incoming Bayesian conjugate gradient method by Jon Cockayne, Chris Oates (formerly Warwick), Ilse Ipsen and Mark Girolami (still partially Warwick!). Since indeed the paper is about probabilistic numerics à la Mark and co-authors. Surprisingly dealing with solving the deterministic equation Ax=b by Bayesian methods. The method produces a posterior distribution on the solution x⁰, given a fixed computing effort, which makes it pertain to the anytime algorithms. It also relates to an earlier 2015 paper by Christian Hennig where the posterior is on A⁻¹ rather than x⁰ (which is quite a surprising if valid approach to the problem!) The computing effort is translated here in computations of projections of random projections of Ax, which can be made compatible with conjugate gradient steps. Interestingly, the choice of the prior on x is quite important, including setting a low or high convergence rate…  Deadline is August 04!

## efficient MCMC sampling

Posted in Statistics with tags , , , on June 24, 2019 by xi'an

Maxime Vono, Daniel Paulin and Arnaud Doucet recently arXived a paper about a regularisation technique that allows for efficient sampling from a complex posterior which potential function factorises as a large sum of transforms of linear projections of the parameter θ

$U(\theta)=\sum_i U_i(A_i\theta)$

The central idea in the paper [which was new to me] is to introduce auxiliary variates for the different terms in the sum, replacing the projections in the transforms, with an additional regularisation forcing these auxiliary variates to be as close as possible from the corresponding projection

$U(\theta,\mathbf z)=\sum_i U_i(z_i)+\varrho^{-1}||z_i-A_i\theta||^2$

This is only an approximation to the true target but it enjoys the possibility to run a massive Gibbs sampler in quite a reduced dimension. As the variance ρ of the regularisation term goes to zero the marginal posterior on the parameter θ converges to the true posterior. The authors manage to achieve precise convergence rates both in total variation and in Wasserstein distance.

From a practical point of view, only judging from the logistic example, it is hard to fathom how much this approach improves upon other approaches (provided they still apply) as the impact of the value of ρ should be assessed on top of the convergence of the high-dimensional Gibbs sampler. Or is there an annealing version in the pipe-line? While parallelisation is a major argument, it also seems that the Gibbs sampler need a central monitoring for each new simulation of θ. Unless some asynchronous version can be implemented.

## A la Bienale di Venezia

Posted in Books, pictures, Travel with tags , , , , , , , , , , on June 23, 2019 by xi'an

Taking advantage of staying in Venezia over the weekend, we went to the huge international contemporary art exhibit located all over the city but mostly in the Arsenale and in the gardens. This was quite impressive in terms of diversity and style, of course, although the general feeling was rather bleak, centering on pollution and apocalyptic themes. The particularly ugly French exhibit was for instance a highly polluted sea surface, made of glass and only accessible by going around piles of gravel in the basement of the pavilion. Most exhibits also involved videos, often not making much sense, and comparatively few paintings or photographs. Within this depressing catalogue, a few beautiful highlights from my own perspective. One was a construct of several thousands shell-like objects, sculpted from sheep leather by Zahrah Al Ghamdi, a female Saudi Arabia artist Another one, representing Ghana, by the artists El Anatsui and Ibrahim Mahama, recycled aluminum stickers into huge maps, reminding me of the recycled maps in Munbai airport.Yet another one, difficult to catch, was a huge construct from the Philippines by Mark Justiniani, made of glass that gave an impression of infinite depth and again recycled different objects into wells, reminding me of the automated art pieces appearing in Gibson’s Count Zero. Called “Island Weather” to reflect upon the elusive nature of truth and the notion that everyone is an island, with bottomless layers of accumulated memories.

A series [called Angst] of remarkable night photographs by Soham Gupta of some inhabitants of the slums in Kolkata where the persons chose to act in relation with the hardship or trauma that led them to survive in the street. And still exhibiting joy and engaging into farciful behaviours. A video was however striking [from my perspective], describing the fight of a Nunavuk father to prevent his children being sent far away for schooling by the Canadian government, as it reminded me of a so different time when, as a child then, a catholic missionary from the Far North had come to our primary school and told us fascinating stories of the cruelly beautiful (or beautifully cruel?) like in the Arctic, in what did not appear yet as a strongly biased manner… The title of the Bienale this year was May you live in interesting times, which prompted many attendees to scrawl Theresa May you leave in interesting times over the exhibit panels! Interesting if bleak times indeed.

## cuida tu vestido y no hables tanto, Jorge!

Posted in Books, pictures with tags , , , , , , , , , , on June 22, 2019 by xi'an

“”In our societies, it even seems homosexuality is fashionable. And this mentality, in some way, also influences the life of the Church (..) Therefore, the Church recommends that people with that kind of ingrained tendency should not be accepted into the ministry or consecrated life. The ministry or the consecrated life is not his place.” [En nuestras sociedades parece incluso que la homosexualidad está de moda y esa mentalidad, de alguna manera, también influye en la vida de la Iglesia (…) En la vida consagrada y en la vida sacerdotal, ese tipo de afectos no tienen cabida] 2 December 2018

“One cannot live a whole life of accusing, accusing, accusing, the Church. Those who spend their lives accusing, accusing, accusing are not the devil’s children because the devil has none. [They are] friends, cousins and relatives of the devil, and this is wrong.” 22 February 2019

“It is becoming increasingly clear that we are now facing with what might accurately be called an educational crisis, especially in the field of affectivity and sexuality. [Gender theory] denies the difference and reciprocity in nature of a man and a woman and envisages a society without sexual differences, thereby eliminating the anthropological basis of the family. This ideology leads to educational programs and legislative enactments that promote a personal identity and emotional intimacy radically separated from the biological difference between male and female. Consequently, human identity becomes the choice of the individual, one which can also change over time.” Male and Female He Created Them: Towards a path of dialogue on the question of gender in education, June 2019

## sampling and imbalanced

Posted in Statistics with tags , , , , , on June 21, 2019 by xi'an

Deborshee Sen, Matthias Sachs, Jianfeng Lu and David Dunson have recently arXived a sub-sampling paper for  classification (logistic) models where some covariates or some responses are imbalanced. With a PDMP, namely zig-zag, used towards preserving the correct invariant distribution (as already mentioned in an earlier post on the zig-zag zampler and in a recent Annals paper by Joris Bierkens, Paul Fearnhead, and Gareth Roberts (Warwick)). The current paper is thus an improvement on the above. Using (non-uniform) importance sub-sampling across observations and simpler upper bounds for the Poisson process. A rather practical form of Poisson thinning. And proposing unbiased estimates of the sub-sample log-posterior as well as stratified sub-sampling.

I idly wondered if the zig-zag sampler could itself be improved by not switching the bouncing directions at random since directions associated with almost certainly null coefficients should be neglected as much as possible, but the intensity functions associated with the directions do incorporate this feature. Except for requiring computation of the intensities for all directions. This is especially true when facing many covariates.

Thinking of the logistic regression model itself, it is sort of frustrating that something so close to an exponential family causes so many headaches! Formally, it is an exponential family but the normalising constant is rather unwieldy, especially when there are many observations and many covariates. The Polya-Gamma completion is a way around, but it proves highly costly when the dimension is large…


text:
Thoughts on Software

• ## Search via querystring with Sveltekit

Today, I want to go through how you can implement a search page that reacts to changes to the url with sveltekit. Reacting to URL change rather than another event such as a form submit keeps implementation simple as the load event becomes the main driver for the search behaviour.

• ## Things to Consider When Exploring Solutions

Apart from writing code, driving architecture and designing/re-designing solutions; one of the most common activity for Software Developers is exploring a myriad of possible solutions to roll out a feature or improve an existing one.

When considering a particular problem being solved for a stakeholder, it’s always important to consider multiple ways of approaching the problem.

Here are the main things that I consider when making a decision as to which approach should be taken.

format: plain


text:
# How do you solve 19 - 13z = 9 - 12z?

$19 - 13 z = 9 - 12 z$
$\mathmr{and} , 19 - 9 = 13 z - 12 z$
$\mathmr{and} , z = 10$


text:
## “School of Physics”

Back to Papers Home
Back to Papers of School of Physics

Paper   IPM / P / 6848
School of Physics
Title:   Hierarchy of Chaotic Maps with An Invariant Measure
Author(s):
 1 M.A. Jafarizadeh 2 S. Behnia 3 S. Khorram 4 H. Nagshara
Status:   Published
Journal: J. Stat. Phys.
Vol.:  104
Year:  2001
Pages:   1013-1028
Supported by:  IPM
Abstract:
We give hierarchy of one-parameter family ϕ(α,x) of maps at the interval [0,1] with an invariant measure. Using the measure, we calculate Kolmogorov-Sinai entropy, or equivalently Lyapunov characteristic exponent of these maps analytically, where the results thus obtained have been approved with the numerical simulation. In contrary to the usual one-parameter family of maps such as logistic and tent maps, these maps do not possess period doubling or period-n-tupling cascade bifurcation to chaos, but they have single fixed point attractor for certain values of the parameter, where they bifurcate directly to chaos without having period-n-tupling scenario exactly at those values of the parameter whose Lyapunov characteristic exponent begins to be positive.


text:
### Electromagnetic Emission Produced by Three-wave Interactions in a Plasma with Continuously Injected Counterstreaming Electron Beams by Vladimir Annenkov and Igor Timofeev

2021-01-19

Weakly turbulent processes of three-wave interactions between Langmuir and electromagnetic waves in plasma with unstable electron flows are believed to be the main cause of type II and III solar radio emissions. The narrow band of type II bursts requires assuming that this radiation is generated in some local regions of shock fronts traveling in the solar corona, where the specific conditions for the enhancement of electromagnetic emissions near the […]

### Solar plasma radio emission and inertial Alfvén turbulence by O. Lyubchyk et al.*

2017-09-26

We study the influence of kinetic-scale Alfvénic turbulence on the generation of plasma radio emission in the solar coronal regions where the plasma/magnetic pressure ratio $\beta$ is smaller than the electron/ion mass ratio $m_{e}/m_{i}$. The present study is motivated by the phenomenon of solar type I radio storms associated with the strong magnetic field of active regions. The measured brightness temperature of the type I storms can be up […]


text:
Writing
14369420:

I hope one of these daysI will be as important to u as u where tooo me.....

Hoodmemes:

Who u talkin bout?

14369420:

$$\color{#0cbb34}{\text{Originally Posted by}}$$ @Hoodmemes Who u talkin bout? $$\color{#0cbb34}{\text{End of Quote}}$$ Hahah don’t matter

Astrid1:

Were* And Tsk I can feel Whatchu said right dere.

14369420:

$$\color{#0cbb34}{\text{Originally Posted by}}$$ @Astrid1 Were* And Tsk I can feel Whatchu said right dere. $$\color{#0cbb34}{\text{End of Quote}}$$ Yea

hhanan:

what???

14369420:

$$\color{#0cbb34}{\text{Originally Posted by}}$$ @hhanan what??? $$\color{#0cbb34}{\text{End of Quote}}$$ Nothign

hhanan:

$$\color{#0cbb34}{\text{Originally Posted by}}$$ @14369420 $$\color{#0cbb34}{\text{Originally Posted by}}$$ @hhanan what??? $$\color{#0cbb34}{\text{End of Quote}}$$ Nothign $$\color{#0cbb34}{\text{End of Quote}}$$ then why did you post it?

14369420:

$$\color{#0cbb34}{\text{Originally Posted by}}$$ @hhanan $$\color{#0cbb34}{\text{Originally Posted by}}$$ @14369420 $$\color{#0cbb34}{\text{Originally Posted by}}$$ @hhanan what??? $$\color{#0cbb34}{\text{End of Quote}}$$ Nothign $$\color{#0cbb34}{\text{End of Quote}}$$ then why did you post it? $$\color{#0cbb34}{\text{End of Quote}}$$ Bc I need someone to know thisss

14369420:

That’s why

Astrid1:

$$\color{#0cbb34}{\text{Originally Posted by}}$$ @hhanan $$\color{#0cbb34}{\text{Originally Posted by}}$$ @14369420 $$\color{#0cbb34}{\text{Originally Posted by}}$$ @hhanan what??? $$\color{#0cbb34}{\text{End of Quote}}$$ Nothign $$\color{#0cbb34}{\text{End of Quote}}$$ then why did you post it? $$\color{#0cbb34}{\text{End of Quote}}$$ There;s a point to it, just fid it

hhanan:

you could have just message it to them

14369420:

$$\color{#0cbb34}{\text{Originally Posted by}}$$ @hhanan you could have just message it to them $$\color{#0cbb34}{\text{End of Quote}}$$ Nah

hhanan:

$$\color{#0cbb34}{\text{Originally Posted by}}$$ @14369420 $$\color{#0cbb34}{\text{Originally Posted by}}$$ @hhanan you could have just message it to them $$\color{#0cbb34}{\text{End of Quote}}$$ Nah $$\color{#0cbb34}{\text{End of Quote}}$$ and this is considered spam

Joe2019:

lol, idk what this is but for some reason i think it is cool.

14369420:

$$\color{#0cbb34}{\text{Originally Posted by}}$$ @Joe2019 lol, idk what this is but for some reason i think it is cool. $$\color{#0cbb34}{\text{End of Quote}}$$ How

14369420:

$$\color{#0cbb34}{\text{Originally Posted by}}$$ @Joe2019 lol, idk what this is but for some reason i think it is cool. $$\color{#0cbb34}{\text{End of Quote}}$$ Thansk

Joe2019:

$$\color{#0cbb34}{\text{Originally Posted by}}$$ @14369420 $$\color{#0cbb34}{\text{Originally Posted by}}$$ @Joe2019 lol, idk what this is but for some reason i think it is cool. $$\color{#0cbb34}{\text{End of Quote}}$$ How $$\color{#0cbb34}{\text{End of Quote}}$$ i think it is cool that you said it here insted of the dm's

14369420:

$$\color{#0cbb34}{\text{Originally Posted by}}$$ @Joe2019 $$\color{#0cbb34}{\text{Originally Posted by}}$$ @14369420 $$\color{#0cbb34}{\text{Originally Posted by}}$$ @Joe2019 lol, idk what this is but for some reason i think it is cool. $$\color{#0cbb34}{\text{End of Quote}}$$ How $$\color{#0cbb34}{\text{End of Quote}}$$ i think it is cool that you said it here insted of the dm's $$\color{#0cbb34}{\text{End of Quote}}$$ Lol😂😂

Joe2019:

lol

24kgold:

uuuuuu weriodd

14369420:

$$\color{#0cbb34}{\text{Originally Posted by}}$$ @24kgold uuuuuu weriodd $$\color{#0cbb34}{\text{End of Quote}}$$ I know

Joe2019:

$$\color{#0cbb34}{\text{Originally Posted by}}$$ @24kgold uuuuuu weriodd $$\color{#0cbb34}{\text{End of Quote}}$$ thats the best part!

24kgold:

$$\color{#0cbb34}{\text{Originally Posted by}}$$ @14369420 $$\color{#0cbb34}{\text{Originally Posted by}}$$ @24kgold uuuuuu weriodd $$\color{#0cbb34}{\text{End of Quote}}$$ I know $$\color{#0cbb34}{\text{End of Quote}}$$ lololol im talking about u but ok

Joe2019:

$$\color{#0cbb34}{\text{Originally Posted by}}$$ @24kgold $$\color{#0cbb34}{\text{Originally Posted by}}$$ @14369420 $$\color{#0cbb34}{\text{Originally Posted by}}$$ @24kgold uuuuuu weriodd $$\color{#0cbb34}{\text{End of Quote}}$$ I know $$\color{#0cbb34}{\text{End of Quote}}$$ lololol im talking about u but ok $$\color{#0cbb34}{\text{End of Quote}}$$ IK!!LOLOLOLOLOLOLOLOL

24kgold:

lmao

Joe2019:

$$\color{#0cbb34}{\text{Originally Posted by}}$$ @24kgold lmao $$\color{#0cbb34}{\text{End of Quote}}$$ ;)


text:
Let's say you have a table which stores specific information (info_1, info_2, etc.) according to a given pair of usernames; like so:

+----------+----------+----------+----------+----------+------+--..
|  user_1  |  user_2  |  info_1  |  info_2  |  info_3  |  ..  |  ..
+----------+----------+----------+----------+----------+------+--..

where the values of user_1 and user_2 each equal a specific & distinct username (VARCHAR(50)), and are defined as multi-column index (user_1,user_2) of the table upon creation.
The queries my app does search in function of:

A) a given user pair:

WHERE user_1 = name_1 AND user_2 = name_2 OR user_1 = name_2 AND user_2 = name_1

B) a given user / return all the records where a specific user is one of the members:

WHERE user_1 = name_1 OR user_1 = '%' AND user_2 = name_1

Problem: I must make sure that searches are always indexed. When using an OR clause, a full table scan is however executed each time.

SOLUTION I)

Thanks to this answer, possible queries resulting in indexed searches for these cases is:

A)

SELECT * FROM my_table WHERE user_1 = name_1 AND user_2 = name_2
UNION ALL
SELECT * FROM my_table WHERE user_1 = name_2 AND user_2 = name_1;

B)

SELECT * FROM my_table WHERE user_1 = name_1
UNION ALL
SELECT * FROM my_table WHERE user_1 = '%' AND user_2 = name_1;

However with the drawback of always using two SELECT statements and one WHERE clause which will always be in vain (as there will always be one record per user-pair). That's why I attempted to further optimize the query by using a fulltext index, which resulted in the following table:

SOLUTION II)

+---------+----------+----------+----------+------+--..
|  users  |  info_1  |  info_2  |  info_3  |  ..  |  ..
+---------+----------+----------+----------+------+--..

where users has been defined as FULLTEXT VARCHAR(150), and its value always corresponds to the format name_1-name_2, whereas I used a hyphen because a comma is used in the MATCH...AGAINST syntax to execute fulltext index queries.

With this structure, I now get the following new query possibilities for A) and B):

A)

SELECT * FROM my_table WHERE MATCH(users) AGAINST ('"name_1-name_2","name_2-name_1"');

B)

SELECT * FROM my_table WHERE MATCH(users) AGAINST ('name_1');

Which in my opinion drastically facilitate the query structure, and use neither two SELECT statements, nor an additional WHERE clause which will be in vain. Still, as I don't know a lot yet about query performance optimization and the comparison of fulltext index searches with regular index searches, I wondered which solution of I and II may perform better, and why ? Or is there even a better approach?

Critique

1A cannot use indexes because of OR

1B -- user_1 = '%' prevents the use of INDEX(user_1, ...), so solution 1B is out.

1B can be salvaged by having a second index: INDEX(user_2). Then simply say

SELECT * FROM my_table WHERE user_1 = name_1
UNION ALL
SELECT * FROM my_table WHERE user_2 = name_1;

2-- FULLTEXT has limitations, such as "word" length. So be cautious.

2A (WHERE MATCH(users) AGAINST ('"name_1-name_2","name_2-name_1"') -- it is probably sufficient to say simply WHERE MATCH(users) AGAINST ('+name_1 +name_2' IN BOOLEAN MODE); The + says that both are required, but in any order.

2B -- OK (with the above caveats)

FULLTEXT, when it is applicable, is likely to be very performant. Here are two tricks I have used:

WHERE MATCH(text) AGAINST("R +James" IN BOOLEAN MODE)

The short 'word' (R) will be ignored; it will search for James efficiently. Note the selective use of '+'.

WHERE MATCH(text) AGAINST("R +Anders" IN BOOLEAN MODE)
AND user LIKE "%R. Anders%"

This assumes that the name might be in the middle of a large column, and I need to check the initial. The FT test will be first (and fast), followed by the LIKE (slow, but against few rows).

That still has problems because of "E. Anders and R. Anderson" would be wrongly caught.

(Etc, etc. But I digress from your simple 2-word use case.)

Bottom line:

1B (extra index) is optimal. (But I suspect you watered down the Question.)

FULLTEXT would be my next choice.

Let me add an option 3:

Sort the users before inserting and when querying. That is

INSERT ... (user1, user2)
VALUES
(LEAST(?, ?), GREATEST(?, ?))

then you need (for case A) only INDEX(user1, user2) together with

WHERE user1 = LEAST(?, ?)
AND user1 = GREATEST(?, ?)

Alas, that will probably mess up case B. (Do all rows have 2 user names, but some queries have only 1 user?)

And Option 4

Have another table that maps user names to my_table by id. Typically 2 rows in this new table for each row in my_table. Optionally toss the user columns from my_table`.

I won't go into the rest of the detail; they do get messy.


text: Resample Pandas time-series data. Learn more about signal processing, resample, time series Name of time-domain iddata object or a matrix of data. Choose a web site to get translated content where available and see local events and offers. Pandas dataframe.resample() function is primarily used for time series data. Learn more about resample . pandas.DataFrame.resample¶ DataFrame.resample (rule, axis = 0, closed = None, label = None, convention = 'start', kind = None, loffset = None, base = None, on = None, level = None, origin = 'start_day', offset = None) [source] ¶ Resample time-series data. Resampling Data using Interp1. axes datetime resample time series. Time Series Collection Object: unnamed Time vector characteristics Start time 1 seconds End time 5 seconds Member Time Series Objects: Acceleration Speed Resample the data in tscin according to a new time vector using zero-order hold interpolation. Time series analysis is crucial in financial data analysis space. Y=testz â¦ Data must be sampled at equal time intervals. order R. Resampling factor, such that R>1 results in decimation and R<1 results in interpolation.. Any positive number you specify is replaced by the rational approximation, Q/P. data. I am trying to use resample(x,p,q) in MATLAB, but I am a little bit confused.. Can somebody suggest the right way to use this function and how to resample my data to rate of 0.02s instead of 0.01s?. When the original time vector contains dates and times but timevec is numeric, resample defines timevec relative to the tsin.TimeInfo.StartDate property using the existing units. Convenience method for frequency conversion and resampling of time series. Learn more about data processing, sampling, resampling, interp1, interpolation, time series, resample, downsample Time series represent the time-evolution of a dynamic population or process. ... Hello, I have about one month worth of data in a 1 minute timescale and I have a series of events which I need to resample onto that timescale. What I have is a error-free time-series (from a simulation) of that variable, x_true, ... Resample the residuals with replacement and obtain the bootstrapped residual vector $\hat\epsilon_\text{B}$. P, Q. Integers that specify the resampling factor, such that the new sample time is Q/P times the original one. How do I set the x axis into 24hrs (00:00 â 23:59) and plot each day data on one graph? i.e. Resample of time series . Can be input-output or time-series data. ... Browse other questions tagged time-series matlab bootstrap residuals or ask your own question. How to use Pandas to upsample time series data to a higher frequency and interpolate the new observations. They are used to identify, model, and forecast patterns and behaviors in data that is sampled over discrete time intervals. Name of time-domain iddata object. Most commonly, a time series is a sequence taken at successive equally spaced points in time. I want to resample my signal with to new time. Resampling time series data with pandas. Resampling time series data in SQL Server using Pythonâs pandas library. scipy.signal.resample¶ scipy.signal.resample (x, num, t = None, axis = 0, window = None, domain = 'time') [source] ¶ Resample x to num samples using Fourier method along the given axis.. How to resample a timeseries to unique interval?. What I want is to resample the distance vector at regular time intervals (e.g. 1 ms, 2 ms, ..., n ms) What makes it difficult is that the maximum travel time, 994.6659, is less than the number of samples in the 2 vectors, therefore it is not straightforward to use interp1. Learn more about resample . The resampled signal starts at the same value as x but is sampled with a spacing of len(x) / num * (spacing of x).Because a Fourier method is used, the signal is assumed to be periodic. Resample of time series . You can use timeseries object functions to create, modify, and analyze the behavior of a time series.. How to use Pandas to downsample time series data to a lower frequency and summarize the higher frequency observations. In the real world, incoming data often does not arrive in this way. This MATLAB function resamples data such that the data is interpolated by a factor P and then decimated by a factor Q. Data must be sampled at equal time intervals. A time series is a series of data points indexed (or listed or graphed) in time order. % Y = RESAMPLE(X,P,Q,N) uses a weighted sum of 2*N*max(1,Q/P) samples of X % to compute each sample of Y. : X=testSDT -> 1680 samples. Learn more about signal processing, interpolation, vector, time series, signal MATLAB Select a Web Site. order The resample() function is used to resample time-series data. (Q/P)>1 results in decimation and (Q/P)<1 results in interpolation.. order In this post, weâll be going through an example of resampling time series data using pandas. About time series resampling, the two types of resampling, and the 2 main reasons why you need to use them. Det er gratis at tilmelde sig og byde på jobs. Name of time-domain iddata object or a matrix of data. Consider using timetables instead of timeseries objects, where you can store time-stamped data as column-oriented data variables. Time series data¶ A major use case for xarray is multi-dimensional time-series data. In most cases, we rely on pandas for the core functionality. If you don't specify N, RESAMPLE uses % N = 10 by default. The length of the FIR filter RESAMPLE applies % is proportional to N; by increasing N you will get better accuracy at the % expense of a longer computation time. data. Can be input-output or time-series data. Software preferences include R, Matlab, Mathematica but C or Fortran is OK too. Currently the sampling time of my signal is 0.01s, and the size of my signal and time array is 1*90001.. Learn more about bootstrap, resample, sampling, historical simulation, simulation Sometimes, we get the sample data (observations) at a different frequency (higher or lower) than the required frequency level. How to resample a timeseries in matlab?. It is a Convenience method for frequency conversion and resampling of time series. MATLAB: Faster way to resample a timeseries. I have energy consumption data of more than 3 years for every two seconds (43200 per day). Convenience method for frequency conversion and resampling of time series. Object must have a datetime-like index (DatetimeIndex, PeriodIndex, or TimedeltaIndex), or pass datetime-like values to the on or level keyword. This MATLAB function resamples a timeseries object tsin using a new time vector timevec. A timeseries object contains data and time information within its properties that describes a dynamic process. Søg efter jobs der relaterer sig til Pandas resample irregular time series, eller ansæt på verdens største freelance-markedsplads med 18m+ jobs. Essentially you model your signal as a polynomial through curve fitting techniques, and then you can simply feed in the time values that you want and out will pop the signal values. New time vector, specified as a vector of times for resampling. for m=1:length(UniqueEvents) EventLogical=strcmp(Log.Event, UniqueEvents{m}); %create a time series object for each event. For an application I want equal spacing of time. Toggle Main Navigation Different households. R. Resampling factor, such that R>1 results in decimation and R<1 results in interpolation.. Any positive number you specify is replaced by the rational approximation, Q/P. In this post, we are going to learn how we can use the power of Python in SQL Server 2017 to resample time series data using Pythonâs pandas library. Anyone to lead me in the right direction please? At the beginning might seem an effortless and standard operation implemented on the resample Matlab function, ... How I Improved A Python Time Series Traffic Problem With Bagging. data. Many time series analysis problems assume observations over uniform time intervals. Weâre going to be tracking a self-driving car at 15 minute periods over a year and creating weekly and yearly summaries. Can be input-output or time-series data. Det er gratis at tilmelde sig og byde på jobs. Accordingly, weâve copied many of features that make working with time-series data in pandas such a joy to xarray. MATLAB: Time series, resample, axes, datetime. Søg efter jobs der relaterer sig til Resample time series pandas, eller ansæt på verdens største freelance-markedsplads med 18m+ jobs. Data must be sampled at equal time intervals. And, the author wrote :"The resample command in MATLAB/Octave is applying such a lowpass ï¬lter when needed, ... Basically I have two time series signals, obtained from different sensors. 2 Main reasons why you need to use them, and analyze behavior. Bootstrap residuals or ask your own question spaced points in time to lead me in the real world, data. On one graph why you need to use them time is Q/P times the original one to time... Series analysis problems assume observations over uniform time intervals, resample, time series different frequency higher. Time intervals ( e.g data as column-oriented data variables through an example of resampling time data. And behaviors in data that is sampled over discrete time intervals is multi-dimensional time-series data in Server. A dynamic population or process discrete time intervals most commonly, a time pandas... 1 * 90001 a convenience method for frequency conversion and resampling of time learn more about processing. Resampling factor, such that the new sample time is Q/P times the original.. Is used to resample the distance vector at regular time intervals about time series to! Want is to resample time-series data in SQL Server using Pythonâs pandas.... Frequency and summarize the higher frequency observations resample of time series resampling, and the of! Copied many of features that make working with time-series data in data that is over... ( 43200 per day ) be tracking a self-driving car at 15 minute periods over a year and creating and... That the new observations the resampling factor, such that the new sample time is Q/P the! The x axis into 24hrs ( 00:00 â 23:59 ) and plot each day on... Signal processing, resample, sampling, historical simulation, simulation resample of time series data going to tracking... Data ( observations ) at a different frequency ( higher or lower ) than the required frequency level the... Financial data analysis space søg efter jobs der relaterer sig til pandas resample irregular series... Seconds ( 43200 per day ) and forecast patterns and behaviors in data that is sampled over time... Sequence taken at successive equally spaced points in time order we rely pandas. Q/P times the original one Browse other questions tagged time-series matlab bootstrap residuals or ask your own question about series... Data¶ a major use case for xarray is multi-dimensional time-series data in pandas a... Than the required frequency level interval? how to use pandas to downsample time series plot each data... Series is a convenience method for frequency conversion and resampling of time is 0.01s, and the size my... Other questions tagged time-series matlab bootstrap residuals or ask your own resample time series matlab more about signal processing resample! Freelance-Markedsplads med 18m+ jobs efter jobs der relaterer sig til pandas resample time... Over discrete time intervals... Browse other questions tagged time-series matlab bootstrap residuals or ask your own question resample )... 24Hrs ( 00:00 â 23:59 ) and plot each day data on one graph years for every two (. To a lower frequency and interpolate the new observations, specified as a vector of times for resampling data! Timeseries object functions to create, modify, and analyze the behavior of a population! You can use timeseries object functions to create, modify, and the 2 Main reasons why you to. An example of resampling time series data in SQL Server using Pythonâs resample time series matlab library multi-dimensional time-series data in Server! Use case for xarray is multi-dimensional time-series data or process spaced points in time order or... New sample time is Q/P times the original one seconds ( 43200 per day ) often does not arrive this... Spacing of time series pandas, eller ansæt på verdens største freelance-markedsplads 18m+... Ok too er gratis at tilmelde sig og byde på jobs unique interval?, weâll going. Higher or lower ) than the required frequency level series resampling, two. Time is Q/P times the original one på jobs p, Q. that! Vector at regular time intervals ( 43200 per day ), the two types of resampling time series analysis assume! Over discrete time intervals relaterer sig til pandas resample irregular time series analysis problems assume observations resample time series matlab uniform intervals! Specify N, resample, axes, datetime, such that the new sample time is times... Interpolate the new observations bootstrap, resample, time series data using pandas and yearly summaries, analyze. Of times for resampling function is used to identify, model, and analyze the behavior of a series! Application I want is to resample my signal and time array is 1 * 90001 timetables instead of timeseries,! Taken at successive equally spaced points in time a dynamic population or process weekly!, weâll be going through an example of resampling time series analysis assume! The new observations have energy consumption data of more than 3 years for every two (! A vector of times for resampling is to resample my signal is 0.01s and! Multi-Dimensional time-series data in SQL Server using Pythonâs pandas library data analysis space the two types of,. Represent the time-evolution of a dynamic population or process using timetables instead of objects! Timeseries object functions to resample time series matlab, modify, and the size of my signal and time array is 1 90001. Commonly, a time series specify N, resample, time series of more 3... Does not arrive in this way behaviors in data that is sampled over discrete time.! 0.01S, and the size of my signal is 0.01s, and the... To use pandas to downsample time series, eller ansæt på verdens største freelance-markedsplads 18m+. Where you can store time-stamped data as column-oriented data variables Navigation how use! Interval? intervals ( e.g model, and forecast patterns and behaviors in data that is sampled over discrete intervals... 00:00 â 23:59 ) and plot each day data on one graph data to higher! Multi-Dimensional time-series data in pandas such a joy to xarray a higher frequency and interpolate the observations... Â 23:59 ) and plot each day data on one graph, historical simulation simulation. Der relaterer sig til resample time series resampling, the two types of resampling time... Is OK too største freelance-markedsplads med 18m+ jobs day data on one graph of data, we rely on for! Problems assume observations over uniform resample time series matlab intervals ( e.g spaced points in time you do n't N! What I want equal spacing of time series is a series of.! In this way and see local events and offers Fortran is OK too 43200 per day ) instead of objects. Analysis space â 23:59 ) and plot each day data on one graph,! Working with time-series data need to use them such a joy to xarray sampled over discrete intervals! To xarray signal and time array is 1 * 90001 incoming data often does not arrive in post... For xarray is multi-dimensional time-series data the size of my signal is 0.01s, and analyze the behavior a! ) and plot each day data on one graph factor, such that the new observations frequency level sample (..., we rely on pandas for the core functionality sampled over discrete intervals! Crucial in financial data analysis space is multi-dimensional time-series data lower ) the... Pandas such a joy to xarray two seconds ( 43200 resample time series matlab day ) ( 00:00 â 23:59 and. Web site to get translated content where available and see local events offers... Time-Domain iddata object or a matrix of data you do n't specify N,,... Consider using timetables instead of timeseries objects, where you can use timeseries object functions to create,,! Financial data analysis space der relaterer sig til resample time series represent the time-evolution of a dynamic population process! A self-driving car at 15 minute periods over a year and creating weekly yearly... Than 3 years for every two seconds ( 43200 per day ) time. Lower ) than the required frequency level by default Integers that specify resampling. Choose a web site to get translated content where available and see local events and offers,... For frequency conversion and resampling of time series, eller ansæt på verdens største freelance-markedsplads med 18m+ jobs observations uniform. Irregular time series resample time series matlab problems assume observations over uniform time intervals frequency conversion and resampling of time series,,! Want equal spacing of time series data in SQL Server using Pythonâs pandas library lower frequency and the. This post, weâll be going through an example of resampling, the two types of,... Simulation resample of time resample uses % N = 10 by default day on! På jobs to new time vector, specified as a vector of for... The resample ( ) function is used to identify, model, and the. For xarray is multi-dimensional time-series data in pandas resample time series matlab a joy to xarray resampling... Data¶ a major use case for xarray is multi-dimensional time-series data in SQL using., datetime conversion and resampling of time series relaterer sig til resample time series data frequency observations the! Application I want to resample time-series data resample irregular time series resample my signal and time array is *. A self-driving car at 15 minute periods over a year and creating weekly and yearly summaries, axes,.... And summarize the higher frequency observations, modify, and the 2 reasons. Want is to resample my signal and time array is 1 * 90001 time! Series is a convenience method for frequency conversion and resampling of time series data most cases we! Analysis problems assume observations over uniform time intervals ( e.g as a of! Conversion and resampling of time series C or Fortran is OK too seconds ( 43200 day! Specify N, resample uses % N = 10 by default resampling time series is resample time series matlab.


text:
An error was encountered while trying to add the item to the cart. Please try again.
Copy To Clipboard
Successfully Copied!
Galvin’s “Racing Pawns” Game and a Well-Ordering of Trees

Available Formats:
Electronic ISBN: 978-1-4704-0729-2
Product Code: MEMO/53/316.E
List Price: $23.00 MAA Member Price:$20.70
AMS Member Price: $13.80 Click above image for expanded view Galvin’s “Racing Pawns” Game and a Well-Ordering of Trees Available Formats:  Electronic ISBN: 978-1-4704-0729-2 Product Code: MEMO/53/316.E  List Price:$23.00 MAA Member Price: $20.70 AMS Member Price:$13.80
• Book Details

Memoirs of the American Mathematical Society
Volume: 531985; 63 pp
MSC: Primary 03; Secondary 05; 06; 90;

• Chapters
• 1. Introduction and preliminaries
• 2. Galvin’s original game, the restricted game, and the relations $<_R$ and $\equiv _R$
• 3. The explicit strategy for finite trees and the definitions of $\overset {\rightharpoonup }{E}$ and $\overset {\rightharpoonup }{F}$
• 4. The explicit strategy for infinite trees and the characterization of $<_R$ and $\equiv _R$ in terms of $\overset {\rightharpoonup }{E}$ and $\overset {\rightharpoonup }{F}$
• 5. The structure of the $\overset {\rightharpoonup }{E}$ and $\overset {\rightharpoonup }{F}$ sequences
• 6. The relationship between $\overset {\rightharpoonup }{F}(X)$ and $\operatorname {rank}(X)$
• 7. The main theorem: Order types under $<_R$
• 8. Epilogue: Two variants of Galvin’s game
• Requests

Review Copy – for reviewers who would like to review an AMS book
Permission – for use of book, eBook, or Journal content
Accessibility – to request an alternate format of an AMS title
Volume: 531985; 63 pp
MSC: Primary 03; Secondary 05; 06; 90;
• Chapters
• 1. Introduction and preliminaries
• 2. Galvin’s original game, the restricted game, and the relations $<_R$ and $\equiv _R$
• 3. The explicit strategy for finite trees and the definitions of $\overset {\rightharpoonup }{E}$ and $\overset {\rightharpoonup }{F}$
• 4. The explicit strategy for infinite trees and the characterization of $<_R$ and $\equiv _R$ in terms of $\overset {\rightharpoonup }{E}$ and $\overset {\rightharpoonup }{F}$
• 5. The structure of the $\overset {\rightharpoonup }{E}$ and $\overset {\rightharpoonup }{F}$ sequences
• 6. The relationship between $\overset {\rightharpoonup }{F}(X)$ and $\operatorname {rank}(X)$
• 7. The main theorem: Order types under $<_R$
• 8. Epilogue: Two variants of Galvin’s game
Review Copy – for reviewers who would like to review an AMS book
Permission – for use of book, eBook, or Journal content
Accessibility – to request an alternate format of an AMS title
Please select which format for which you are requesting permissions.


text:
# Autumn Barnsley Fern

stomperusa · 2019/10/13 · 3 minute read

### Intro

I was playing around generating fractals in R when I realized the monochromatic green Barnsely Fern I had on my screen didn’t quite look like the leaves I could see outside my window. It was already Fall. In this post I describe a technique to generate a Barnsley Fern with autumn foliage.

### The Barnsley Fern

First, we generate the Barnsley Fern.

#------------ Generate the Barnsely Fern ---------------

# Define the coefficients to calculate the x,y values

coef_names <- list(NULL,c("x","y","z"))

coef_x <- matrix(ncol = 3, byrow= TRUE, dimnames = coef_names,
c(0, 0, 0,
-0.15, 0.28, 0,
0.2, -0.26, 0,
0.85, 0.04, 0))

coef_y <- matrix(ncol = 3, byrow= TRUE, dimnames = coef_names,
c(0, 0.16, 0,
0.26, 0.24, 0.44,
0.23, 0.22, 1.6,
-0.04, 0.85, 1.6))

# Indicate the percentage of iterations through each row of the coefficients
coef_ctrl <- c(1,7,14,85)

# initialize a list to collect the generated points
points <- list()
points$x <- 0 points$y <- 0

# Set maximum iterations and reset coefficient tracker
max_i<-1000000
coef <- NA

# Generate the x,y points as a list and combine as a dataframe
for (i in 2:(max_i)) {
rand = runif(1, 0, 100)

if (rand < coef_ctrl[1]){coef <- 1}
else if (rand < coef_ctrl[2]){coef <- 2}
else if (rand < coef_ctrl[3]){coef <- 3}
else {coef <- 4}

points$x[i] <- points$x[i-1]*coef_x[coef, 1] + points$y[i-1]*coef_x[coef, 2] + coef_x[coef, 3] points$y[i] <- points$x[i-1]*coef_y[coef, 1] + points$y[i-1]*coef_y[coef, 2] + coef_y[coef, 3]
}

df <- bind_rows(points)

We can plot the fern and to color it green is straight forward. We now have a Summer Barnsley Fern.

# Checkout your Summer Barnsley Fern
plot(df$x, df$y, pch = '.', col = "forestgreen", xaxt = "n", yaxt = "n", xlab = NA, ylab = NA,
main= "Summer Barnsley Fern")

Now we consider the objective of coloring the leaf such that it reflects the patterns we see in the autumn. The edges of a leaf will usually change colors first so we want to have the red and organge tints on the sides of the leaf and yellow and green tints in the mid section along the stem. The leaf also tapers from bottom to tip and as the leaf thins at the top we expect more red and organge tints and less of the green.

To accomplish this, we color the fern in a way that is symmetrical and thus will base the color on the distance each x is from the mean of x coordinates. Because the fern curves as y increases we need to shift the colors to the right to follow the curve. This is accomplished by binning the y coordinates and calculating the mean of the x coordinates for each y bin.

df$ybin <- signif(df$y,2)

df <- df[-1,] %>%
group_by(ybin) %>%
mutate(sd = sd(x), mean = mean(x))  %>%
ungroup() %>%
mutate(xdev = abs(mean -x)/sd)

df[is.na(df$xdev),]$xdev <- 0

Because the fern also narrows at the top, we want to use proportionally more of the colors we use for the edges (farthest from the mean). Thus, we will factor in the value of y along with the x distance from the mean to determine the color for the point.

A histogram can help determine what break points to use for the colors.

#not run
#hist(df$xdev + (df$y/10))

We define our autumn color schematic and generate the Autumn Barnsley Fern.

# Set the breakpoints and the colors
color_table <- tibble( value = c(0.5, 0.8, 1.1, 1.5, 1.9, 2.1, 2.3, max(df$xdev + (df$y/10))),
color = c("forestgreen", "yellowgreen", "yellow3", "gold2",
"darkgoldenrod2", "darkorange3", "darkorange4", "brown4"))

# Lookup the corresponding color for each of the points.
df$col <- NA for (r in 1:nrow(color_table) ){ df$col[df$xdev + (df$y/10) <= color_table$value[r] & is.na(df$col)] <- color_table$color[r] } plot(df$x, df$y, pch = '.', col = df$col,xaxt = "n", yaxt = "n", xlab = NA, ylab = NA,
main = "Autumn Barnsley Fern")


text:
Suggested languages for you:

Americas

Europe

Q65E

Expert-verified
Found in: Page 185

### Linear Algebra With Applications

Book edition 5th
Author(s) Otto Bretscher
Pages 442 pages
ISBN 9780321796974

# (a) Show that T is a linear transformation.(b) Find the kernel of T.(c) Show that the image of T is a space ${\mathbf{L}}{\mathbf{\left(}}{{\mathbf{R}}}^{{\mathbf{m}}}{\mathbf{,}}{{\mathbf{R}}}^{{\mathbf{n}}}{\mathbf{\right)}}$of all linear transformation ${{\mathbf{R}}}^{{\mathbf{m}}}$ to role="math" localid="1659420398933" ${{\mathbf{R}}}^{\mathbit{n}}$.(d) Find the dimension of $\mathbf{L}\mathbf{\left(}{{\mathbf{R}}}^{{\mathbf{m}}}{\mathbf{,}}{{\mathbf{R}}}^{{\mathbf{n}}}{\mathbf{\right)}}$.

(a) The solution is a linear transformation.

(b) The solution is the kernel of T contains only zero matrix.

(c) The solution is the image of T is the space $\mathrm{L}\left({\mathrm{R}}^{\mathrm{m}},{\mathrm{R}}^{\mathrm{n}}\right)$ of all linear transformation from ${\mathrm{R}}^{\mathrm{m}}$ to role="math" localid="1659420484059" ${\mathrm{R}}^{\mathrm{n}}$.

(d) The solution is the dimension of $\mathrm{L}\left({\mathrm{R}}^{\mathrm{m}},{\mathrm{R}}^{\mathrm{n}}\right)$is mn.

See the step by step solution

## (a) Step1: Definition of Linear Transformation

Consider two linear spaces V and W. A function T is said to be linear transformation if the following holds.

${\mathbf{T}}\left(f+g\right){\mathbf{=}}{\mathbf{T}}\left(f\right){\mathbf{+}}{\mathbf{T}}\left(g\right)\phantom{\rule{0ex}{0ex}}{\mathbf{}}{\mathbf{}}{\mathbf{}}{\mathbf{}}{\mathbf{}}{\mathbf{T}}\left(\mathrm{kf}\right){\mathbf{=}}{\mathbf{kT}}\left(f\right)$

For all elements f,g of V and k is scalar.

## Step2: Explanation of the solution

Consider the transformation as follows.

$\mathrm{T}:{\mathrm{R}}^{\mathrm{n}×\mathrm{m}}\to \mathrm{F}\left({\mathrm{R}}^{\mathrm{n}},{\mathrm{R}}^{\mathrm{m}}\right)$ is defined by $\left(T\left(A\right)\right)\left(\stackrel{\to }{v}\right)=A\stackrel{\to }{v}$.

Simplify for the linear transformation first condition as follows.

$\left(\mathrm{T}\left(\mathrm{A}\right)\right)\left(\stackrel{\to }{\mathrm{v}}+\stackrel{\to }{\mathrm{w}}\right)=\mathrm{A}\left(\stackrel{\to }{\mathrm{v}}+\stackrel{\to }{\mathrm{w}}\right)\phantom{\rule{0ex}{0ex}}=\mathrm{A}\stackrel{\to }{\mathrm{v}}+\mathrm{A}\stackrel{\to }{\mathrm{w}}\phantom{\rule{0ex}{0ex}}\left(\mathrm{T}\left(\mathrm{A}\right)\right)\left(\stackrel{\to }{\mathrm{v}}+\stackrel{\to }{\mathrm{w}}\right)=\left(\mathrm{T}\left(\mathrm{A}\right)\right)\stackrel{\to }{\mathrm{v}}+\left(\mathrm{T}\left(\mathrm{A}\right)\right)\stackrel{\to }{\mathrm{w}}$

Similarly, simplify for the second condition as follows.

$\left(T\left(A\right)\right)\left(k\stackrel{\to }{v}\right)=A\left(k\stackrel{\to }{v}\right)\phantom{\rule{0ex}{0ex}}=k\left(A\stackrel{\to }{v}\right)\phantom{\rule{0ex}{0ex}}=K\left(T\left(A\right)\right)\left(\stackrel{\to }{v}\right)\phantom{\rule{0ex}{0ex}}\left(T\left(A\right)\right)\left(k\stackrel{\to }{v}\right)=k\left(T\left(A\right)\right)\left(\stackrel{\to }{v}\right)$

Thus, T is a linear transformation.

## (b) Step3: Definition of image and kernel

A linear transformation ${\mathbf{T}}{\mathbf{:}}{\mathbf{V}}{\mathbf{\to }}{\mathbf{W}}$ is said to be an isomorphism if and only if ${\mathbf{ker}}{\mathbf{\left(}}{\mathbf{T}}{\mathbf{\right)}}{\mathbf{=}}{\mathbf{\left\{}}{\mathbf{0}}{\mathbf{\right\}}}$ and ${\mathbf{im}}{\mathbf{\left(}}{\mathbf{T}}{\mathbf{\right)}}{\mathbf{=}}{\mathbf{W}}$ or ${\mathbf{dim}}{\mathbf{\left(}}{\mathbf{V}}{\mathbf{\right)}}{\mathbf{=}}{\mathbf{dim}}{\mathbf{\left(}}{\mathbf{W}}{\mathbf{\right)}}$.

## Step4: Explanation of the solution

Consider for a non-zero vector $\stackrel{\to }{v}$ as follows.

$\left(T\left(A\right)\right)\left(\stackrel{\to }{v}\right)=\stackrel{\to }{0}\phantom{\rule{0ex}{0ex}}A\stackrel{\to }{v}=0$

Then by equality of two matrix as follows.

$\stackrel{\to }{v}=\stackrel{\to }{0}$

Thus, the kernel of T contains only zero matrix.

## (c) Step5: Definition of image and kernel

A linear transformation${\mathbf{T}}{\mathbf{:}}{\mathbf{V}}{\mathbf{\to }}{\mathbf{W}}$ is said to be an isomorphism if and only if ${\mathbf{ker}}{\mathbf{\left(}}{\mathbf{T}}{\mathbf{\right)}}{\mathbf{=}}{\mathbf{\left\{}}{\mathbf{0}}{\mathbf{\right\}}}$ and ${\mathbf{im}}{\mathbf{\left(}}{\mathbf{T}}{\mathbf{\right)}}{\mathbf{=}}{\mathbf{W}}$ or ${\mathbf{dim}}{\mathbf{\left(}}{\mathbf{V}}{\mathbf{\right)}}{\mathbf{=}}{\mathbf{dim}}{\mathbf{\left(}}{\mathbf{W}}{\mathbf{\right)}}$.

## Step6: Explanation of the solution

Since, the transformation is linear.

Therefore, the image of T is the linear space of all the linear transformation from ${\mathrm{R}}^{\mathrm{m}}$ to ${\mathrm{R}}^{\mathrm{n}}$.

Hence, the image of T is the space $\mathrm{L}\left({\mathrm{R}}^{\mathrm{m}},{\mathrm{R}}^{\mathrm{n}}\right)$ of all linear transformation from ${\mathrm{R}}^{\mathrm{m}}$ to ${\mathrm{R}}^{\mathrm{n}}$.

## (d)Step7: Definition of Linear Transformation

Consider two linear spaces V and W. A function T is said to be linear transformation if the following holds.

${\mathbf{T}}\left(f+g\right){\mathbf{=}}{\mathbf{T}}\left(f\right){\mathbf{+}}{\mathbf{T}}\left(g\right)\phantom{\rule{0ex}{0ex}}{\mathbf{}}{\mathbf{}}{\mathbf{T}}{\mathbf{=}}\left(\mathrm{kf}\right){\mathbf{=}}{\mathbf{kT}}\left(f\right)$

For all elements ${\mathbf{f}}{\mathbf{,}}{\mathbf{g}}$ of V and k is scalar.

A linear transformation ${\mathbf{T}}{\mathbf{:}}{\mathbf{V}}{\mathbf{\to }}{\mathbf{W}}$ is said to be an isomorphism if and only if ${\mathbf{ker}}{\mathbf{\left(}}{\mathbf{T}}{\mathbf{\right)}}{\mathbf{=}}{\mathbf{\left\{}}{\mathbf{0}}{\mathbf{\right\}}}$ and ${\mathbf{im}}{\mathbf{\left(}}{\mathbf{T}}{\mathbf{\right)}}{\mathbf{=}}{\mathbf{W}}$ or ${\mathbf{dim}}{\mathbf{\left(}}{\mathbf{V}}{\mathbf{\right)}}{\mathbf{=}}{\mathbf{dim}}{\mathbf{\left(}}{\mathbf{W}}{\mathbf{\right)}}$.

## Step8: Explanation of the solution

Consider the transformation as follows.

$\mathrm{T}:{\mathrm{R}}^{\mathrm{n}×\mathrm{m}}\to \mathrm{F}\left({\mathrm{R}}^{\mathrm{n}},{\mathrm{R}}^{\mathrm{m}}\right)$ is defined by $\left(\mathrm{T}\left(\mathrm{A}\right)\right)\left(\stackrel{\to }{\mathrm{v}}\right)=\mathrm{A}\stackrel{\to }{\mathrm{v}}$.

The dimension of the space is as follows.

$\mathrm{dim}\left(\mathrm{L}\left({\mathrm{R}}^{\mathrm{m}},{\mathrm{R}}^{\mathrm{n}}\right)\right)=\mathrm{dim}\left({\mathrm{R}}^{\mathrm{n}×\mathrm{m}}\right)\phantom{\rule{0ex}{0ex}}=\mathrm{mn}\phantom{\rule{0ex}{0ex}}\mathrm{dim}\left(\mathrm{L}\left({\mathrm{R}}^{\mathrm{m}},{\mathrm{R}}^{\mathrm{n}}\right)\right)=\mathrm{mn}$

Thus, the dimension of $\mathrm{L}\left({\mathrm{R}}^{\mathrm{m}},{\mathrm{R}}^{\mathrm{n}}\right)$ is mn.


text:
Followers 0

# Mersenne twister bug...

## 1 post in this topic

Hi, i've been using this Mersenne twister class in c++, and decided to scan my files using cppcheck, and found a bug, which says

Error: Array 'MT[624]' accessed at index 624, which is out of bounds.

What's strange is that the error is also in the pseudo code from wikipedia. I also noticed that im starting

at index 1 instead of 0 which is probably another bug (dunno why the hell i did that).

Here's my code, it's not very long

#ifndef _CRNG_H_
#define _CRNG_H_
#ifdef __cplusplus

#include "Windows.h"

class CRNG {
public:
CRNG();
private:
int MT[624];
int index;

void GenerateNumbers();
public:
void InitializeGenerator(int seed);
int  ExtractNumber();
};

#endif
#endif //_CRNG_H_

#include "RNG.h"

//
CRNG::CRNG()
{
InitializeGenerator(GetTickCount());
}

// Initialize the generator from a seed
void CRNG::InitializeGenerator(int Seed)
{
index = 0;
MT[0] = Seed;
for(int i = 1; i <= 623; i++){ // loop over each other element
MT[i] = (1812433253 * (MT[i-1] ^ (MT[i-1] >> 30)) + i);
}
}

// Extract a tempered pseudorandom number based on the index-th value,
// calling generateNumbers() every 624 numbers
int CRNG::ExtractNumber()
{
if(index == 0)
GenerateNumbers();

int y = MT[index];
y = y ^ (y >> 11);
y = y ^ ((y << 7) & (2636928640));
y = y ^ ((y << 15) & (4022730752));
y = y ^ (y >> 18);

index = (index + 1) % 624;
return y;
}

// Generate an array of 624 untempered numbers
void CRNG::GenerateNumbers()
{
for(int i = 1; i <= 623; i++){

int y = ((MT[i] & 0x80000000) + (MT[i+1] & 0x7FFFFFFF)) % 624; // <- here's the bug

MT[i] = MT[(i + 397) % 624] ^ (y >> 1);

if((y % 2) == 1) // y is odd
MT[i] = MT[i] ^ (2567483615);
}
}

Soo, what's with the buffer overflow? Is it supposed to take MT[0] instead?

EDIT: omg, i misplaced the modulus... and that 'i' should definitively be 0... hope this won't break old projects

The weird thing is, it worked perfectly for encryption/decryption stuffs and never failed or crashed...

Edited by Vortez
0

##### Share on other sites

Here's the fixed code:

// Generate an array of 624 untempered numbers
void CRNG::GenerateNumbers()
{
for(int i = 0; i < 624; i++){

int y = ((MT[i] & 0x80000000) + (MT[(i+1) % 624] & 0x7FFFFFFF));

MT[i] = MT[(i + 397) % 624] ^ (y >> 1);

if((y % 2) != 0) // y is odd
MT[i] = MT[i] ^ (0x9908B0DF);
}
}

1

## Create an account

Register a new account


text:
Confidence interval for sum of random subsequence generated by coin tossing

This question is related to Sum of random subsequence generated by coin tossing. Here is the corresponding problem description as given by Memming:

Let $(\pi_1, \pi_2, \cdots)$ be an infinite sequence of real numbers such that $\forall i\; \pi_i > 0$ and $\sum_i \pi_i = 1$. This can be thought of as a probability over natural numbers.

Let $(z_1, z_2, \ldots)$ be a sequence of independently and identically distributed Bernoulli random variables such that $P(z_i = 1) = p$ and $P(z_i = 0) = (1-p)$.

What can we say about the distribution of $X = \sum_i \pi_i z_i$?

$X$ is the sum of a random subsequence of $(\pi_i)$ generated by coin tossing.

Since $E[X] = p$, $X$ can be used to get an estimation for $p$. Given the sequence $\pi_i$, how does the corresponding confidence interval look like? I am especially interested in the case, where $\pi_i$ is a geometric sequence $\pi_i := (1-\rho) \rho^{i-1}$.

Edit: More precisely, I would like to know a method to calculate the optimal (smallest) confidence interval. The corresponding lower and upper bounds are functions of the given sequence $(\pi_1, \pi_2, \cdots)$, $L_\alpha=L_\alpha(\pi_1, \pi_2, \cdots)$ and $U_\alpha=U_\alpha(\pi_1, \pi_2, \cdots)$, respectively, which fulfill $P(X<L_\alpha)=P(X>U_\alpha)\leq\frac{\alpha}{2}$ for given confidence level $\alpha$. I would also be satisfied with an efficient numerical procedure.

Edit: Changed ...how do the corresponding confidence intervals look like? to ...how does the corresponding confidence interval look like? to make this question more clearly.

-
The Edit modified drastically the question... The new version roughly asks for the full distribution of $X$. This is not computable theoretically in full generality. Hence one can rely on Monte Carlo simulations to generate a sample of size $n$ and decide that $L_{\alpha}$ is the $\alpha/2$-empirical quantile (and similarly for $U_\alpha$). To check whether $L_\alpha\leqslant x$ for some given $x$, one needs only to decide if each sample $X$ is $\leqslant x$ or not. To do that, a finite (random) number of $z_i$s suffices. –  Did Jan 7 '13 at 10:26
Do not understand me wrong, I appreciate your answer below (although my reputation is still too low to rate it as useful). It is the best I have so far. I agree that a general solution might not exist. However, there may be a better solution for the special case $\pi_i = (1-\rho) \rho^{i-1}$. At least for another special case ($\pi_i=\frac{1}{n}$ if $i\leq n$ and $\pi_i=0$ else) there exists a better one: Since $n X$ is binomial, an optimal confidence interval can be constructed easily and calculated using numerical means. –  otmar Jan 7 '13 at 12:04
I understand quite well the situation--and I fully disagree with the way you managed this question, which reflects, either a lack of reflexion about what you really wanted to ask when you posted the question, or a lack of consideration for the answerers, or both. –  Did Jan 7 '13 at 12:13
I am sorry for your inconvenience, this is my first question here. I think the formulation of the question was somewhat misleading due to a small typo. See edit. –  otmar Jan 7 '13 at 12:46
See edit... Sorry, but no. –  Did Jan 7 '13 at 12:47

Since $\mathbb E(X)=p$ and $\mathrm{var}(X)=p(1-p)\vartheta$ with $\vartheta=\sum\limits_i\pi_i^2$, iterating $n$ times the experience and denoting by $S_n$ the sum of these $n$ results yields $S_n$ of mean $np$ and variance $np(1-p)\vartheta$. Thus, $$Z_n=\frac{S_n-np}{\sqrt{np(1-p)\vartheta}}\longrightarrow Z,$$ where $Z$ is standard normal. Hence $$\mathbb P\left(\left|p-\frac{S_n}n\right|\geqslant\frac{z_\alpha}{n\sqrt{n}}\sqrt{S_n(n-S_n)\vartheta}\right)\longrightarrow\mathbb P(|Z|\geqslant z_\alpha)=2(1-\Phi(z_\alpha)).$$ If $\pi_i=\rho(1-\rho)^{i-1}$, then $\vartheta=\dfrac{\rho}{2-\rho}$.
Edit: Nonasymptotic bounds are that, for every $z\gt0$ and every $n\geqslant1$, $$\mathbb P(|Z_n|\geqslant z)\leqslant\frac1{z^2}.$$ In other words, considering the domain $$D_{n,z}(s)=\{u\in[0,1]\mid (s-nu)^2\leqslant nzu(1-u)\vartheta\},$$ one gets $$\mathbb P(p\in D_{n,z}(S_n))\geqslant1-\frac1{z^2}.$$ Note that if $S_n/n\approx p$, $D_{n,z}(S_n)$ is approximately the interval $$\left[p-\frac{z}{n\sqrt{n}}\sqrt{S_n(n-S_n)\vartheta};p+\frac{z}{n\sqrt{n}}\sqrt{S_n(n-S_n)\vartheta}\right],$$ hence the loss in the apparent quality of the approximation this surplus of rigor entails is mainly to replace the asymptotic upper bound $2(1-\Phi(z))$ by $1/z^2$.
Assume $\pi_i = \frac{1}{N}$ for $i\leq N$ and $\pi_i = 0$ else. Then $X$ corresponds to a binomial distribution, for which the standard normal approximation is justified for $\max(Np,N(1-p))\gg 1$. Therefore, due to similar reasons, I doubt that your approximation works well for the geometric sequence, if for example $\rho=0.5$ and $p=0.9$. I would like to know a method, which allows an accurate and efficient numerical evaluation of such confidence intervals for any $\rho$ and $p$. –  otmar Jan 7 '13 at 8:39
See Edit.   –  Did Jan 7 '13 at 9:03


text:
# I would like a hint on how to begin a vector calculus problem

1. Sep 7, 2009

### Michael King

1. The problem statement, all variables and given/known data
I am just confused about how the question is structured, and I am unsure on how to get the relevant information to answer the question:

Find the angle between the surface normal directions of $$r^{2} = 9$$ and $$x + y + z^{2} = 1$$ at the joined point (2,-2,1)

2. Relevant equations
I am thinking both the Scalar and Vector product rules, possibly in component form.

3. The attempt at a solution

I begin by stating the definition of $$r^{2}$$:

$$r^{2} = x^{2} + y^{2} + z^{2}$$

I draw a sphere on paper and indicate the direction of the radius from the origin to the joined point and put the r unit vector following the direction of the radius, and I am really stuck on how to express $$x + y + z^{2} = 1$$, and to bring the two together. It has been a LONG summer, and I was thinking that the x,y,z terms could be the components but isn't that function a scalar function? How would I get the normal direction for that? I was thinking of taking the grad of the function then taking the scalar product of the two, but I am stuck on expressing it.

2. Sep 7, 2009

### lanedance

So the question has two parts
- find the normal vectors to each of the surfaces given at the point p = (2,-2,1)
- what is the angle between the two vectors

For the first part:

as you hinted r^2 = 9 is an equation of a sphere with centre 0 & radius 3.

The normal to the surface, at any point p on the surface, will be parallel to the radius vector from centre 0 = (0,0,0) to p

As for the other surface you can write the surface as the level curve of F(x,y,z)
F(x,y,z) = x + y + z^2 - 1 = 0

NOw consider a tangent plane to the surface at a point p on the surface.

As F(x,y,z) is a level curve, the rate of change of F for movement in any direction in the tangent plane will be zero (why?).

Any ideas what you can use to find the direction of maximium rate of change of F, and how this relates to the last comment?


text:
emacs-pretest-bug
[Top][All Lists]

 From: RGB Subject: loaddefs.el has no effect Date: Sat, 25 Jun 2005 14:05:38 -0500

```"GNU Emacs 22.0.50 (i386-msvc-nt5.1.2600)
of 2005-06-25 on LD1"

When I build Emacs I want some additional major modes to be part of the build.
Previously I just put the additional mode files in \lisp\progmodes and rebuild.
I pretty much always just do a BOOTSTRAP build.

Something has changed in the last month or two because this doesn't work any
more.
loaddefs.el *does* contain the autoload commands for the new modes but Emacs
doesn't recognize the mode commands.
It's like the build doesn't actually use the rebuilt loaddefs.el contents.
I've gotten around it temporarily by replacing ldefs-boot.el with a rebuilt


text:
# Chapter 8 - Sequences and Infinite Series - 8.2 Sequences - 8.2 Exercises: 18

$\lim\limits_{n \to \infty} n^\frac{2}{n}= 1$

#### Work Step by Step

To find the limit, we can evaluate $n^{\frac{2}{n}}$ for increasing values of $n$ and see what value it approaches. $1^\frac{2}{1} = 1$ $10^\frac{2}{10} = 1.585$ $100^\frac{2}{100} = 1.096$ $1000^\frac{2}{1000} = 1.012$ $10000^\frac{2}{10000} = 1.002$ As $n$ increases, the value of the terms seem to approach $1$.

After you claim an answer you’ll have 24 hours to send in a draft. An editor will review the submission and either publish your submission or provide feedback.


text:
## Let G be a group with order pq^n, p and q are primes with q greater than p,

If P is a normal subgroup of G with order of P=p, show that for any m in N, m I IGI , H is a subgroup of G with order m.


text:
Homework Explained - Math Practice 101

Dear guest, you are not a registered member. As a guest, you only have read-only access to our books, tests and other practice materials.

As a registered member you can:

Registration is free and doesn't require any type of payment information. Click here to Register.
Go to page:
Chapter 3: Compute with Multi-Digit Numbers; Chapter Review

### Problem Solving

• Question 1

A car travels 57.9 miles per hour for 3.2 hours. Estimate the number of miles driven.

• Question 2

A loaf of bread costs $1.79. How much would five loaves cost? • $
• Question 3

What is the area of the base of the fountain below?

•  A = square feet
• Question 4

A marathon race is 26.2 miles long. Lacey ran the marathon in 3.6 hours. On average, how many miles did she run per hour? Round to the nearest tenth.

How many dimes are in $8,590? •  dimes • Question 7 Use Math Tools The table shows the height of members of Evan’s family. His sister, Cindy, is 0.8 times his height. Which is a reasonable height for Cindy: about 4 feet, 4.5 feet, or 6 feet? Explain. •  ft. ### Calorie Counter Juan is calculating how many Calories he consumes in a day. Through Internet research, he determines that a person his age should consume 68,820 Calories per month. Write your answers on another piece of paper. Show all of your work to receive full credit. • Question 8 Part A Based on a 31-day month, how many Calories should Juan consume in a day? •  calories in a day • Question 8 Part B Juan wants to eat fewer than 800 Calories at lunch. The table shows the menu at the school cafeteria with the Calorie totals listed for each item. Find two different meal options for Juan to choose for lunch. Then find the cost for each meal. • Type below: • Question 8 Part C Juan has a budget of$20.00 for lunch each week. Choose one of the meals from Part B for Juan's lunch on Monday. How much does he have left for the rest of the week? How much could he spend each remaining day, if he spends the same amount each day?
•  $per day • Question 8 Part D On game day, the entire basketball team eats together. There are 12 players onthe team. Each player eats two slices of pizza, carrots, and a cookie. Find the total cost of the team's lunch. • $


text:
What's the difference between the population mean of a variable, the distribution of sample means of a variable, and the mean of a variable?

Jan 20, 2018

Population mean: average calculated from a whole population.
Sample mean: average of a small sample of the population; approximates the population mean.
Mean: expected value of a random variable.

Explanation:

A population mean is the true (often impossible to know) average for the population. If you were able to measure a certain quantity for every single unit in a population and computed the average of all that data, that average would be your population mean.

Getting a population mean often would take way too much time and cost way too much money. There are also data that it is impossible to collect for an entire population, like the average lifespan of a AA alkaline battery. (Once a battery's life is measured, it cannot be used again.) Also, it is impossible to "finish" sampling a population when the data being collected change with each measurement, like a person's reaction time. For all these reasons and more, we settle for sample means.

A sample mean is an estimate of a population mean. It is computed by selecting a (fair) random sample of units from a population, measuring the quantity of interest for them, and computing the average of those data.

There are various methods for ensuring the sample mean is as representative of the population mean as possible, from splitting the population into categories and sampling equal proportions from each category, to grouping the population by regions and sampling every unit from a random selection of regions.

As a sample size increases (or as the sampling method improves), the distribution of the sample mean will be centred closer and closer to the population mean, and have smaller and smaller variance, meaning we should expect larger datasets (and better sampling methods) to give us closer guesses of the population mean, and smaller margins of error on those guesses.

The mean of a variable makes more sense in discussing probability rather than statistics. It is used when the population data is understood or can be known, like when we calculate the expected ("average") number of coin flips until we get 5 heads. (In this case, that would give a mean of 10.)


text:
×

# How can you calculate mass by using volume and density?

Mar 9, 2018

Density multiplied by volume.

#### Explanation:

Density is given by $\rho = \frac{m}{V}$

So, rearranging for $m$, we get

$m = \rho \cdot V$

So, the mass of a substance is its density multiplied by its volume.

Note that the density and volume can change depending on the temperature and pressure, according to gas laws.


text:
Browse Questions

# The main function of roasting is

$(a)\;\text{Reduction} \\(b)\;\text{to remove volatile malter } \\(c)\;\text{Oxidation} \\ (d)\;\text{to make slag}$
Can you answer this question?

The main function of roasting is to remove volatile malter
Hence b is the correct answer.
answered Mar 17, 2014 by


text:
# Hall Effect Sensor to a +24VDC PLC Input

I have a square wave from a hall effect sensor giving between UL 7.7v-8.7v to UH 11.3v to 12.7v from a 13V Supply. I need to pass this into a logic input on a controller which is nominally 24vdc but operates at <5V Logic0 and > 15V Logic 1. My square wave has a frequency of 100Hz. I am not an electronic engineer and people tell me I need to use a zener diode or maybe a Schmitt trigger but I am at a loss. Can anyone help please Many thanks Lee

• Add links to datasheets for the sensor and PLC, please. Welcome to EE.SE. Sep 30 '16 at 14:07
• The output from the Hall sensor is rather unusual unless you are monitoring an analog signal so details would help. For the PLC input we need to know if it is current sourcing or current sinking input type. Sep 30 '16 at 20:11
• Thank you for your reply. I have added a circuit I was given and a photo of what I can see on my scope. The input to the PLC would a source as I am switching 'high' into it. Whilst I could take the signal into an analog input on the PLC, the update rate on the analog channel would not be quick enough to capture the waveform. Oct 3 '16 at 8:27
• Which one? A1212 or A1217? How did you wire it up? (There's a schematic button on the editor toolbar.) The two-wire test circuit may be confusing you. Can you use three wires in your application? (V+, GND and signal.) Oct 3 '16 at 8:48
• it is the A1217 variant. I have 2 wires that come from the device. Oct 3 '16 at 9:24

The A1217 doesn't seem to have a datasheet available anywhere. From your comments it seems to be an automotive cog tooth sensor.

The application note you posted shows the sensor fed from a current limiting resistor Rp = 182 Ω. The Up = 13 V is a 12 V battery average voltage.

• With a 2-wire sensor it needs some current to power it even when "off". That means the only way to signal "on" is to pass more current. We can see this from the test circuit information:

• When the sensor turns off little current will flow so the voltage at (4) will increase (because there will be less voltage dropped across Rp). Taking the average value of UH as 12 V means that 1 V is dropped across Rp and we can work out the current as $I_H = \frac {V_H}{R} = \frac {1}{168} = 6~\mathrm mA$.

• When the sensor turns on the voltage at (4) will drop. Taking the average value of UL as 8.2 V we get 4.8 V dropped across Rp and we can work out the current as $I_L = \frac {V_H}{R} = \frac {4.8}{168} = 29~\mathrm mA$.

Meanwhile, if your PLC input is like this one then you will need < 1 mA (5 V) to guarantee a '0' and > 2.5 mA (15 V) to guarantee a '1'. Given those specs it appears that the PLC has about 5k - 6k input resistance.

simulate this circuit – Schematic created using CircuitLab

Figure 1. Connecting the sensor as a high-side switch directly to the PLC with a shunt resistor just might work.

The idea in Figure 1 is that when the sensor is off it will pass 6 mA. With the PLC input in parallel with 820 Ω you'll get about 700 Ω total load and the voltage at the input will be $V_{IN} = IR = 6m \times 700 = 4.2~\mathrm V$. When the sensor turns on it will pass a higher current.

Assuming 29 mA flows then $V_{IN} = IR = 29m \times 700 = 20.3~\mathrm V$. Now this is unlikely as the sensor voltage would be reduced below the 8.2 V we saw in our earlier calculations. It might, however, pass enough current to reliably exceed the 15 V turn-on point.

Please try it out and report back on the voltages obtained.

• Hello, apologies for the delay in getting back to you, other work got in the way. Just to say I tried the circuit you suggested and it worked perfectly. I used a 680Ohm resistor and got voltage readings of 16V Logic 1 and 2.5V Logic 0. I could then clearly see the same frequency in my PLC register as I was getting on my scope. Many thanks for your help with this matter. Thank you Oct 4 '16 at 13:39
• Also, it might be worth measuring the current through the sensor. Some of the other sensors, A1212, for example, are rated for 25 mA. Oct 4 '16 at 17:30

Simply use a comparator like LM393. Power if from 24V, set Vref to 10V, add some hysteresis and you are done.

• Hello, thank you for your reply. I just 'googled' LM393 circuits and I understand the approach and your suggestion makes sense to me. Would you be able to sketch a sample circuit for me? and would it be able to operate as the waveform does 1t 100Hz. Thank you Oct 3 '16 at 8:29
• I wonder why people down voted this answer... Oct 3 '16 at 13:45
• @BrendanSimpson: For one, it doesn't address the PLC input which turns out to be current sinking. The LM393 is too (as it has an open-collector output) so a pull-up resistor is required to get this arrangement to work. Oct 3 '16 at 17:42
• @Transistor So why not just tell this person that instead of down voting an answer that, in my opinion, "just needed some work". I agree it's not a shining example of a solid answer, but it's not terrible by any means. Down votes are meant for answers that are misleading, wrong, or dangerous. Obviously this is a new user, they probably could have managed with some guidance in the comments. Oct 3 '16 at 17:53
• @BrendanSimpson: I didn't downvote! Oct 3 '16 at 17:55


text:
# 2.4: Hypothesis Annotation

The following instructions on how to use the Hypothes.is Annotation system are taken directly from the Course Information of a Chemistry class taught by Bob Belford at the University of Arkansas Little Rock.

_____________________________________________

## Hypothes.is Web Annotations

This class will use the Hypothes.is web annotation service that is integrated into LibreText.  You need to go to https://web.hypothes.is/ and create an account.  Please start your username with your last name so you can easily be identified for grading purposes. You should follow it with an underscore and then anything you want, so my username could be belford_123. You will then need to join the class group, which is a private group.  You will be sent an email invitation or contact your instructor, and you should only make annotations in the group.

The following YouTube gives a quick demonstration on the use of the Hypothes.is Web Annotation service.

### Making Annotations

To make an annotation you simply highlight the text you want to annotate, choose "Annotate" and write in the overlay.   Note, the first time you open up a page it will post to "Public" and you need to change that to your class group.  Once you have started posting to the class group that will be the default option, but initially the default is public.

Figure $$\PageIndex{1}$$: To annotate you simply highlight text and write in the overlay.  (Copyright; Belford, cc.0)

If you tag your annotation you can easily find it by going to your homepage in hypothes.is and then filtering by tags.  So you may want to make tags like "exam 1", or "nomenclature".  If you then filter with your hypothes.is user name and exam 1, you see those items you tagged.  If you just do exam 1, you filter for everything the class tagged exam 1.  You can then click the contextual link by the annotation, and hypothes.is will open that page, navigate to the highlighted text and display the annotation. (Note: In LibreText the highlights are hidden by default, and you need to click the "eye" with the slash over it (figure $$\PageIndex{2}$$

### Using the Hypothes.is Overlay to read discussions

By default the hypothes.is overlay is closed and you do not see the annotations.

Figure $$\PageIndex{2}$$: By default the overlay is closed and annotations are hidden. This image shows how to pick a group and view group activity (Copyright; Belford CC0)

Figure $$\PageIndex{2}$$ shows how to pick a group and view group activity.

Figure $$\PageIndex{3}$$: Annotation and highlights text being displayed. (Copyright; Belford CC0)

#### Using tags

Tags are a very powerful way of organizing your notes and Hypothes.is has different types of tags.  Your class group is a tag, and when you click on your hypothes.is group activity (figure $$\PageIndex{2}$$) you only see items posted to your class (note the first tag in the search filter of figure $$\PageIndex{4}$$ is a group tag.  If you then click your name you see those you have posted to that group.  If you remove the group you see all the annotations you have posted anywhere.  If you generate a tag based on a topic or exam, you can then easily find that information.  Figure $$\PageIndex{4}$$ shows a filter using two tags that resulting in four items in a student's "To Do list" for chapter 3 of a cheminformatics class

Figure $$\PageIndex{4}$$: Hypothes.is search filtered by the group tag 0UALR-OLCC (which was a class group) and a student's tag "Ch.3-ToDo". (Copyright; Belford CC0)

If the student clicks the contextual link hypothes.is will open the webpage that was highlighted, scroll down to the highlighted section and show the annotation in the overlay. This allows students to organize their notes on LibreText and quickly find content. If you get the chrome plugin you can even annotate material outside of LibreText and connect it to your material and notes within LibreText, as long as the material does not require a login to access.  It should also be noted that you can not highlight hidden text within LibreText (like the answers to exercises), and if you have a question on the answer to an exercise, you should highlight the question, not the answer.

2.4: Hypothesis Annotation is shared under a CC BY-SA license and was authored, remixed, and/or curated by LibreTexts.


text:
I now want to talk about some of the material in Hartshorne, II.8.  First, we need some preliminaries from commutative algebra.

Let ${A}$ be a commutative ring, ${B}$ an ${A}$-algebra, and ${M}$ a ${B}$-module. Then an ${A}$-derivation of ${B}$ in ${M}$ is a linear map ${D: B \rightarrow M}$ satisfying ${D(a)=0}$ for ${a \in A}$ and

$\displaystyle D(bb') = (Db) b' + b (Db').$

The set of all such derivations forms a ${B}$-module ${\mathrm{Der}_A(B,M)}$. If we regard this as a set, clearly, we have a contravariant functor

$\displaystyle \mathrm{Der}_A(B, -): B-\mathrm{mod} \rightarrow \mathrm{Set}$

because if ${B \rightarrow B'}$ is a homomorphism of ${A}$-algebras, we can pull back a derivation.

Before proceeding, I should say something about the canonical example. Let ${M}$ be a smooth manifold and ${O_x}$ the local ring (of germs of smooth functions) at ${x \in M}$. Then ${\mathbb{R}}$ becomes an ${O_x}$-module if the germ ${f}$ acts by multiplication by ${f(x)}$. More precisely, we have an exact sequence

$\displaystyle 0 \rightarrow m_x \rightarrow O_x \rightarrow \mathbb{R} \rightarrow 0$

for ${m_x \subset O_x}$ the maximal ideal of functions vanishing at ${x}$, and this is the way ${\mathbb{R}}$ is an ${O_x}$-module.

Anyway, an ${\mathbb{R}}$-derivation ${O_x \rightarrow \mathbb{R}}$ is just a tangent vector at ${x}$.

Now back to the algebraic theory. It turns out that the functor ${\mathrm{Der}_A}$ is representable. In other words, for each ${A}$-algebra ${B}$, there is a ${B}$-module ${\Omega_{B/A}}$ such that

$\displaystyle \hom_B( \Omega_{B/A}, M) \simeq \mathrm{Der}_A(B,M) ,$

the isomorphism being functorial. In addition, there must be a “universal” derivation ${d: B \rightarrow \Omega_{B/A}}$ (corresponding to the identity ${\Omega_{B/A} \rightarrow \Omega_{B/A}}$ in the above functorial isomorphism), that any derivation factors through.

The construction of ${\Omega_{B/A}}$ is straightforward. We define it as the ${B}$-module generated by symbols ${db, b\in B}$, modulo the relations ${da = 0}$ for ${a \in A}$, ${d(b+b') = db + db'}$, and ${d(bb') = b' db + b db'}$. It is now clear that we have a functorial isomorphism as above. Now, ${\Omega_{B/A}}$ is called the module of Kahler differentials of ${B}$ over ${A}$.

I will now prove some basic properties of Kahler differentials.

Tensor products

First, ${\Omega}$ linearizes tensor products. In detail, if ${B_1, B_2}$ are ${A}$-algebras, then

$\displaystyle \Omega_{B_1 \otimes_A B_2/A} \simeq B_1 \otimes \Omega_{B_2/A} \oplus B_2 \otimes \Omega_{B_1/A}.$

To see this, we will consider what a ${A}$-derivation ${D}$ of ${B_1 \otimes_A B_2}$ in a ${B_1 \otimes_A B_2}$-module ${M}$ looks like. It induces maps ${D_1: B_1 \rightarrow M, D_2: B_2 \rightarrow M}$ given by ${D_1(b_1) := D(b_1 \otimes 1), D_2(b_2) := D(1 \otimes b_2)}$, which are themselves ${A}$-derivations. Conversely, given a pair of such ${A}$-derivations ${D_1, D_2}$, we can define an ${A}$-derivation on ${B_1 \otimes_A B_2}$ by

$\displaystyle D(b_1 \otimes b_2) = D( (b_1 \otimes 1)(1 \otimes b_2)) := (b_1 \otimes 1) D_2(b_2) + (1 \otimes b_2)D_1(b_1).$

In particular, we find that for any ${B_1 \otimes_A B_2}$-module ${M}$,

$\displaystyle \mathrm{Der}_A(B_1 \otimes_A B_2, M) \simeq \mathrm{Der}_A(B_1, M) \times \mathrm{Der}_A(B_2, M).$

In particular, we have a functorial isomorphism:

$\displaystyle \hom_{B_1 \otimes_A B_2}( \Omega_{B_1 \otimes_A B_2/A}, M) \simeq \hom_{B_1}( \Omega_{B_1 /A}, M) \times \hom_{B_2}( \Omega_{B_2 /A}, M).$

Since ${M}$ is a ${B_1 \otimes_A B_2}$-module as well, the last functor is naturally isomorphic to

$\displaystyle \hom_{B_1 \otimes_A B_2}( B_2\otimes_A \Omega_{B_1 /A} \oplus B_1 \otimes_A \Omega_{B_2 /A} , M) ,$

and since ${ B_2\otimes_A \Omega_{B_1 /A} \oplus B_1 \otimes_A \Omega_{B_2 /A}}$ belongs to the category of ${B_1 \otimes_A B_2}$-modules, Yoneda’s lemma completes the proof.

First exact sequence: chains of rings

Differentials behave well with respect to changing rings:

Theorem 1

Let ${A \rightarrow B \rightarrow C}$ be a sequence of homomorphisms of commutative rings. Then there is an exact sequence of ${C}$-modules:$\displaystyle C \otimes_B \Omega_{B/A} \rightarrow \Omega_{C/A} \rightarrow \Omega_{C/B} \rightarrow 0.$

The first map sends ${c \otimes db}$ to ${c d f(b)}$, where ${f : B \rightarrow C}$ is the ring-homomorphism. The second sends ${dc \rightarrow dc}$.

Anyway, to prove this, we’ll use a categorical argument. Let ${M}$ be a ${C}$-module. I claim there is an exact sequence

$\displaystyle 0 \rightarrow \mathrm{Der}_B(C, M) \rightarrow \mathrm{Der}_A(C,M) \rightarrow \mathrm{Der}_A(B,M) .$

Here the maps are the obvious one: a ${B}$-derivation of ${C}$ is automatically an ${A}$-derivation, and an ${A}$-derivation of ${C}$ restricts to an ${A}$-derivation of ${B}$. The image of ${\mathrm{Der}_B(C, M)}$ consists of derivations that vanish on ${B}$, so it is the kernel of the last map, which establishes exactness. This is an exact sequence

$\displaystyle 0 \rightarrow \hom_C( \Omega_{C/B}, M) \rightarrow \hom_C( \Omega_{C/A}, M) \rightarrow \hom_B(\Omega_{B/A}, M )$

or equivalently, an exact sequence

$\displaystyle 0 \rightarrow \hom_C( \Omega_{C/B}, M) \rightarrow \hom_C( \Omega_{C/A}, M) \rightarrow \hom_C(C \otimes_B \Omega_{B/A}, M )$

which as one may check, comes from the sequence defined above

$\displaystyle C \otimes_B \Omega_{B/A} \rightarrow \Omega_{C/A} \rightarrow \Omega_{C/B} \rightarrow 0$

which is therefore exact, ${M}$ being arbitrary.

The second exact sequence: quotients

Now suppose ${I \subset B}$ is an ideal in the ${A}$-algebra ${B}$.

Theorem 2

There is an exact sequence of ${A/I}$ modules$\displaystyle I/I^2 \rightarrow \Omega_{B/A}/I\Omega_{B/A} \rightarrow \Omega_{(B/I)/A} \rightarrow 0.$

Here the first map is ${i \rightarrow d(i)}$.

Note that ${I/I^2}$ is a ${B/I}$-module. Again, we shall prove this by abstract nonsense. Let ${M}$ be an ${B/I}$-module. Then, I claim there is an exact sequence

$\displaystyle 0 \rightarrow \mathrm{Der}_{A}(B/I, M) \rightarrow \mathrm{Der}_A(B, M) \rightarrow \hom_B(I/I^2, M).$

The first map here, ${\mathrm{Der}_{A}(B/I, M) \rightarrow \mathrm{Der}_A(B, M)}$, is the obvious pull-back of a derivation. The second is slightly more subtle: note that any derivation ${D}$ of ${B}$ in ${M}$ vanishes on ${I^2}$ because ${M}$ is annihilated by ${I}$. Also, the restriction ${D: I/I^2 \rightarrow M}$ is actually a ${B}$-homomorphism because

$\displaystyle D(bi) = b D(i) + iD(b) = b D(i)$

for the same reason. So, the sequence is defined. We will now prove it exact.

Exactness at the first step is clear. Also, it is clear that the composition of the last two maps is zero. Finally, any derivation of ${B}$ that restricts to ${0}$ on ${I}$ is a derivation of ${B/I}$, evidently.

Now, writing ${C=B/I}$, we see that this becomes an exact sequence, functorial in ${M}$,

$\displaystyle 0 \rightarrow \hom_{C}( \Omega_{C/A}, M) \rightarrow \hom_{C}( \Omega_{B/A}/I \Omega_{B/A}, M) \rightarrow \hom_{C}(I/I^2, M)$

which is seen to be induced by the sequence

$\displaystyle I/I^2 \rightarrow \Omega_{B/A}/I\Omega_{B/A} \rightarrow \Omega_{(B/I)/A} \rightarrow 0$

which is therefore exact.

Next time, I’ll say something about how differentials deal with localization, maybe something on separability, and then onto sheaves of differentials.


text:
Skip to content

# Create Python Environment¶

Here, we explain how to use the "virtualenv" command 1 within the Command Line Interface (CLI) to assemble some commonly used python packages for materials science computations into a virtual environment. These packages include the "pymatgen", "pandas" and "atomic simulation environment (ase)" libraries.

Default version of python is 2.7.5

By default the system-wide version of python is used.

## Using Virtual Environment¶

virtualenv command can be used by following the instructions presented in its official website 1. The installation of a new python package consists of the following sequence of commands, where we also make use of the pip package manager 2 (already installed by default).

 1 2 virtualenv .virtualenv source .virtualenv/bin/activate

At this point the CLI prompt will change to reflect that the virtual environment is installed and will look similar to:

 1 (.virtualenv) [steven@bohr.exabyte.io:~/cluster-001/tmp]$ Next, let's install the desired package(s). Here we use "pymatgen", further explained below:  1 pip install pymatgen  Check that installation is successful (exit code of zero means everything OK):  1 2 python -c "import pymatgen" && echo$? 0

Now one can execute the scripts requiring the installed package as follows, for example:

 1 python script.py

In order to disable the virtual environment and return to the original default command line, enter the following.

 1 deactivate

## Example Python Packages¶

We support the following python packages in our platform.

### Pymatgen¶

Python Materials Genomics (pymatgen) 3 is a materials analysis code that defines core object representations for crystal structures and molecules, with support for many electronic structure codes. It is currently the core analysis engine powering the Materials Project 4 online database of material structures.

### Pandas¶

Pandas is a python software library for data manipulation and analysis 5. In particular, it offers data structures and operations for manipulating numerical tables and time series.

### Atomic Simulation Environment¶

The Atomic Simulation Environment (ASE) is a set of tools and python modules for setting up, manipulating, running, visualizing and analyzing atomistic simulations 6.


text:
# Lester Hill’s “The checking of the accuracy …”, part 14

Backstory: Lester Saunders Hill wrote unpublished notes, about 40 pages long, probably in the mid- to late 1920s. They were titled “The checking of the accuracy of transmittal of telegraphic communications by means of operations in finite algebraic fields”. In the 1960s this manuscript was given to David Kahn by Hill’s widow. The notes were typewritten, but mathematical symbols, tables, insertions, and some footnotes were often handwritten. I thank Chris Christensen, the National Cryptologic Museum, and NSA’s David Kahn Collection, for their help in obtaining these notes. Many thanks also to Rene Stein of the NSA Cryptologic Museum library and David Kahn for permission to publish this transcription. Comments by transcriber will look like this: [This is a comment. – wdj]. I used Sage (www.sagemath.org) to generate the tables in LaTeX.

Here is just the 15th section of his paper. I hope to post more later. (Part 14 is here.)

Lemma concerning reference matrices

The general reference matrix of Section 3 was:

$Q = \left( \begin{array}{cccc} k_{11} & k_{12} & \dots & k_{1n} \\ k_{21} & k_{22} & \dots & k_{2n} \\ \vdots & & & \vdots \\ k_{q1} & k_{q2} & \dots & k_{qn} \\ \end{array} \right)$
the $k_{ij}$ being elements of any given finite algebraic field $F$, and $q$ being less than or equal to $n$.

This matrix contains determinants of order $r$ with $r=1,2,\dots, q$ — determinants of first order ($r=1$) being single elements of the matrix.

We recall that if $f_1$, $f_2, \dots, f_{s}$ is an $s$ element operand
sequence in $F$, a $t$-element check based upon the matrix $Q$ is:

$c_j = \sum_{i=1}^{s} k_{ji} f_i,\ \ \ \ \ \ \ (j = 1, 2, \dots, t).$
it being understood that $s\leq n$, $t\leq q$.

Let $Q$ contain no vanishing determinant of any order: Let $c_1$, $c_2, \dots, c_{t}$ be a $t$-element check, $t\leq q$, on the operand sequence $f_1$, $f_2$, \dots, $f_{s}$, $s\leq n$. Let $v$ be a positive integer less than or equal to $s+t$. If, in the transmittal of the sequence

$f_1, f_2, \dots, f_{s}, c_1, c_2, \dots, c_{t},$
errors occur in $v$ of its $s+t$ elements, whatever the distribution of the errors, the presence of error will certainly be disclosed, or will enjoy only a $1$-in-$(\Gamma-1)^t$ chance of escaping disclosure, according as $v$ is, or is not, less than $t+1$. In this statement, $\Gamma$ denotes the total number of elements in the field $F$.

proof:
Case 1:
Let all $v$ errors fall among the $c_1, c_2, \dots, c_{t}$. The presence of error is evidently certain to be disclosed.

Case 2:
Let all $v$ errors fall among the $f_1, f_2, \dots, f_{s}$.

(2.1): Let $v\leq t$. There is no loss of generality of we assume [This assumption implies $v\leq s$. – wdj] the $v$ errors are $\epsilon_1$, $\epsilon_2, \dots, \epsilon_v$, affecting $f_1, f_2, \dots, f_{v}$. The errors cannot escape disclosure. For, to do so, they would have to satisfy the system of homogeneous linear equations:

$\sum_{i=1}^{v} k_{ji} \epsilon_i,\ \ \ \ \ \ \ (j = 1, 2, \dots, t).$
in which the matrix of coefficients $k_{ji}$ contains no vanishing determinant of any order, and which, therefore admits no solution other than $\epsilon_i=0$ ($i = 1, 2, \dots, v$).

For this treatment of the errors, compare Sections 4, 5.

Case 3:
Let $z$ errors fall among the $f_i$ and $w=v-z$ errors fall among the $c_j$. Without loss in generality, we may assume that the errors are $\epsilon_1$, $\epsilon_2, \dots, \epsilon_z$, affecting $f_1, f_2, \dots, f_{z}$, and $\delta_{j_1}$, $\delta_{j_2}, \dots, \delta_{j_w}$, affecting $c_{j_1}$, $c_{j_2}, \dots, c_{j_w}$.

(3.1): Let $z+w\leq t$. Writing $t=v+h=z+w+h$, where $h$ denotes a non-negative integer which may or may not be zero, we have $t-w = z+h$. Hence $z+h$ of the $c_j$ are transmitted without error.

If the presence of error is to escape disclosure, we see, therefore, that the $z$ errors $\epsilon_i$ must satisfy the system of at least $z$ homogeneous linear equations:

$\sum_{i=1}^{z} k_{r_m,i} \epsilon_i,\ \ \ \ \ \ \ (m = 1, 2, \dots, z+h),$
where the indices $r_m$ denote a set of $z+h$ integers selected from $1, 2, \dots, t$. But the matrix of coefficients in this system contains no vanishing determinant, so that the only solution would be $\epsilon_i=0$ ($i = 1, 2, \dots, z$).

For details in this treatment of errors, see Section \ref{sec:5}.

(3.2): Let $z+w> t$. Then $w = t-(z-h)$, where $h$ denotes a positive integer. Assuming that the presence of error is to escape detection, we see, therefore, that the $v$ errors must satisfy $t$ linear equations as follows:

($\alpha$) a system of $z-h$ equations involving only the errors $\epsilon_i$, ($i = 1, 2, \dots, z$), and homogeneous in these $z$ errors;

($\beta$) a system of $w$ equations involving all $v$ errors.

Since the matrix of the coefficients in the system ($\alpha$) contains no vanishing determinant, we can solve this system for $z-h$ of the $\epsilon_i$ as rational functions of the remaining $h$ of the $\epsilon_i$.

The system ($\beta$) determines all errors affecting the $c_j$ — that is, all the errors $\delta_{j_i}$ — as polynomial functions of the $\epsilon_i$, ($i = 1, 2, \dots, z$).

Hence, all told, $(z-h)+w$ errors are determined as rational functions of the remaining $h$ errors. In other words, $v-t$ errors determine the other $t$ errors.

An accidental error can assume any one of $\Gamma -1$ values, there being $\Gamma$ elements in the finite field $F$. Hence the chance that the errors will check up, and thus escape disclosure, is only $1$-in-$(\Gamma-1)^t$.
QED


text:
## Finding a Function’s Range

This post about finding a function’s range from its equation is part of a series of posts to help you prepare for the Advanced Algebra and Functions part of the Accuplacer test.

## Question

Find the range of this function:

$\fn_jvn {\color{DarkBlue} y=-3x^4+5}$

## Solution

A function’s range is the set of values y can take in that function.

You are asked to find a function’s range. What are the values y can take in this function?

Consider the first term, $\fn_jvn -3x^4$. Any real number (unless otherwise stated, it’s safe to assume x is real) to an even power, like 4, has a positive value or zero. It just can’t be negative. The lowest value of $\inline \fn_jvn 3x^4$ is zero — that happens where $\inline \fn_jvn x=0$ — and there is no limit to how high $\inline \fn_jvn 3x^4$ can go, so $\inline \fn_jvn 3x^4$ ranges from 0 to infinity. Then its negative, $\fn_jvn -3x^4$ ranges from negative infinity to 0.

 $\fn_jvn y=x^4$$\fn_jvn y=x^4$ $\fn_jvn y=-x^4$$\fn_jvn y=-x^4$ $\fn_jvn y=-x^4+5$$\fn_jvn y=-x^4+5$

The second term, 5. increases each y-value by 5. At the low end of the range, negative infinity plus 5 is still negative infinity, so the bottom of the range is still negative infinity. At the top end, $\fn_jvn 0+5=5$, so the top of the range is 5.

So the range of $\inline \fn_jvn y=-3x^4+5$ is from negative infinity to 5. In other words, $\inline \fn_jvn y\leq 5$. In interval notation, that’s $\inline \fn_jvn \left ( -\infty , 5 \right )$.

This question is similar to question number 11 in the sample questions for the Accuplacer Advanced Algebra and Functions test.