What is internal drift and external drift? - geospatial

For the Kriging model, I'm wondering what the difference is between internal and external drift? I understand the internal drift is part of the location (s) and the external drift is typically an additional variable that has a linear correlation with the location information.

External drift kriging (EDK) is a special case of Universal kriging.
In the case of an external drift, the drift is not determined by the spatial position of the target point, at which the data should be interpolated.
Making an educated guess, I think that what you mean with "internal" drift (simply as the opposite of "external" drift) is the drift functions, that determines the drift from the target point position.
The classical approach for a drift function is a regional linear drift (or more general: a regional polynomial drift [quadratic, cubic, etc.])
When a drift function is given, you don't have to provide the value for the drift "externally", where the name for EDK comes from.
TL;DR: For external drift kriging, you have to provide the drift value at each target point, where you want to interpolate your data. When you have a functional drift, you only have to provide that function and the drift value is determined by the position of the target point.
See for example: Webster R., Oliver M. A.: Geostatistics for Environmental Scientists

I think question is too vague. Kriging with external drift is a special case of Co-kriging, where drift is the co-variable (independent variable used for estimation). Some call it also Universal Kriging (see for example A minimal introduction to geostatistics with R or Kriging with External Drift).
Different naming conventions, based on user background do not make thinks easier. I've never seen term "internal drift". Where have you found it?

Related

How to compare the results of different statistical tests?

I don't know if it is a good question or not.
Here's the case, say I have a scale/continuous dependent variable and a bunch of independent variables. My ultimate goal is to build a model to predict/estimate the dependent variable using these independent variables. I believe it's a common setting.
The point is that I know the physical meaning of all the variables, but I don't know their detailed relationship (or even related or not). I want to build a model more from an analysis/explanation point of view so that I could get some real-world insights from the model, instead of a black box.
My approach is trying to use CHAID kind of algorithm to build a decision tree type of model. At every branch, I want to statistically test each independent variable to see if there's relation between it and the dependent variable. Then, based on the test result, I want to pick the most powerful one to build my tree.
The problem is, unlike CHAID algorithm, where most variables are categorical, in my case, the dependent variable is scale, and independent variables are categorical or scale, which means I might need to do different statistical tests for different variables, e.g. t-test and ANOVA for categorical ones and regression for continuous ones. I'm wondering how should I fairly compare these results to pick the most powerful one? (like the correction step in CHAID)
Any idea on any part of my plan is of great importance to me! Thanks!

UML: guideline for visibility

I am reading Real Time UML: Advances in the UML for Real-Time Systems (3rd Edition) 3rd Edition
by Bruce Powel Douglass
In section 10.5 when talking about guidlines on detailed design on visibility. he says:
Only make semantically appropriate operations visible.
This guideline
seeks to avoid pathological coupling among classes. For example,
suppose a class is using a container class. Should the operations be
GetLeft() and GetRight() or Prev() and Next()? The first pair makes
the implementation visible (binary tree) while the latter pair
captures the essential semantics (ordered list).
I am unable to understand what he is trying to say here and especially last line.
Can someone elaborate his point ?
Well, it's a bit subtile. GetLeft and -Right have the directions in their name which are derived from an internal implementation as binary tree. So the internal data structure is sort of visible in the interface. And that should not be the case. It is better to keep this knowledge inside for several reasons. First, the outer world must not care how things are implemented. Second, if you decide to implement it in a different way (e.g. via a ring buffer) the GetRight would be odd from an internal view if you reach the right border of the buffer. Prev and Next clearly target the business/outer usage aspect of the operations.

Ultrasonic sensor state machine diagram

I'm working on a basic embedded systems application. Where I have a sonar (ultrasonic) sensor to measure the distance between the sensor and X object. Ultasonic sensor has one job to do, calculate distance and return it. I would like to produce a state chart diagram for this but I cannot break it down into different states. This is one of those situations where you can't get your head around a simple task. Anyone have any idea?
It's not a strict law, but I've come identify a state of an object by a set of operations that may be performed on it. So if, under different conditions, different sets of operations can be performed, you have different states. This view is supported by most state diagram conventions, including UML, where, on each state, you may model operations that lead to the same or other states.
So the key question is: Are there conditions under which your ultrasonic sensor may perform only subsets of its functionality? Each such subset will define one state.

Statecharts: Limit the number of time a state gets executed

How can I graphically represent within Statechart Diagrams that a state never gets executed more than a certain amount of times? So that it doesn't end in an infinite loop. Something like
assert enterPIN(int p) <= 3
and then branch to another state, if condition violated. Should I include it somehow in the guard? Or in the state activities?
EDIT:
(CheckPIN)--[invalid]-->(counter| + inc.)--[counter>3]-->(retainCard)
^ |
|-----[counter<=3]-----|
Something in this direction?
Legend: (StateName | (+-)activity), Transition: -->, [Guard]
I think your question is way too far down in the weeds. While you can model to infinitesimal detail, you should aim to create a much more durable model that will not require as much change over time.
H. S. Lahman makes an excellent case for using Moore state machines in his book, Model-Based Development: Applications. Moore state machines are where actions happen on entry to states, as opposed to where actions happen on transitions between states. His most compelling reason for using Moore state machines is that transitions do not degenerate into a sequence of function calls, they are instead announcements of things that have completed.
Here is an example of how to avoid all the detail and create a more durable model:
You'll notice that how things happen is completely encapsulated. For example, challenging the user might involve a PIN number, retina scan, or subdermal chip. The maximum failures allowed for each of those authentication modes might be completely different. That policy can be represented elsewhere.
To give a graphical answer:
This is how I would model it.
The counter object is usually not needed, since it's a simple counter and it's rather obvious that the rest/increment would refer to a common counter. Also there is no real <<flow>> to that counter. A not stereotyped dependency would also suffice.

How to express time constraints on ChangeEvent(s) in UML?

I am currently working to create a UML model of an embedded system to aid the description of the related software requirements specification.
I have a physical pressure sensor which outputs a voltage with a determined relationship between the voltage value and the pressure measured. Since the model is used to elicit SwRS, I have decided model the pressure sensor through a class that abstracts the voltage-pressure relationship and exposes the currently measured pressure through its pressure property.
I used a property rather than an operation like getPressure():Real, because the pressure sensor measures that pressure continuously, not only when required.
The pressure sensor is considered broken if the pressure goes negative.
I would like to use UML to express a time constraint between this event and the time taken by the software to show an alarm message.
I believe that the event that I am after is the ChangeEvent, namely when(PressureSensor.pressure < 0).
I believe that the diagram type that can be used for this is the Sequence Diagram, but I am not able to express what I would like and complying with the UML 2.5 specs.
For example, if I use a sequence diagram I can express the concept in this way.
The problem is that pag. 572 of the UML 2.5 spec states that
The signature of a Message refers to either an Operation or a Signal.
This means that the signature cannot refer to a ChangeEvent, hence my diagram does not respect the UML 2.5 spec.
I also though of using an activity diagram, but from I could not figure out a proper way to use an activity diagram for my purpose.
You have a functional and a non-functional requirement:
"The UserInterface shall show a warning message if the pressure drops below 0."
"The pressure warning message shall be shown within 10ms after the pressure has dropped below 0."
Both can be expressed in a state diagram.
Here, PressureSensor.Pressure < 0 is a change event and UserInterface.showMessage("WARNING: Pressure below 0") is the effect.
The timing requirement is modeled as a constraint.
UML allows to include timing details in a SD like this:
I don't know whether Papyrus allows to depict it this ways (I used EA).

Resources