parameterization

Diagnosis of insidious data disasters

Lundquist, J.D., N.E. Wayand, A. Massmann, M.P. Clark, F. Lott, and N.C. Cristea, 2015: “Diagnosis of insidious data disasters.” Water Resources Research, v. 51, pp. 3815-3827, doi: 10.1002/2014WR016585.

Everyone taking field observations has a story of data collection gone wrong, and in most cases, the errors in the data are immediately obvious. A more challenging problem occurs when the errors are insidious, i.e., not readily detectable, and the error-laden data appear useful for model testing and development. We present two case studies, one related to the water balance in the snow-fed Tuolumne River, Sierra Nevada, California, combined with modeling using the Distributed Hydrology Soil Vegetation Model (DHSVM); and one related to the energy balance at Snoqualmie Pass, Washington, combined with modeling using the Structure for Unifying Multiple Modeling Alternatives (SUMMA). In the Tuolumne, modeled streamflow in 1 year was more than twice as large as observed; at Snoqualmie, modeled nighttime surface temperatures were biased by about +10°C. Both appeared to be modeling failures, until detective work uncovered observational errors. We conclude with a discussion of what these cases teach us about science in an age of specialized research, when one person collects data, a separate person conducts model simulations, and a computer is charged with data quality assurance.

Subscription Required

youtube

Parameterization and Correlation

This video will help us in learning:

1. How to create a user defined variable in the script.

2. How to use the created variable inside the script.

3. How to perform the correlation i.e. fetch the dynamic values from the response.

4. How to use the correlated variable in the script

Watch here:http://www.youtube.com/watch?v=Jdf9a9yI-8A

Review of surrogate modeling in water resources

Razavi, S., B.A. Tolson, and D.H. Burn, 2012: “Review of surrogate modeling in water resources.” Water Resources Research, v. 48, paper no. W07401, doi: 10.1029/2011WR011527.

Surrogate modeling, also called metamodeling, has evolved and been extensively used over the past decades. A wide variety of methods and tools have been introduced for surrogate modeling aiming to develop and utilize computationally more efficient surrogates of high-fidelity models mostly in optimization frameworks. This paper reviews, analyzes, and categorizes research efforts on surrogate modeling and applications with an emphasis on the research accomplished in the water resources field. The review analyzes 48 references on surrogate modeling arising from water resources and also screens out more than 100 references from the broader research community. Two broad families of surrogates namely response surface surrogates, which are statistical or empirical data-driven models emulating the high-fidelity model responses, and lower-fidelity physically based surrogates, which are simplified models of the original system, are detailed in this paper. Taxonomies on surrogate modeling frameworks, practical details, advances, challenges, and limitations are outlined. Important observations and some guidance for surrogate modeling decisions are provided along with a list of important future research directions that would benefit the common sampling and search (optimization) analyses found in water resources.

Subscription Required

arxiv.org
[1602.02062] On the uncertainty estimates of the $σ$-pole determination by Padé approximants

[ Authors ]
Irinel Caprini, Pere Masjuan, Jacobo Ruiz de Elvira, Juan José Sanz-Cillero
[ Abstract ]
We discuss the determination of the $f_0(500)$ (or $\sigma$) resonance by analytic continuation through Pad'e approximants of the $\pi\pi$-scattering amplitude from the physical region to the pole in the complex energy plane. The aim is to analyze the uncertainties of the method, having in view the fact that analytic continuation is an ill-posed problem in the sense of Hadamard. Using as input a class of admissible parameterizations of the scalar-isoscalar $\pi\pi$ partial wave, which satisfy with great accuracy the same set of dispersive constraints, we find that the Roy-type integral representations lead to almost identical pole positions for all of them, while the predictions of the Pad'e approximants have a larger spread, being sensitive to features of the input parameterization that are not controlled by the dispersive constraints. Our conservative conclusion is that the $\sigma$-pole determination by Pad'e approximants is consistent with the prediction of Roy-type equations, but has an uncertainty almost a factor two larger.

arxiv.org
[1602.02037] A Class of Integrable Metrics

[ Authors ]
Andres Anabalon, Carlos Batista
[ Abstract ]
In four dimensions, the most general metric admitting two Killing vectors and a rank-two Killing tensor can be parameterized by ten arbitrary functions of a single variable. We show that picking a special vierbien, reducing the system to eight functions, implies the existence of two geodesic and share-free, null congruences, generated by two principal null directions of the Weyl tensor. Thus, if the spacetime is an Einstein manifold, the Goldberg-Sachs theorem implies it is Petrov type D, and by explicit construction, is in the Carter class. Hence, our analysis provide an straightforward connection between the most general integrable structure and the Carter family of spacetimes.

Records: Python library for making raw SQL queries to Postgres databases

“Records is a very simple, but powerful, library for making raw SQL queries to Postgres databases. Safe parameterization: Database.query(‘life=%s’, params=('42’,)) Queries can be passed as strings or filenames, parameters supported. Query results are iterators of standard Python dictionaries: {'column-name’: 'value’} Records is proudly powered by Psycopg2 and Tablib.”

Read more on github.com or discuss it on HN.

Modeling the effect of relative humidity on nitrous acid formation in the Houston area

Publication date: April 2016Source:Atmospheric Environment, Volume 131
Author(s): Lijun Diao, Anirban Roy, Beata Czader, Shuai Pan, Wonbae Jeon, Amir Hossein Souri, Yunsoo Choi
The field and laboratory based relative humidity (RH) impact on nitrous acid (HONO) heterogeneous reaction has not been considered in chemical transport models. This study parameterized this dependency into the Community Multiscale Air Quality (CMAQ) model. In view of the positive linear correlation between the reaction rate and RH, the HONO heterogeneous reaction rate constants were respectively scaled by the factors of RH/30 and RH/40. Two corresponding sensitivity tests were carried out in the period of September 2013 in Houston. Both tests significantly improved modeled HONO concentrations and reduced the bias for NO2 in comparison with observations. However, the model is still not capable of reproducing the high HONO concentrations in the morning rush hours. Further work is needed to explore the underlying mechanisms for the early morning HONO formation.

fromia o.lakala70 on Inoreader http://ift.tt/20BLzUD
via IFTTT Medicine by Alexandros G.Sfakianakis,Anapafseos 5 Agios Nikolaos,Crete 72100,Greece,tel :00302841026182 & 00306932607174

fromnakis via Alexandros G.Sfakianakis on Inoreader http://ift.tt/1mlv9Np
via IFTTT

fromnakis via Alexandros G.Sfakianakis on Inoreader http://ift.tt/1PtvghY
via IFTTT

from on Inoreader http://ift.tt/20P1ITh
via IFTTT

arxiv.org
[1602.01548] Entangled Bloch Spheres: Bloch Matrix And Two Qubit State Space

[ Authors ]
Omar Gamel
[ Abstract ]
We represent a two qubit density matrix in the basis of Pauli matrix tensor products, with the coefficients constituting a Bloch matrix, analogous to the single qubit Bloch vector. We find the quantum state positivity requirements on the Bloch matrix components, leading to three important inequalities, allowing us to parameterize and visualize the two qubit state space. Applying the singular value decomposition naturally separates the degrees of freedom to local and nonlocal, and simplifies the positivity inequalities. It also allows us to geometrically represent a state as two entangled Bloch spheres with superimposed correlation axes. It is shown that unitary transformations, local or nonlocal, have simple interpretations as axis rotations or mixing of certain degrees of freedom. The nonlocal unitary invariants of the state are then derived in terms of local unitary invariants. The positive partial transpose criterion for entanglement is generalized, and interpreted as a reflection, or a change of a single sign. The formalism is used to characterize maximally entangled states, and generalize two qubit isotropic and Werner states.

arxiv.org
[1602.01461] Comment on "Breakdown of the expansion of finite-size corrections to the hydrogen Lamb shift in moments of charge distribution"

[ Authors ]
J. Arrington
[ Abstract ]
In a recent paper, Hagelstein and Pascalutsa examine the error associated with an expansion of proton structure corrections to the Lamb shift in terms of moments of the charge distribution. They propose a small modification to a conventional parameterization of the proton’s charge form factor and show that this can resolve the proton radius puzzle. However, while the size of the “bump” they add to the form factor is small, it is large compared to the total proton structure effects in the initial parameterization, yielding a final form factor that is unphysical. Reducing their modification to the point where the resulting form factor is physical does not allow for a resolution of the radius puzzle.

arxiv.org
[1602.01765] Constraints on the Coupling between Dark Energy and Dark Matter from CMB data

[ Authors ]
Riccardo Murgia, Stefano Gariazzo, Nicolao Fornengo
[ Abstract ]
We investigate a phenomenological non-gravitational coupling between dark energy and dark matter, where the interaction in the dark sector is parameterized as an energy transfer either from dark matter to dark energy or the opposite. The models are constrained by a whole host of updated cosmological data: cosmic microwave background temperature anisotropies and polarization, high-redshift supernovae, baryon acoustic oscillations, redshift space distortions and gravitational lensing. Both models are found to be compatible with all cosmological observables, but in the case where dark matter decays into dark energy, the tension with the independent determinations of $H_0$ and $\sigma_8$, already present for standard cosmology, increases: this model in fact predicts lower $H_0$ and higher $\sigma_8$, mostly as a consequence of the higher amount of dark matter at early times, leading to a stronger clustering during the evolution. Instead, when dark matter is fed by dark energy, the reconstructed values of $H_0$ and $\sigma_8$ nicely agree with their local determinations, with a full reconciliation between high- and low-redshift observations. A non-zero coupling between dark energy and dark matter, with an energy flow from the former to the latter, appears therefore to be in better agreement with cosmological data.

Combine Mockito VerificationModes with JUnit Parameterized Tests?

microsoft windows eight

This question has received: 1 Votes.

Starting Point
I wanted to unit-test a class that basically doesn’t create an output itself, but modifies an object that it receives. To be precise: it delegates to a service class, that creates an image that is appended to the object’s imageList:

public class Class {
 //field declarations ...

 public Class(@Autowired Service service){
  this.service = service;
 }

 public Object process(Object object){
  //determine property here ...

  if(property == optionA){
   //the service will add the new image A to a list in object
   this.service.createImageA(object);
  } else if(property == optionB){
   //the service will add the new image B to a list in object
   this.service.createImageB(object);
  }

  //object will be returned, with or without a new image
  return object;
 }
}

The Work So Far
The best way – in my opinion – to test this class is:

  1. to check if the product returned is the same as the one assigned to the process method
  2. check how often both servicemethods were invoked (service is mocked with Mockito, of course
    External image
    )

Now I would like to combine this with JUnit’s ability to create Parameterized tests. Something analogous to:

@Parameters
public static List<Object[]> parameters() {
 return Arrays.asList(new Object[][] {
            {optionA, Mockito.times(1), Mockito.never()},
            {optionB, Mockito.never(), Mockito.times(1)},
            {optionC, Mockito.never(), Mockito.never()},
 });
}

Question
1. Is it possible to pass static functions within a parameterized test?
2. Are there special reasons not to do this?
3. Any known alternatives?

Thanks in advance.

Tue Sep 01 15:47:45 AST 2015 Unknown Id Answer #: 1 This answer has received: 2 Votes.

never and times return VerificationMode implementations. Though you’re right to be wary of the calling semantics, there seem to be no side effects to VerificationMode creation, so you’re free to extract your mode to a variable and pass it in.

Beware, however, that VerificationMode implementations might be stateful (I haven’t had a chance to dig deeply), so reusing instances may cause bizarre errors.

As Florian Schaetz mentioned above, you may instead choose to pass integers: never is simply an alias for times(0), so you can pass the number of expected invocations (0 or 1) as a JUnit parameter and then call times(parameter) in your test without worrying about state or side effects.


As of Java 8, you can use method references or lambda expressions to pass code as data between fuunctions, but the result may not be easy to read or maintain, especially with the cast required to keep a method reference in an Object[]:

@RunWith(Parameterized.class)
public class LambdaParameters {

  public static Integer toot() { return 0; }
  public static Integer whistle() { return 1; }
  public static Integer plunk() { return 2; }
  public static Integer boom() { return 3; }

  private static Supplier<Integer> wrap(Supplier<Integer> methodCall) {
    return methodCall;
  }

  @Parameters public static List<Object[]> parameters() {
    return ImmutableList.of(
      // Java 8 knows that static call "toot" is effectively a Supplier<Integer>...
      new Object[] { (Supplier<Integer>) LambdaParameters::toot, 0 },
      // ...but it won't infer that without the cast...
      new Object[] { (Supplier<Integer>) LambdaParameters::whistle, 1 },
      // ...or without getting the hint through a method like "wrap" above.
      new Object[] { wrap(LambdaParameters::plunk), 2 },
      // Most lambda expressions are for calling Runnables, Listeners, Callbacks,
      // and short Functions or Predicates, so the casts there aren't necesssary.

      // You can use this syntax for compact lambda functions too.
      new Object[] { wrap(() -> 3), 3 },

      // All of these are effectively anonymous inner classes as you might see
      // in previous versions of Java.
      new Object[] { new Supplier<Integer>() { @Override public Integer get() { return LambdaParameters.boom(); }}, 3 }
    );
  }

  private Supplier<Integer> supplier;
  private Integer integer;

  public LambdaParameters(Supplier<Integer> supplier, Integer integer) {
    this.supplier = supplier;
    this.integer = integer;
  }

  @Test public void supplierSuppliesExpectedInteger() {
    assertEquals(integer, supplier.get());
  }
}

Whether this is worth the extra logic depends entirely on how many parameters you have, how many tests you have, and whether there are any alternatives (as there are for VerificationMode).

Wed Sep 02 15:58:50 AST 2015 Jeff Bowman This question and its answers are found at: Combine Mockito VerificationModes with JUnit Parameterized Tests?

new microsoft phone