Quantile regressions are relatively new in the Bayesian literature first appearing in Yu and Moyeed (2001) who described an asymmetric Laplace distribution to estimate the conditional quantiles. This post is going to show the asymmetric Laplace and the augmented version. In part II I will show the score likelihood method.
The asymmetric Laplace distribution is given as \[ \operatorname{ALD}(Y \mid x, \beta) = \frac{\tau^n (1 - \tau)^n}{\sigma^n}\exp \bigg( -\frac{\sum_{i=1}^n \rho_\tau (y_i - x_i^{\top}\beta)}{\sigma} \bigg) \]
where
\[ \rho_\tau(u) = \frac{|u| + (2\tau - 1)u}{2} \]
We may write this in Stan as
functions{
real q_loss(real q, vector u){
return 0.5 * sum(abs(u) + (2 * q - 1) * u);
}
real ald_lpdf(vector y, real q, real sigma, vector q_est){
int N = num_elements(y);
return N * (log(q) + log1m(q) - log(sigma)) - q_loss(q, y - q_est) / sigma;
}
}data {
int N; // Number of observation
int P; // Number of predictors
real<lower=0, upper=1> q;
vector[N] y; // Response variable sorted
matrix[N, P] x;
}parameters {
vector[P] beta;
real<lower=0> sigma;
}model {
0, 4);
beta ~ normal(1);
sigma ~ exponential(
y ~ ald(q, sigma, x * beta); }
Let’s compare the 5th percentile to the Brq
R package
library(Brq)
data("ImmunogG")
<- asymetric_laplace$sample(
out_asym_laplace data = list(N = nrow(ImmunogG),
P = 3,
q = 0.05,
y = ImmunogG$IgG,
x = as.matrix(data.frame(alpha = 1, x = ImmunogG$Age, xsq = ImmunogG$Age^2))),
seed = 12123123,
parallel_chains = 4,
iter_warmup = 500,
iter_sampling = 500,
refresh = 0,
show_messages = FALSE
)
Running MCMC with 4 parallel chains...
Chain 1 finished in 0.5 seconds.
Chain 3 finished in 0.4 seconds.
Chain 4 finished in 0.5 seconds.
Chain 2 finished in 0.6 seconds.
All 4 chains finished successfully.
Mean chain execution time: 0.5 seconds.
Total execution time: 0.7 seconds.
$summary() out_asym_laplace
# A tibble: 5 × 10
variable mean median sd mad q5 q95 rhat ess_bulk
<chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
1 lp__ -670. -670. 1.50 1.24 -673. -669. 1.01 585.
2 beta[1] 0.587 0.601 0.246 0.271 0.179 0.962 1.02 385.
3 beta[2] 1.31 1.31 0.199 0.210 1.01 1.64 1.02 336.
4 beta[3] -0.156 -0.155 0.0338 0.0333 -0.212 -0.104 1.01 373.
5 sigma 0.165 0.165 0.00958 0.00897 0.149 0.181 1.01 645.
# … with 1 more variable: ess_tail <dbl>
= ImmunogG$IgG
y = ImmunogG$Age
x =cbind(x, x^2)
X= Brq(y ~ X , tau= 0.05,runs= 2000, burn=1000)
fit print(summary(fit))
Call:
Brq.formula(formula = y ~ X, tau = 0.05, runs = 2000, burn = 1000)
tau:[1] 0.05
Estimate L.CredIntv U.CredIntv
Intercept 0.6285948 0.1193195 1.04185440
Xx 1.2928087 0.8984968 1.67267316
X -0.1541316 -0.2265564 -0.08528427
Scale-mixture representation
The above may also be written as a mixture of exponential and normal distributions. Letting
\[ \begin{aligned} z_i &\sim \operatorname{Exp}(1) \\ \sigma &\sim \operatorname{Exp}(1) \\ y_i &\sim \mathcal{N}(x_i^{\top}\beta_p + \sigma \theta z_i,\, \tau \sigma \sqrt{z_i}) \end{aligned} \] where
\[ \begin{aligned} \theta &= \frac{1 - 2 q}{q (1 - q)} \\ \tau &= \sqrt{\frac{2}{q(1 -q)}} \end{aligned} \]
The following Stan model implements the augmented approach.
data {
int N; // Number of observation
int P; // Number of predictors
real<lower=0, upper=1> q;
vector[N] y; // Response variable sorted
matrix[N, P] x;
}transformed data {
real theta = (1 - 2 * q) / (q * (1 - q));
real tau = sqrt(2 / (q * (1 - q)));
}parameters {
vector[P] beta;
vector<lower=0>[N] z;
real<lower=0> sigma;
}model {
0, 2);
beta ~ normal(1);
sigma ~ exponential(
// Data Augmentation
1);
z ~ exponential(
y ~ normal(x * beta + sigma * theta * z, tau * sqrt(z) * sigma); }
Let’s fit the model
<- augmented_laplace$sample(
out_aug_laplace data = list(N = nrow(ImmunogG),
P = 3,
q = 0.05,
y = ImmunogG$IgG,
x = as.matrix(data.frame(alpha = 1, x = ImmunogG$Age, xsq = ImmunogG$Age^2))),
seed = 12123123,
parallel_chains = 4,
iter_warmup = 500,
iter_sampling = 500,
refresh = 0,
show_messages = FALSE
)
Running MCMC with 4 parallel chains...
Chain 1 finished in 3.7 seconds.
Chain 3 finished in 3.7 seconds.
Chain 2 finished in 4.0 seconds.
Chain 4 finished in 4.1 seconds.
All 4 chains finished successfully.
Mean chain execution time: 3.9 seconds.
Total execution time: 4.2 seconds.
Warning: 77 of 2000 (4.0%) transitions ended with a divergence.
See https://mc-stan.org/misc/warnings for details.
$summary("beta") out_aug_laplace
# A tibble: 3 × 10
variable mean median sd mad q5 q95 rhat ess_bulk ess_tail
<chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
1 beta[1] 0.589 0.596 0.249 0.264 0.169 0.982 1.01 443. 733.
2 beta[2] 1.31 1.32 0.210 0.201 0.953 1.64 1.01 397. 505.
3 beta[3] -0.155 -0.155 0.0354 0.0321 -0.216 -0.0973 1.01 394. 522.
Ouch! Divergences. Although the parameter estimates look comparable. Let’s inspect the pairs plots between the augmented version and the asymmetric Laplace.
library(bayesplot)
This is bayesplot version 1.9.0
- Online documentation and vignettes at mc-stan.org/bayesplot
- bayesplot theme set to bayesplot::theme_default()
* Does _not_ affect other ggplot2 plots
* See ?bayesplot_theme_set for details on theme setting
<- nuts_params(out_aug_laplace)
np_aug_laplace <- nuts_params(out_asym_laplace)
np_asym_laplace mcmc_pairs(out_aug_laplace$draws(c("beta", "sigma")), np = np_aug_laplace)
mcmc_pairs(out_asym_laplace$draws(c("beta", "sigma")), np = np_asym_laplace)
The pairs plots don’t appear to show the divergence originating be due to beta
or sigma
. It’s most likely the augmentation variables z
. As I’m up for time on this, I’d be curious to test out alternative specifications or see if anyone has encountered these issues with the augmented version and found a solution.
For the next post, we’ll take a look at an approximate likelihood using the data which asymptotically approaches the true likelihood with more data.


| GnAlbum |
Object |
Album matches. Collection of audio recordings. Provides access to album cover art when received from a query object with content enabled in lookup data. |
artist |
GnArtist |
Album's artist |
contributor |
GnContributor |
A Contributor refers to any person who plays a role in a Work. Actors, Directors, Producers, Narrators, and Crew are all considered a Contributor. Popular recurring Characters such as Batman, Harry Potter, or Spider-man are also considered Contributors |
artistType |
String |
Contributor's artist type. |
biography |
GnContent |
Contributor's biography content object. See GnAlbum > content for object properties. |
biographyVideo |
String |
Contributor's biography when received from a video response. |
birthDate |
String |
The contributor's birth date in UTC format. |
birthPlace |
String |
The contributor's birth place. |
collaborator |
GnContributor |
Contributor that collaborated with this contributor in the context of the returned result. See GnAlbum > artist > contributor for object properties. |
collaboratorResult |
Boolean |
Flag indicating if this is a collaborator result |
contents |
GnContent Enumerator |
Content objects. See GnAlbum > content for object properties. |
deathDate |
String |
The contributor's date of death in UTC format. |
deathPlace |
String |
The place where the contributor died. |
era(GnDataLevel level) |
String |
Contributor's era |
externalIds |
GnExternalId Enumerator |
External ID objects. External IDs are 3rd party IDs used to cross link this metadata to 3rd party services.
See GnAlbum > externalIDs for object property descriptions. |
genre(GnDataLevel level) |
String |
Contributor's genre |
gnId |
String |
Gracenote identifier |
gnUId |
String |
Contributor's Gracenote unique Id |
image |
GnContent |
Contributor's image content object. See GnAlbum > content for object properties. |
isFullResult |
Boolean |
Indicates if this is a partial or full metadata result. |
mediaSpace |
String |
The kind of media, such as VIDEO. |
name |
GnName |
Contributor name object. See GnAlbum > artist > name for object properties |
namesOfficial |
GnName Enumerator |
Official name objects. See GnAlbum > artist > name for object properties |
namesRegional |
GnName Enumerator |
Regional name objects. See GnAlbum > artist > name for object properties |
origin(GnDataLevel level) |
String |
Contributor's origin, e.g., New York City |
productId |
String |
Product ID. |
tui |
String |
A Gracenote acronym for "title unique identifier". For example: "267348592". This and tuiTag are used for unique identification within the Gracenote service. |
tuiTag |
String |
FA hashed representation of the tui property. For example: "343DFA0AAF615988C9F4AB1ECB383D00". |
name |
GnName |
Artist's name object. |
display |
String |
Display name |
family |
String |
Family name |
given |
String |
Given name |
globalId |
String |
Name global ID - used for transcriptions |
language |
String |
Name display language |
languageCode |
String |
Name display language 3 letter ISO code |
prefix |
String |
Name prefix, e.g., "The". |
sortable |
String |
Sortable title |
sortableScheme |
String |
Sortable title scheme |
compilation |
String |
Album's compilation value |
content(GnContentType contentType) |
GnContent |
Content (cover art, biography, review, etc.) object. |
assets |
GnAsset Enumerator |
Asset objects. |
bytes |
Int |
Number of asset bytes |
dimension |
String |
Asset dimension |
size |
GnImageSize |
GnImageSize enum. Asset pixel image size of asset, e.g., kImageSize110 (110x110) |
url |
String |
URL that can be used to retrieve asset from Gracenote |
contentType |
GnContentType |
Content type - cover art, biography, etc. |
Id |
String |
Identifier |
mimeType |
String |
Content's mime type |
contents |
GnContent Enumerator |
Content (cover art, biography, review, etc.) objects. See GnAlbum > content for object properties. |
coverArt |
GnContent |
Cover art content object. See GnAlbum > content for object properties. |
credits |
GnCredit Enumerator
|
Album credit objects. |
contributor |
GnContributor |
Credit's contributor. See GnAlbum > artist > contributor for object properties. |
name |
GnName |
Credit's name, e.g., the person or company's name. See GnAlbum > artist > name for object properties. |
role |
GnRole |
Credit's role. Represents the role that a contributor played in a music or video production; for example, singing, playing an instrument, acting, directing, and so on.
For music credits, the absence of a role for a person indicates that person is the primary artist, who may have performed multiple roles. |
category |
String |
Role category, such as string instruments or brass instruments. |
role |
String |
Role's display string |
discInSet |
Long |
Album's volume number in a multi-volume set. |
externalIds |
GnExternalId Enumerator |
External ID objects. External IDs are 3rd party IDs used to cross link this metadata to 3rd party services. |
source |
String |
External ID source (e.g., Amazon) |
type |
String |
External ID type, such as a UPC (Univeral Product Code) |
value |
String |
External ID value. |
genre(GnDataLevel level) |
String |
Album's genre, e.g., punk rock. A list/locale dependent, multi-level field. |
globalId |
String |
Album's global identifier (used for transcriptions). |
gnId |
String |
Album's Gracenote identifier. |
gnUId |
String |
Album's Gracenote unique identifier. |
isClassical |
Boolean |
Flag indicating if enhanced classical music data exists for this album. |
isFullResult |
Boolean |
Flag indicating if response contains full (true) or partial (false) metadata. |
label |
String |
Album's label - record company that released the album, e.g., Atlantic. |
language |
String |
Display language |
languageCode |
String |
Display langauge's 3-letter ISO code |
matchScore |
Long |
Match confidence score for top-level match |
review |
GnContent |
The album's review content object. See GnAlbum > content for object properties. |
script |
String |
Script used by the display values as ISO 15924 code |
tagId |
String |
Album's Gracenote Tag identifier (Tag ID is same as Product ID) |
title |
GnTitle |
Title object of the matched result. |
display |
String |
Title display string. The title of the matched content, e.g. "Sienfeld" or "The Office" |
edition |
String |
Title edition |
language |
String |
Title display language |
languageCode |
String |
Title display language 3 letter ISO code |
mainTitle |
String |
Main title |
prefix |
String |
Video title prefix, e.g., "The". |
sortable |
String |
Sortable title |
sortableScheme |
String |
Sortable title scheme |
titleClassical |
GnTitle |
Title presented using Gracenote's Three Line Solution for classical track (composer/work title/movement title). See GnAlbum > title for object properties. |
titleRegional |
GnTitle |
Regional title - list/locale dependent field. See GnAlbum > title for object properties. |
titleRegionalLocale |
GnTitle |
Regional locale title - list/locale dependent field. See GnAlbum > title for object properties. |
totalInSet |
Long |
Total number of volumes in album's multi-volume set. |
track |
GnTrack |
Album track using the track number. A track is a song or instrumental recording. |
artist |
GnArtist |
Album's artist. See GnAlbum > artist for object properties |
content(GnContentType contentType) |
GnContent |
Track's content, e.g., cover image, artist image, biography etc. See GnAlbum > content for object properties. |
contents |
GnContent Enumerator |
Content (cover art, biography, review, etc.) objects. See GnAlbum > content for object properties. |
credits |
GnCredit Enumerator
|
Track credit objects. See GnAlbum > credits for object properties. |
currentPosition |
Long |
Current position in milliseconds of the matched track. |
duration |
Long |
Duration in milliseconds of the track (only available if this is the matched track). |
externalIds |
GnExternalId Enumerator |
External ID objects. External IDs are 3rd party IDs used to cross link this metadata to 3rd party services. See GnAlbum > externalIDs for object property descriptions. |
genre |
String |
Album's genre, e.g., punk rock. |
gnId |
String |
Album's Gracenote identifier. |
gnUId |
String |
Album's Gracenote unique identifier. |
isFullResult |
Boolean |
Flag indicating if response contains full (true) or partial (false) metadata. |
matchConfidence |
Long |
Confidence score (0-100) for match |
matchDuration |
Long |
For MusicID-Stream fingerprint matches, this is the length of matched reference audio in milliseconds. |
matched |
Boolean |
Flag indicating if this is the matched track (true) |
matchedIdents |
GnString Enumerator |
String objects. |
matchLookupType |
String |
Track's match type - the most authoritative matching type for a given file info object. |
matchPosition |
Long |
Position in milliseconds of where we matched in the track |
matchScore |
Long |
Track's match score - correlation between input text and matched track |
mood(GnDataLevel level) |
String |
Track's mood, e.g., Playful. |
review |
GnContent |
The album's review content object. See GnAlbum > content for object properties. |
tagId |
String |
Album's Gracenote Tag identifier (Tag ID is same as Product ID) |
tempo(GnDataLevel level) |
String |
Track's tempo. |
title |
GnTitle |
Track's official title. See GnAlbum > title for object properties. |
titleClassical |
GnTitle |
Title presented using Gracenote's Three Line Solution for classical track (composer/work title/movement title). See GnAlbum > title for object properties. |
titleRegional |
GnTitle |
Regional title - list/locale dependent field. See GnAlbum > title for object properties. |
titleRegionalLocale |
GnTitle |
Regional locale title - list/locale dependent field. See GnAlbum > title for object properties. |
trackNumber |
String |
Track's ordinal number on album. |
tui |
String |
Album's Gracenote TUI. TUI is a Gracenote acronym for "title unique identifier". For example: "267348592". This and tuiTag are used for unique identification within the Gracenote service. |
tuiTag |
String |
Album's Gracenote Tui Tag. A hashed representation of the tui property. For example: "343DFA0AAF615988C9F4AB1ECB383D00". |
work |
GnAudioWork |
Track's audio work. |
compositionForm |
String |
Audio work's classical music composition form value (e.g., Symphony). |
credit |
GnCredit |
Credit object for this audio work. See GnAlbum > credits for object properties |
era(GnDataLevel level) |
String |
Audio work's era. |
genre(GnDataLevel level) |
String |
Audio work's genre. |
gnId |
String |
Audio work's Gracenote identifier |
gnUId |
String |
Audio work's unique Gracenote identifier |
origin(GnDataLevel level) |
String |
Audio work's origin. |
productId |
String |
Audio work's product ID (aka Tag ID). |
tagId |
String |
Gracenote Tag identifier for this audio work (Tag ID is same as Product ID) |
title |
GnTitle |
Audio work's official title. See GnAlbum > title for object properties. |
tui |
String |
Gracenote TUI for this audio work. TUI is a Gracenote acronym for "title unique identifier". For example: "267348592". This and tuiTag are used for unique identification within the Gracenote service. |
tuiTag |
String |
Gracenote TUI Tag for this audio work. A hashed representation of the tui property. For example: "343DFA0AAF615988C9F4AB1ECB383D00". |
year |
String |
Year the album was released |
trackCount |
Long |
Total number of tracks on this album. |
trackMatched |
GnTrack |
Matched track. See GnAlbum > track for object properties. |
trackMatchNumber |
Long |
Track number on album for matching track |
tracks |
GnTrack Enumerator |
Album track objects. See GnAlbum > track for object properties. |
tui |
String |
Album's Gracenote TUI. TUI is a Gracenote acronym for "title unique identifier". For example: "267348592". This and tuiTag are used for unique identification within the Gracenote service. |
tuiTag |
String |
Album's Gracenote TUI Tag. A hashed representation of the tui property. For example: "343DFA0AAF615988C9F4AB1ECB383D00". |
year |
String |
Year the album was released |


Home
Submit
About Us
Contact Us
John Lennon
Imagine All The People
Imagine there's
no heaven
It's easy
if you
try
No hell
below us
Above us
only sky
Imagine all
the people
Living for
today...
Imagine there's
no countries
It isn't hard
to do
Nothing to kill
or die for
And no religion
too
Imagine
all the people
Living life
in peace...
You may say
I'm a dreamer
But I'm not the
only one
I hope someday
you'll join us
And the world
will be as one
Imagine
no possessions
I wonder if
you can
No need
for greed
or hunger
A brotherhood
of man
Imagine
all the people
Sharing all
the world...
You may say
I'm a dreamer
But I'm not the only one
I hope someday
you'll join us
And the world
will live as one
Tbilisi
+995 999 99 99 99
mail@gmail.com


Computer Science University of Illinois Urbana-Champaign
I am a postdoctoral researcher working at Computer Science at University of Illinois Urbana-Champaign (advisor: Prof. Hanghang Tong). My research interests include tensor analysis and time series analysis. I received my Ph.D in Computer Science and Engineering at Seoul National University where I was advised by Prof. U Kang. I received B.S. in Mechanical & Aerospace Engineering at Seoul National University.
Postdoctoral Researcher in Computer Science, UIUC. Aug. 2023 - Present
Postdoctoral Researcher in Computer Science and Engineering, SNU. March 2023 - Aug. 2023 Research Intern in Hyperconnect. July 2020 - Aug. 2020
Seoul National University Ph.D. in Computer Science and Engineering. March 2017 – Feb. 2023 BSc in Mechanical & Aerospace Engineering. March 2010 - Feb. 2017 BSc in Computer Science and Engineering (Double Major). March 2010 - Feb. 2017
C8. Fast and Accurate Dual-Way Streaming PARAFAC2 for Irregular Tensors - Algorithm and Application Jun-Gi Jang, Jeongyoung Lee, Yong-chan Park, and U Kang The 29th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining (KDD), 2023, Long Beach, CA, USA. [paper] [code]
J10. Accurate Open-set Recognition for Memory Workload Jun-Gi Jang, Sooyeon Shim, Vladimir Egay, Jeeyong Lee, Jongmin Park, Suhyun Chae, and U Kang ACM Transactions on Knowledge Discovery from Data, 2023. [paper] [code] [bib]
J9. Fast and accurate interpretation of workload classification model Sooyeon Shim, Doyeon Kim, Jun-Gi Jang, Suhyun Chae, Jeeyong Lee, and U Kang PLOS ONE, 2023. [paper] [code] [bib]
J8. Accurate Bundle Matching and Generation via Multitask Learning with Partially Shared Parameters Hyunsik Jeon, Jun-Gi Jang, Taehun Kim, and U Kang PLOS ONE, 2023. [paper] [code] [bib]
J7. Falcon: lightweight and accurate convolution based on depthwise separable convolution Jun-Gi Jang*, Chun Quan*, Hyun Dong Lee, and U Kang (*equal contribution) Knowledge and Information Systems (KAIS), Springer, 2023. [paper] [code] [bib]
C7. Accurate PARAFAC2 Decomposition for Temporal Irregular Tensors with Missing Values Jun-Gi Jang, Jeongyoung Lee, Jiwon Park, and U Kang IEEE International Conference on Big Data (BigData), 2022, Osaka, Japan. [paper] [homepage & code] [bib] [slide]
C6. DPar2: Fast and Scalable PARAFAC2 Decomposition for Irregular Dense Tensors Jun-Gi Jang and U Kang 38th IEEE International Conference on Data Engineering (ICDE), 2022, Virtual Event. [paper] [homepage & code] [bib] [slide] Best Paper Award, Honorable Mention
J6. Static and Streaming Tucker Decomposition for Dense Tensors Jun-Gi Jang and U Kang ACM Transactions on Knowledge Discovery from Data, Oct., 2022. It is the extended version of the conference paper C2. [paper] [homepage & code] [bib]
J5. Large‑scale tucker Tensor factorization for sparse and accurate decomposition Jun-Gi Jang*, Moonjeong Park*, Jongwuk Lee, and Lee Sael (*equal contribution) The Journal of Supercomputing, May, 2022. It is the extended version of the conference paper C3. [paper] [bib]
J4. Finding Key Structures in MMORPG Graph with Hierarchical Graph Summarization Jun-Gi Jang, Chaeheum Park, Changwon Jang, Geonsoo Kim, and U Kang ACM Transactions on Knowledge Discovery from Data, Feb., 2022. [paper] [bib]
C5. Fast and Memory-Efficient Tucker Decomposition for Answering Diverse Time Range Queries Jun-Gi Jang and U Kang The 27th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining (KDD), 2021, Virtual Event. [paper] [homepage & code] [bib] [slide] Best Paper Award, Best Research Paper
C4. Fast and Accurate Partial Fourier Transform for Time Series Data Yong-chan Park, Jun-Gi Jang, and U Kang The 27th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining (KDD), 2021, Virtual Event. [paper] [code] [bib] [slide]
C3. VeST: Very Sparse Tucker Factorization of Large-Scale Tensors Moonjeong Park*, Jun-Gi Jang* and Lee Sael (*equal contribution) IEEE International Conference on Big Data and Smart Computing (BigComp), 2021, Jeju Island, Korea. [paper] [homepage & code] [bib] Best Paper Award, 1st Place
J3. Time-aware tensor decomposition for sparse tensors Dawon Ahn, Jun-Gi Jang, and U Kang Machine Learning, Sep. 27, 2021. [paper] [code] [bib]
C2. D-Tucker: Fast and Memory-Efficient Tucker Decomposition for Dense Tensors Jun-Gi Jang and U Kang 36th IEEE International Conference on Data Engineering (ICDE) 2020, Dallas, Texas, USA [paper] [homepage & code] [bib]
J2. S3CMTF: Fast, accurate, and scalable method for incomplete coupled matrix-tensor factorization Dongjin Choi, Jun-Gi Jang, and U Kang PLOS ONE, 2019. [paper] [homepage & code] [bib]
J1. High-Performance Tucker Factorization on Heterogeneous Platforms Sejoon Oh, Namyong Park, Jun-Gi Jang, Lee Sael, and U Kang IEEE Transactions on Parallel and Distributed Systems (TPDS), Apr. 1, 2019. [paper] [code] [bib]
C1. Zoom-SVD: Fast and Memory Efficient Method for Extracting Key Patterns in an Arbitrary Time Range Jun-Gi Jang, Dongjin Choi, Jinhong Jung, and U Kang ACM International Conference on Information and Knowledge Management (CIKM) 2018, Lingotto, Turin, Italy. [paper] [homepage & code] [bib]


Your score:
0
Speed:
1
Next Round!
You lose! Try again
Press Space to start or restart the game
Use arrows to move
Press Esc to quit


Error: Couldn't add the highscore, because the captacha didn't verify
You reached a score of:
Please enter credentials consisting of three letters:
Enter
Highscore Table:
Name
Score


Interfaces for remote access to JMX MBean servers. This package defines the essential interfaces for making a JMX MBean server manageable remotely. The specification of this functionality is completed by Part III of the JMX Specification, version 1.4 PDF document.
The JMX specification defines the notion of connectors. A connector is attached to a JMX API MBean server and makes it accessible to remote Java clients. The client end of a connector exports essentially the same interface as the MBean server, specifically the {@link javax.management.MBeanServerConnection MBeanServerConnection} interface.
A connector makes an MBean server remotely accessible through a given protocol. The JMX Remote API allows the use of different type of connectors:
Note: the optional packages implementing the optional part of the JMX Remote API are not included in the Java SE Platform but are available from the JMX Remote API Reference Implementation.
Typically, a connector server has an address, represented by the class {@link javax.management.remote.JMXServiceURL JMXServiceURL}. An address for the RMI Connector can look like this:
service:jmx:rmi:///jndi/rmi://myhost:1099/myname
In this JMXServiceURL
, the first rmi:
specifies the RMI connector, while the second rmi:
specifies the RMI registry into which the RMI connector server
has stored its stub.
The example above shows only one form of address.
An address for the RMI Connector can take several forms,
as detailed in the documentation for the package
{@link javax.management.remote.rmi}
.
A connector server is created by constructing an instance of a subclass of {@link javax.management.remote.JMXConnectorServer JMXConnectorServer}. Usually, this instance is created using the method {@link javax.management.remote.JMXConnectorServerFactory#newJMXConnectorServer(JMXServiceURL, java.util.Map, javax.management.MBeanServer) JMXConnectorServerFactory.newJMXConnectorServer}.
Typically, a connector server is associated with an MBean server either by registering it in that MBean server, or by supplying the MBean server as a parameter when creating the connector server.
A connector client is usually created by supplying the
JMXServiceURL
of the connector server to connect to
to the {@link
javax.management.remote.JMXConnectorFactory#connect(JMXServiceURL)
JMXConnectorFactory.connect} method.
For more specialized uses, a connector client can be created by directly instantiating a class that implements the {@link javax.management.remote.JMXConnector JMXConnector} interface, for example the class {@link javax.management.remote.rmi.RMIConnector RMIConnector}.
When creating a connector client or server, it is possible to
supply an object of type {@link java.util.Map Map} that defines
additional parameters. Each entry in this Map has a key that is
a string and an associated value whose type is appropriate for
that key. The standard keys defined by the JMX Remote API all
begin with the string "jmx.remote.
". The document
JMX Remote API lists these standard keys.
Every connection opened by a connector server has a string identifier, called its connection id. This identifier appears in the {@link javax.management.remote.JMXConnectionNotification JMXConnectionNotification} events emitted by the connector server, in the list returned by {@link javax.management.remote.JMXConnectorServerMBean#getConnectionIds() getConnectionIds()}, and in the value returned by the client's {@link javax.management.remote.JMXConnector#getConnectionId() getConnectionId()} method.
As an example, a connection ID can look something like this:
rmi://<IP_ADDRESS> username 1
The formal grammar for connection ids that follow this convention is as follows (using the grammar notation from section 2.4 of The Java™ Language Specification):
ConnectionId: Protocol : ClientAddressopt Space ClientIdopt Space ArbitraryText ClientAddress: // HostAddress ClientPortopt ClientPort : HostPort
The Protocol
is a protocol that would
be recognized by {@link
javax.management.remote.JMXConnectorFactory
JMXConnectorFactory}.
The ClientAddress
is the
address and port of the connecting client, if these can be
determined, otherwise nothing. The
HostAddress
is the Internet address of
the host that the client is connecting from, in numeric or DNS
form. Numeric IPv6 addresses are enclosed in square brackets
[]
. The HostPort
is the
decimal port number that the client is connecting from.
The ClientId
is the identity of the
client entity, typically a string returned by {@link
javax.management.remote.JMXPrincipal#getName()
JMXPrincipal.getName()}. This string must not contain
spaces.
The ArbitraryText
is any additional
text that the connector server adds when creating the client id.
At a minimum, it must be enough to distinguish this connection
ID from the ID of any other connection currently opened by this
connector server.


Snakes and Ladders
Hello! Discover tokens and Start the game!
Discover Tokens
We have connected to Anypawn!
New Game


--- layout: post title: "Lazy monoids" description: "Lazy monoids are monoids. An article for object-oriented programmers." date: 2019-04-15 13:54 UTC tags: [Software Design] --- {% include JB/setup %}
{{ page.description }}
This article is part of a series about monoids. In short, a monoid is an associative binary operation with a neutral element (also known as identity). Previous articles have shown how more complex monoids arise from simpler monoids, such as tuple monoids, function monoids, and Maybe monoids. This article shows another such result: how lazy computations of monoids itself form monoids.
You'll see how simple this is through a series of examples. Specifically, you'll revisit several of the examples you've already seen in this article series.
Perhaps the most intuitive monoid is addition. Lazy addition forms a monoid as well. In C#, you can implement this with a simple extension method:
public static Lazy<int> Add(this Lazy<int> x, Lazy<int> y) { return new Lazy<int>(() => x.Value + y.Value); }
This Add
method simply adds two lazy integers together in a lazy computation. You use it like any other extension method:
Lazy<int> x = // ... Lazy<int> y = // ... Lazy<int> sum = x.Add(y);
I'll spare you the tedious listing of FsCheck-based properties that demonstrate that the monoid laws hold. We'll look at an example of such a set of properties later in this article, for one of the other monoids.
Not surprisingly, I hope, you can implement multiplication over lazy numbers in the same way:
public static Lazy<int> Multiply(this Lazy<int> x, Lazy<int> y) { return new Lazy<int>(() => x.Value * y.Value); }
Usage is similar to lazy addition:
Lazy<int> x = // ... Lazy<int> y = // ... Lazy<int> product = x.Multiply(y);
As is the case with lazy addition, this Multiply
method currently only works with lazy int
values. If you also want it to work with long
, short
, or other types of numbers, you'll have to add method overloads.
There are four monoids over Boolean values, although I've customarily only shown two of them: and and or. These also, trivially, work with lazy Boolean values:
public static Lazy<bool> And(this Lazy<bool> x, Lazy<bool> y) { return new Lazy<bool>(() => x.Value && y.Value); } public static Lazy<bool> Or(this Lazy<bool> x, Lazy<bool> y) { return new Lazy<bool>(() => x.Value || y.Value); }
Given the previous examples, you'll hardly be surprised to see how you can use one of these extension methods:
Lazy<bool> x = // ... Lazy<bool> y = // ...  Could this be generalised?
In a previous article you saw how angular addition forms a monoid. Lazy angular addition forms a monoid as well, which you can implement with another extension method:
public static Lazy<Angle> Add(this Lazy<Angle> x, Lazy<Angle> y) { return new Lazy<Angle>(() => x.Value.Add(y.Value)); }
Until now, you may have noticed that all the extension methods seemed to follow a common pattern that looks like this:
return new Lazy<Foo>(() => x.Value ⋄ y.Value);
I've here used the diamond operator ⋄
as a place-holder for any sort of binary operation. My choice of that particular character is strongly influenced by Haskell, where semigroups and monoids polymorphically are modelled with (among other options) the <>
operator.
The lazy angular addition implementation looks a bit different, though. This is because the original example uses an instance method to model the binary operation, instead of an infix operator such as +
, &&
, and so on. Given that the implementation of a lazy binary operation can also look like this, can you still imagine a generalisation?
If we follow the rough ordering of examples introduced in this article series about monoids, we've now reached concatenation as a monoid. While various lists, arrays, and other sorts of collections also form a monoid over concatenation, in .NET, IEnumerable<T>
already enables lazy evaluation, so I think it's more interesting to consider lazy string concatenation.
The implementation, however, holds few surprises:
public static Lazy<string> Concat(this Lazy<string> x, Lazy<string> y) { return new Lazy<string>(() => x.Value + y.Value); }
The overall result, so far, seems encouraging. All the basic monoids we've covered are also monoids when lazily computed.
The portfolio example from Kent Beck's book Test-Driven Development By Example also forms a monoid. You can, again, implement an extension method that enables you to add lazy expressions together:
public static Lazy<IExpression> Plus( this Lazy<IExpression> source, Lazy<IExpression> addend) { return new Lazy<IExpression>(() => source.Value.Plus(addend.Value)); }
So far, you've seen several examples of implementations, but are they really monoids? All are clearly binary operations, but are they associative? Do identities exist? In other words, do the lazy binary operations obey the monoid laws?
As usual, I'm not going to prove that they do, but I do want to share a set of FsCheck properties that demonstrate that the monoid laws hold. As an example, I'll share the properties for this lazy Plus
method, but you can write similar properties for all of the above methods as well.
You can verify the associativity law like this:
public void LazyPlusIsAssociative( Lazy<IExpression> x, Lazy<IExpression> y, Lazy<IExpression> z) { Assert.Equal( x.Plus(y).Plus(z), x.Plus(y.Plus(z)), Compare.UsingBank); }
Here, Compare.UsingBank
is just a test utility API to make the code more readable:
public static class Compare { public static ExpressionEqualityComparer UsingBank = new ExpressionEqualityComparer(); }
This takes advantage of the overloads for xUnit.net's Assert
methods that take custom equality comparers as an extra, optional argument. ExpressionEqualityComparer
is implemented in the test code base:
public class ExpressionEqualityComparer : IEqualityComparer<IExpression>, IEqualityComparer<Lazy<IExpression>> { private readonly Bank bank; public ExpressionEqualityComparer() { bank = new Bank(); bank.AddRate("CHF", "USD", 2); } public bool Equals(IExpression x, IExpression y) { var xm = bank.Reduce(x, "USD"); var ym = bank.Reduce(y, "USD"); return object.Equals(xm, ym); } public int GetHashCode(IExpression obj) { return bank.Reduce(obj, "USD").GetHashCode(); } public bool Equals(Lazy<IExpression> x, Lazy<IExpression> y) { return Equals(x.Value, y.Value); } public int GetHashCode(Lazy<IExpression> obj) { return GetHashCode(obj.Value); } }
If you think that the exchange rate between Dollars and Swiss Francs looks ridiculous, it's because I'm using the rate that Kent Beck used in his book, which is from 2002 (but otherwise timeless).
The above property passes for hundreds of randomly generated input values, as is the case for this property, which verifies the left and right identity:
public void LazyPlusHasIdentity(Lazy<IExpression> x) { Assert.Equal(x, x.Plus(Plus.Identity.ToLazy()), Compare.UsingBank); Assert.Equal(x, Plus.Identity.ToLazy().Plus(x), Compare.UsingBank); }
These properties are just examples, not proofs.
The last example you'll get in this article is the Roster
example from the article on tuple monoids. Here's yet another extension method that enables you to combine two lazy rosters:
public static Lazy<Roster> Combine(this Lazy<Roster> x, Lazy<Roster> y) { return new Lazy<Roster>(() => x.Value.Combine(y.Value)); }
At this point it should be clear that there's essentially two variations in how the above extension methods are implemented. One variation is when the binary operation is implemented with an infix operator (like +
, ||
, and so on), and another variation is when it's modelled as an instance method. How do these implementations generalise?
I'm sure you could come up with an ad-hoc higher-order function, abstract base class, or interface to model such a generalisation, but I'm not motivated by saving keystrokes. What I'm trying to uncover with this overall article series is how universal abstractions apply to programming.
Which universal abstraction is in play here?
Lazy<T> forms an applicative functor. Using appropriate Apply
overloads, you can rewrite all the above implementations in applicative style. Here's lazy addition:
public static Lazy<int> Add(this Lazy<int> x, Lazy<int> y) { Func<int, int, int> f = (i, j) => i + j; return f.Apply(x).Apply(y); }
This first declares a Func
value f
that invokes the non-lazy binary operation, in this case +
. Next, you can leverage the applicative nature of Lazy<T>
to apply f
to the two lazy values x
and y
.
Multiplication, as well as the Boolean operations, follow the exact same template:
public static Lazy<int> Multiply(this Lazy<int> x, Lazy<int> y) { Func<int, int, int> f = (i, j) => i * j; return f.Apply(x).Apply(y); } public static Lazy<bool> And(this Lazy<bool> x, Lazy<bool> y) { Func<bool, bool, bool> f = (b1, b2) => b1 && b2; return f.Apply(x).Apply(y); } public static Lazy<bool> Or(this Lazy<bool> x, Lazy<bool> y) { Func<bool, bool, bool> f = (b1, b2) => b1 || b2; return f.Apply(x).Apply(y); }
Notice that in all four implementations, the second line of code is verbatim the same: return f.Apply(x).Apply(y);
Does this generalisation also hold when the underlying, non-lazy binary operation is modelled as an instance method, as is the case of e.g. angular addition? Yes, indeed:
public static Lazy<Angle> Add(this Lazy<Angle> x, Lazy<Angle> y) { Func<Angle, Angle, Angle> f = (i, j) => i.Add(j); return f.Apply(x).Apply(y); }
You can implement the Combine
method for lazy Roster
objects in the same way, as well as Plus
for lazy monetary expressions. The latter is worth revisiting.
The lazy Plus
implementation looks like all of the above Apply
-based implementations:
public static Lazy<IExpression> Plus( this Lazy<IExpression> source, Lazy<IExpression> addend) { Func<IExpression, IExpression, IExpression> f = (x, y) => x.Plus(y); return f.Apply(source).Apply(addend); }
In my article, however, you saw how, when Plus
is a monoid, you can implement Times
as an extension method. Can you implement a lazy version of Times
as well? Must it be another extension method?
Yes, but instead of an ad-hoc implementation, you can take advantage of the functor nature of Lazy:
public static Lazy<IExpression> Times(this Lazy<IExpression> exp, int multiplier) { return exp.Select(x => x.Times(multiplier)); }
Notice that instead of explicitly reaching into the lazy Value
, you can simply call Select
on exp
. This lazily projects the Times
operation, while preserving the invariants of Lazy<T>
(i.e. that the computation is deferred until you ultimately access the Value
property).
You can implement a lazy version of Reduce
in the same way:
public static Lazy<Money> Reduce(this Lazy<IExpression> exp, Bank bank, string to) { return exp.Select(x => x.Reduce(bank, to)); }
The question is, however, is it even worthwhile? Do you need to create all these overloads, or could you just leverage Select
when you have a lazy value?
For example, if the above Reduce
overload didn't exist, you'd still be able to work with the portfolio API like this:
Lazy<IExpression> portfolio = // ... Lazy<Money> result = portfolio.Select(x => x.Reduce(bank, "USD"));
If you only occasionally use Reduce
, then perhaps this is good enough. If you frequently call Reduce
, however, it might be worth to add the above overload, in which case you could then instead write:
Lazy<IExpression> portfolio = // ... Lazy<Money> result = portfolio.Reduce(bank, "USD");
In both cases, however, I think that you'd be putting the concept of an applicative functor to good use.
Is the applicative style better than the initial ad-hoc implementations? That depends on how you evaluate 'better'. If you count lines of code, then the applicative style is twice as verbose as the ad-hoc implementations. In other words, this:
return new Lazy<int>(() => x.Value + y.Value);
seems simpler than this:
Func<int, int, int> f = (i, j) => i + j; return f.Apply(x).Apply(y);
This is, however, mostly because C# is too weak to express such abstractions in an elegant way. In F#, using the custom <*>
operator from the article on the Lazy applicative functor, you could express the lazy addition as simply as:
lazy (+) <*> x <*> y
In Haskell (if we, once more, pretend that Identity
is equivalent to Lazy
), you can simplify even further to:
(+) <$> x <*> y
Or rather, if you want it in point-free style, liftA2 (+)
.
The point of this article series isn't to save keystrokes, but to identify universal laws of computing, even as they relate to object-oriented programming. The pattern seems clear enough that I dare propose the following:
All monoids remain monoids under lazy computation.
In a future article I'll offer further support for that proposition.
Next: Monoids accumulate.


20 years of direct relevant technical experience may be substituted for education
Must have experience in the following :
Advanced Red Hat Enterprise Certified with Solaris 10 Experience, Advanced Veritas Clustering with MS SQL and Oracle Administration and Configuration, Advanced Veritas Netbackup Administration and Configuration, Intermediate Data Domain replication Administration and Configuration, Advanced Apache Administration and Configuration, Intermediate DISA Gold, Army Gold Master Administration and Configuration, Intermediate Tomcat Administration and Configuration, Intermediate DNS Administration and Configuration. Must be 8570 certified


--- title: 'Beyond Words: Illuminated Manuscripts in Boston Collections' --- {%- include head.html -%}
{% assign nav=site.navigation %} {%- include header.html navigation=nav -%}Beyond Words: Illuminated Manuscripts in Boston Collections is the first exhibition to showcase highlights of illuminated manuscripts in the Boston area. An ambitious collaborative project, Beyond Words is notable for the size of its curatorial team, the number of lending institutions, and a multi-venue display. The exhibition presents more than 260 outstanding manuscripts and printed books from nineteen Boston-area collections, dating from the ninth to the seventeenth centuries. The exhibit is supplemented by an extensive catalog, a three-day symposium, and public programming. Explore the website for additional information on Beyond Words.
Harvard Arts & Humanities Research Computing, in partnership with Archimedes Digital, provided exhibit support by building annotated IIIF manifests that could be viewed live in the galleries. These live views made use of Mirador and provided the public with the ability to interact with the material on display in digital preservation format. In addition, the Mirador instances showcased scholarly annotations created by the event curators.


Plug-Flow Reactor Model¶
A plug-flow reactor (PFR) model represents the limit of a tubular reactor for which Péclet number in axial direction is too high so that mixing can be neglected over flow direction (so that convective effects completely shadow any diffusion of species). That implies segregated flow in which each volume of fluid behaves as a closed system and travels in a single direction without any mixing with its neighboring elements of fluid. The composition at each coordinate of the reactor is homogeneous (a PFR can be seen under some cases as a series of perfect-stirred reactors) so that any radial effects are neglected. It is essentially a one-dimensional model and for most purposes is treated on stationary state, since the non-mixing criterion makes the transient approach meaningless. This package deals with PFR’s that are both constant and smoothly varying (to be implemented) in cross-sectional area (assumed circular). Each of these cases can be treated according to slightly different formulations, what includes:
- isothermal PFR: is characterized by the absence of energy equation solution.
- adiabatic PFR: heat released by reactions is not exchanged with environment.
- imposed wall temperature PFR: simplified convection heat exchanged with environment.
Currently no surface exchanges are implemented, that must be a next step. This will require a way to generalize the interface to place a catalyst or reacting interface inside the system, so that it can be usable in many cases.
Numerical integration¶
Solution of a PFR requires at least the coupled integration of mass, momentum, and species conservation equations. For those cases for which temperature is solved, energy conservation must be added to this set. These equations are then coupled by means of ideal gas law. Following, equations solved by this package are presented. For more details, please check reference [Ref.1].
Throughout the discussion the following symbols convention is adopted:
- \(\rho\): density of gas.
- \(\mu\): viscosity of gas.
- \(T\): temperature of gas.
- \(u\): velocity in axial direction.
- \(R\): radius of reactor.
- \(A\): cross-section of chamber.
- \(V\): volume of chamber.
- \(\mathcal{P}_{a}\): perimeter over cross-section \(A\) of tube.
- \(\hat{h}\): global convective heat transfer coefficient.
- \(T_{w}\): local wall temperature.
- \(C_{p}\): mixture constant pressure heat capacity.
- \(h_{k}\): species \(k\) enthalpy per unit mass.
- \(W\): molecular weight, with subscript to represent a species.
- \(\bar{W}\): mean molecular weight.
- \(Y\): mass fraction, with subscript to represent a species.
- \(\omega\): molar rate of production, with subscript to represent a species.
- \(CV\): control volume, used as integration limit.
- \(CS\): control surface, used as integration limit.
Mass conservation¶
Mass continuity equation in the absence of wall (source) terms can be derived by expanding steady state general compressible continuity equation \(\nabla\cdot{}(\rho{}u)\). The full derivation is provided in [Ref.1] and makes use of Reynolds transport theorem. The expansion of this expression over \(z\) axis gives the expression implemented in this package:
Species conservation¶
Species conservation starts by applying Reynolds transport theorem on the overall system species mass conservation. By using divergence theorem (here specialized in one dimension) this can be written as:
Assuming steady state and no variations in channel:
The axial derivative can be simplified using the overall mass balance leading to the expression that is implemented:
Momentum conservation¶
Momentum conservation is derived for a Newtonian fluid by taking into account viscous effects (drag over channel walls) and pressure acting at inlet. Viscous effects are introduced through a model equation as discussed in [Ref.1]. The equation is deriving by assuming a smooth pressure gradient and a friction factor applicable for the laminar limit. Hydraulic diameter proposed in section 16.2 of [Ref.1] is used to simplify the equation to its final form as:
State equation¶
Coupling of state variables is made by ideal gas law, here implemented as:
Energy conservation¶
Except for the isothermal case, energy equation is included in a general form as follows. Notice that for adiabatic reactors \(\hat{h}=0\), what makes the convective term disappear from the equation.
Problem initialization¶
Since we intend to solve the problem as a differential algebraic equations system, the constraining equations for calculation of initial derivatives is required. This is done by replacing the symbols in previous equations by their respective initial states. In order to get the same number of unknowns as equations, implicit total derivative of state equation is added to the system. These equations form a set of linear equations that can be solved by standard linear algebra methods.
Notice that here equations were expressed in most general form considered in this package. Temperature derivatives have to be eliminated for isothermal case and convective heat transfer coefficient set to zero in adiabatic limit.
Reference API¶
-
class
CanteraPFR.ct_pfr.
PyPFR
¶ Bases:
object
Python wrapper to plug-flow reactor models.
This class is built around several plug-flow reactor models. The selection of these is made according to the provided model name:
- isothermal: isothermal PFR (temperature held constant).
- adiabatic: adiabatic PFR (only viscous losses).
- heatwall: PFR with imposed wall temperature profile.
Todo
- Deal with Python strings.
- Add interface to user viscosity function.
- Make htc a function of gas speed.
- Allow vector of absolute tolerances.
- Parse wall profile from string with SymPy.
Parameters: - rtype (str) – Key-word for model selection.
- mech (str) – Path to CTI/XML mechanism file.
- phase (str) – Phase name in mechanism file.
- Di (float) – Reactor diameter in meters.
- T0 (float) – Inlet temperature in kelvin.
- p0 (float) – Inlet pressure in pascal.
- X0 (str) – Inlet composition compatible with Cantera in string format.
- Q0 (float) – Volume flow rate at reference state (assumed to be 273.15 K and 101325 Pa) given in cubic centimeters per minute. This unit was chosen because it is the most common used with laboratory scale mass flow controllers.
- htc (float, optional) – Wall convective heat transfer coefficient in watts per kelvin per square meter. If its value is zero, this is equivalent to an adiabatic reactor, regardless of wall temperature. This parameter is intended to be used with Tw. Must be supplied if rtype=’heatwall’. Default is None.
- Tw (float or function float(float), optional) – Wall temperature profile in kelvin. This can be supplied as a constant value or as a function of position along reactor axis (start coordinate at zero). Must be supplied if rtype=’heatwall’. Default is None.
Raises: SystemExit
– If reactor type name is not recognized or if provided wall temperature function is not suitable for use with reactor model heatwall.-
manage_solution
()¶ Manage integration of reactorself.
Parameters: Raises: AssertionError
– If parameters are unphysical (negative lengths), if step is below total length, if output file exists, or negative output frequency.Exception
– If solution fails to converge.
Returns: Table of results for further manipulation.
Return type: pandas.DataFrame
-
set_initial_step_size
()¶ Set length of initial integration step.
Notice that a value too small here may lead to failure if the maximum number of steps as provided by
set_max_num_steps()
is not consistent. Do not use this method if you are not facing failures at integration start or precision issues.Parameters: h0 (float) – Length of initial integration step.
-
set_max_num_steps
()¶ Set maximum number of integration steps.
This represents the maximum number of internal steps taken by IDA while integrating the problem, not the number of outputs made by the user.
Parameters: num (int) – Maximum number of integration steps.
-
set_stop_position
()¶ Set last coordinate to stop integration.
Eventually IDA solver may trespass the last point to integrate. If using
manage_solution()
, this is automatically done for you.Parameters: xstop (float) – Coordinate of last point in meters.
-
set_tolerances
()¶ Set solution tolerances.
Parameters:
-
solution
()¶ Returns solution component by its index.
Solution array depends on the used model, so no general description can be provided here. For advanced usage only.
Parameters: num (int) – Index of solution component to return. Returns: Value of solution component. Return type: float
-
solve
()¶ Integrate for current time to the provided time.
Notice that the solver will fail if xout is less than current step and no test is performed by this class.
Parameters: xout (float) – Coordinate of point to return solution. Returns: State of solution as defined by IDA constants. Return type: int


Code-IT
A community with a better vision
Code-IT
Signup here for joining Dev-hub Community
+977
Signup
Login
Forget?
By these you agree to our
Terms of Use


@* * Copyright 2023 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *@ @import uk.gov.hmrc.govukfrontend.views.html.components._ @import config.ApplicationConfig @this(gmpMain: gmp_main, govukPanel : GovukPanel, govukButton: GovukButton) @(bulkResultsSummary: BulkResultsSummary, uploadReference: String, comingFromPage: Int)(implicit request: Request[_], messages: Messages, ac:ApplicationConfig) @gmpMain(title = Messages("gmp.bulk.results.banner") + " - " + Messages("service.title") + " - " + Messages("gov.uk")) { @includes.back_link(Messages("gmp.bulk.results.banner")) @govukPanel(Panel( title = Text(Messages("gmp.bulk.results.banner")), content = Text(Messages("gmp.bulk.results.reference", bulkResultsSummary.reference)) ))


This is Data Visualization project of country population
Features:
1. Asking User to choose analysis of a single country or comparative analysis between two countries.
2. Even if user inputs name in lowercase or uppercase or capitalized form the program will visualize data easily.
3. Graphical
Analysis between two countries.
4. Population given in millions per year
5. Returning visual and well as textual data if user chooses for analysis of single country.
6. Retrieving data from a csv file using pandas library
Libraries and Tools Used:
1. Python
2. Python Libraries:
- pandas
- matplotlib
Important notes:
- the data is taken from a csv file named 'countries.csv' inlcuded in the current repository
- the population data is from 1950's to 2007
- some countries like north/south korea were not named at that time so before analysing data of such countries go through the csv file
To get more practical knowledge Click here.


We sell animals! Lion scottish fold tiger. Grimalkin bengal and egyptian mau and manx abyssinian devonshire rex bombay. Sphynx. Burmese lion malkin bobcat. Kitten savannah british shorthair. Tomcat turkish angora. American bobtail maine coon. Donskoy siberian. Text provided by catipsum!
This is our fav animal. We sell it for 1000€ and nothing less. Its an awesome animal!
This is our second fav animal. We sell it for 500€ and nothing less. Its an awesome animal!
This is our third fav animal. We sell it for 250€ and nothing less. Its an awesome animal!
This is our foruth fav animal. We sell it for 1€ and nothing less. Its an awesome animal!


OVERVIEW
I truly enjoyed building this online storefront with my teammate Claire Helland in the Moms Can Code School program (https://www.momscan.co/). This was an interesting assignment that incorporated marketing and design concepts into the development of an MVP for a fictional client.
UNDERSTANDING THE BUSINESS
We felt it was important to take time to really understand the buyer persona, customer journey and business before designing the site. This helped us keep both customer goals/use and business goals in mind during the planning process so we could deliver a relevant site experience that ultimately translates into sales and ROI for for the client.
CLIENT DESCRIPTION AND COMPETITORS
In a fictional interview*, our client described the business:
* This interview excerpt was provided to us as part of the assignment.
Buyer Persona
The typical customer is described in the buyer persona.
Competitors
Competitors include Vici Collection, Roolee, Shop Stevie, Ascot and Hart, and Jean Jail.
DESIGN TO DELIGHT
Site Mockup
At this point, it was time to build the webpage. Claire and I did a lot of pair programming (and Googling!), and we learned so much! We were so pleased with the results, but we had not yet learned about making websites accessible.
ACCESSIBILITY
After building the landing page for the online store, we ran a free, automated accessibility test through the Bureau of Internet Accessibility. Below are some graphics from the test results that summarize how our site fared.
The automated report also showed which WCAG 2.1 A/AA guidelines may have been violated, but it did not provide any more specific guidance on what aspect of the guideline was violated or how to fix the issues. Therefore, I researched each potentially violated guideline to determine what issues existed and wrote a report about my findings.
REFLECTIONS
What I Learned
Future Improvements
Since building this project, I have continued to expand my skills. With my current knowledge, I would like to improve this project in the following ways:
THE TEAM
Andrea Martz, M.A. (andreamartz) is a "jack of many trades" in the field of professional certification testing. Recently, she fell in love with coding, and she is currently building her full-stack web development skills. She is passionate about education for all people and service to marginalized and underrepresented communities.
Claire Helland (clairehelland) - Claire is a novice coder learning front-end development in the Moms Can & Co Coding program. She hopes to one day work up to being a full-stack developer, and her web design process is informed by a marketing and e-commerce career. Claire hopes to one day use her skills as a force for good in the world.


Uses http-vue-loader in order to avoid a build step. Also see the Vue documentation on single file components.
This example uses a custom VueJS component called <my-component> which is defined in the file my-compontent.vue
.
The custom component has two "props" (properties) that allow you to send data to it. These override the default greeting and name.
By passing msg.payload.greeting
and/or msg.payload.who
in the msg from Node-RED, you will see the text
change on-screen dynamically.
This text goes into the <slot> tags in the component. try removing this from index.html to see the default text.


Surrounds the expression with the
print
function for Python 3 or with the
print
statement for Python 2.


{: .-three-column}
{: .-prime}
{: data-line=“1,2”}
Most of what you need to do is to simply add annotations to function arguments!
See: flow.org docs
{: data-line=“2”}
result
is inferred to be a number because number * number
will result in a number. There's no need to give it annotations.
{: data-line=“1,2,3,4,5,6”}
{: data-line=“1”}
This is the typical way to define the shape of complex objects.
You typically don't need to do this, function args are often enough.
See: Variable types
See: Module types
See: Unions
{: data-line=“2”}
const a: Album = { } // ✗ Error
const a: Album = { name: 'Blue' } // ✓ OK
const a: Album = { name: null } // ✓ OK
const a: Album = { name: undefined } // ✓ OK
This makes name
either a string or null.
See: Maybe types
{: data-line=“2”}
const a: Album = { } // ✓ OK
a.name = 'Blue' // ✓ OK
a.name = null // ✗ Error
a.name = undefined // ✓ OK
This makes an Album
valid even if name
is not part of the keys. This is different from “maybe” types.
See: Optional properties
{: .-three-column}
{: data-line=“6”}
A type with more properties is “wider” and is a subtype of a “narrower” type.
See: Width subtyping
{: data-line=“1,4”}
{: data-line=“4”}
Exact object types prevent extra properties from being added to an object.
See: Exact object types
{: data-line=“2”}
See: Dynamic object keys
| Type | Description |
|---|---|
any |
|
boolean |
|
mixed |
|
number |
|
string |
|
void |
undefined |
null |
null (but not undefined) |
| — | — |
{a: Number} |
Object with a shape |
[any, number] |
Tuples (fixed-length arrays) |
| — | — |
Array<T> |
|
Class<T> |
|
Function |
|
Object |
|
| — | — |
?number |
Maybe (number, void, null) |
a | b |
Union types |
type Suit = "Diamonds" | "Clubs" | "Hearts" | "Spades"
const countries = {
US: "United States",
IT: "Italy",
FR: "France"
}
type Country = $Keys<typeof countries>
See: Enums
type Tree = {
foo: string,
bar: number,
qux: (foo: string, bar: number) => boolean
}
type Generic<T> = {
foo: T
}
See: Type aliases
class GenericClass<T> {
x: T
constructor (x: T) { ... }
}
var n: GenericClass<number> = new GenericClass(0)
See: Generic classes
See: Interfaces
See: Functions
type Props = {
bar: number,
}
type State = {
open: boolean,
}
class Foo extends React.Component<Props, State> {
// Component code
}
var myNumbers: Array<number> = [42]
function foo(): any { return 42 }
var b: boolean = false
var b: ?boolean = false /* maybe */
var b: string | boolean = false
var a: Class<MyClass> = MyClass
var b: MyClass = new a()


30th NA-MIC Project Week
- Date January 28- February 01, 2019
- Venue Gran Canaria - Canary Islands
-
National Alliance for Medical Imaging Computing
NA-MIC 30th Project Week January-February 2019.
-
Ron Kikinis - Tina Kapur
Harvard Medical School
Surgical Planning Laboratory
Brigham and Women's Hospital -
Juan Ruiz Alzola
Universidad de Las Palmas de Gran Canaria
Instituto de Astrofísica de Canarias
NA-MIC welcomes Africa in Gran Canaria.
Making our global community even wider!!!
The Canary Islands, Spain
The European Union outpost to Africa
A tricontinental platform on the Atlantic Ocean
2.1M residents welcomed 16M visitors in 2017
A World-class destination for business, logistics and leisure!!!
A HUB for cooperation on the Atlantic Ocean
- Madrid1.700 Km
- Barcelona: 2.200 Km
- Paris: 2.700 Km
- London: 2.900 Km
- Brussels: 3.000 Km
- Rome: 3.000 Km
- Amsterdam: 3.200 Km
- Berlin: 3.600 Km
- Helsinki: 4.700 Km
- Cayenne: 4.700 Km
- Agadir 600 Km
- Rabat: 1.000 Km
- Nouakchot: 1.100 Km
- Dakar: 1.500 Km
- Praia: 1.700 Km
- Bamako: 1.900 Km
- Conakry: 2.000 Km
- FreeTown: 2.200 Km
- Niamei: 2.400 Km
- Monrovia: 2.500 Km
Macaronesia: Land of Happiness. Archipelagos of
Canary Islands, Azores, Madeira, Cape Verde.
Gran Canaria, Gorgeous Nature
Committed to Sustainable Development
Universidad de Las Palmas de Gran Canaria
-
Community
23.000 students / 1.600 faculty members 15 schools / 40 degrees / 33 masters / 13 PhD. programs -
Research
11 Research Institutes / Collaboration with European & International Universities and Research Centers -
Cooperation for Development
Africa and Latin America
Las Palmas de Gran Canaria
A wonderful city ...
...open to the World
Looking Forward, Looking Further
Promoting an International Hub, model of reference
We aim at developing an international hub for medical technology and training, adapted to the needs of developing countries, which serves as a global model of reference.
A global network
NA-MIC + Parallel event with our African partners (physicians, engineers and academics) to introduce them to NA-MIC technology and explore synergies.
Canary Islands HubCharming
Vegueta
Fascinating
History
Challenging
City
Attractive
Magic
Close
To everywhere
Relaxing
City beaches
Welcome to NA-MIC
National Alliance for Medical Imaging Computing
Project Week 30 NA-MIC - Las Palmas de Gran Canaria
Register
Discover Las Palmas
- Density: 3.755,84/km2
- Population: 377.650
- Website: Las Palmas de Gran Canaria
There are many reasons to visit Las Palmas de Gran Canaria. Las Palmas hosts a diverse range of people and cultures. A world class tourism destination and sea port, with a strategic location. It is the perfect place to create a professional hub, close to African countries.
Recommended hotels: Hotel Iberia Hotel Parque


Berlioz Hello World.py
v3.load-balancer
{% include 'parts/environment.html' %}
{% include 'parts/app-peers.html' %}
{% include 'parts/app-response.html' %}
{% include 'parts/head.html' %}


| Arg | Type | Notes |
| value | float | The value to clamp. |
| min | float | The minimum possible value. |
| max | float | The maximum possible value. |
| wrap | int | If the value should wrap. Example: 450 clamped between 0 and 360 with wrap would be 90. |
| Arg | Type | Notes |
| degrees | float |
| Arg | Type | Notes |
| x0 | float | |
| y0 | float | |
| x1 | float | |
| y1 | float |
| Arg | Type | Notes |
| from | float* | |
| to | float* |
| Arg | Type | Notes |
| matrix | float* |
| Arg | Type | Notes |
| matrix | float* | |
| width | int | |
| height | int |
| Arg | Type | Notes |
| matrix | float* | |
| x | float | |
| y | float | |
| z | float |
| Arg | Type | Notes |
| matrix | float* | |
| x | float | |
| y | float | |
| z | float |
| Arg | Type | Notes |
| x0 | float | |
| y0 | float | |
| x1 | float | |
| y1 | float |
| Arg | Type | Notes |
| radians | float |


Interface: tos.chips.rf230.RadioReceive
interface RadioReceiveEvents
event bool header(message_t *msg)
event message_t *receive(message_t *msg)
Events - Details
header
event bool header(message_t *msg)
receive
event message_t *receive(message_t *msg)


Home
Courses
Contact
Sign Up
Login
Previous
Next
Name
Track
Web
Game
AI
Email address
Phone number
Submit


{% block content %}
Use {{ home }} as your levelup username. Make sure you save this username for future uses.
Click here to register for an account.


| Package | Description |
|---|---|
| com.peterverzijl.softwaresystems.qwirkle | |
| com.peterverzijl.softwaresystems.qwirkle.gameengine |
| Modifier and Type | Method and Description |
|---|---|
Vector2 |
Node.getPosition() |
| Modifier and Type | Method and Description |
|---|---|
void |
Board.boardScale(Vector2 aPosition)
Scales the board based on the extreme positions found during the game.
|
Node |
Board.findDuplicateNode(Vector2 aPosition,
Direction aDirection)
Searches the frontier list of empty nodes for a node with the same position.
|
static int |
Direction.getDirection(Vector2 aNode,
Vector2 anotherNode) |
| Modifier and Type | Method and Description |
|---|---|
Vector2 |
Vector2.add(float x,
float y)
Adds the two given components to the vector.
|
Vector2 |
Vector2.add(Vector2 vector)
Adds one vector to the calling vector.
|
Vector2 |
Vector2.clone()
Returns a copy of the current vector.
|
static Vector2 |
Vector2.lerp(Vector2 v1,
Vector2 v2,
float t)
Interpolates linearly between two points.
|
Vector2 |
Vector2.multiply(float scalar)
Multiplies the vector by a scalar.
|
Vector2 |
Vector2.normalized()
Returns a normalized copy of the vector.
|
static Vector2 |
Vector2.RIGHT() |
static Vector2 |
Vector2.slerp(Vector2 v1,
Vector2 v2,
float t)
Returns a spherically interpolated vector at point t.
|
Vector2 |
Vector2.subtract(float x,
float y)
Subtracts the two given components to the vector.
|
Vector2 |
Vector2.subtract(Vector2 vector)
Subtracts one vector to the calling vector.
|
Vector2 |
Vector3.toVector2()
Converts the Vector3 to a Vector2
|
static Vector2 |
Vector2.UNITY() |
static Vector2 |
Vector2.UP() |
static Vector2 |
Vector2.ZERO() |
| Modifier and Type | Method and Description |
|---|---|
Vector2 |
Vector2.add(Vector2 vector)
Adds one vector to the calling vector.
|
static float |
Vector2.dot(Vector2 v1,
Vector2 v2)
Returns the dot product of two vectors.
|
boolean |
Vector2.equals(Vector2 vector)
Checks if two vectors are equal to another.
|
static Vector2 |
Vector2.lerp(Vector2 v1,
Vector2 v2,
float t)
Interpolates linearly between two points.
|
void |
Vector2.set(Vector2 newPosition)
Sets the position of the old vector to the new one.
|
static Vector2 |
Vector2.slerp(Vector2 v1,
Vector2 v2,
float t)
Returns a spherically interpolated vector at point t.
|
Vector2 |
Vector2.subtract(Vector2 vector)
Subtracts one vector to the calling vector.
|
| Constructor and Description |
|---|
Vector2(Vector2 vector)
Creates a copy of the given vector.
|
Vector3(Vector2 vector)
Creates a copy of the given Vector2.
|


The concept of relevant vocabularies extends the concept of stratification. Both allow extending EPR with more ground terms (including some functions) while remaining decidable.
Following Ge and de Moura, we will define a relevant vocabulary for every universal quantifier and for each argument of every uninterpreted function or predicate symbol. The idea is that, if we instantiate each universal quantifier with just the ground terms in its relevant vocabulary, then any model of these instances can be converted to a model of the original formula. If the relevant vocabulary is finite, the formula is in the decidable fragment.
To determine the relevant vocabularies, we have a set of rules that depend on the formula. We will say that V[X]
is the relevant vocabulary of universally quantified variable X
and V[f,i]
is the relevant vocabulary of argument i
of uninterpreted function or predicate symbol f
. The rules are in one of two forms:
- If vocabulary
V
contains termt
then vocabularyW
contains termu
, or - Vocabulary
V
equals vocabularyU
.
The relevant vocabularies are the least ones that satisfy all the rules. To express the rules, we use t[X1...XN]
to stand for a term with free variables X1...XN
(so if N=0, it is a ground term). We use t[V1...VN]
to stand for any instantiation of t
using the
vocabularies V1...VN
.
For first-order logic, we have the following rules:
- if
t[X1...XN]
is thei
th argument off
, every instancet[V[X1],...,V[X1]]
is inV[f,i]
- if universal variable
X
is thei
th argument off
, thenV[X] = V[f,i]
.
To handle equality, we introduce a vocabulary V[t]
for each type t
and add these rules:
- If
X:u = e
ore = X:u
occurs, thenV[X] = V[u]
, - If
t[X1...XN]:u = e
ore = t[X1...XN]:u
occurs then every instancet[V[X1],...,V[XN]]
is inV[u]
.
Finiteness and cycles
To determine if the relevant vocabulary is finite, we don't need to compute it. It suffices to determine if the rules create a cycle that can generate an infinite set of terms. To do this, we build a graph whose nodes are vocabularies and whose arcs are defined by the
following rules:
| term | arc(s) |
|---|---|
f(..,X,..) |
V[X] <-> V[f,i] |
f(..,t[..,X,..],..) |
V[X] -> V[f,i] |
X:u = e |
V[X] <-> V[u] |
t[...,X:u,...] = e |
V[X] -> V[u] |
Where i
is the relevant argument position in f
and x = y
is considered equivalent to y = x
.
Ivy constructs this graph for each negated VC. If the graph has a cycle, Ivy reports the sequence of terms that induced the cycle (and gives references to line numbers in the Ivy program). This information can be used to determine the source of the problem and and correct it.
Examples:
Example: finite relevant vocabularies, without equality rules
Consider the conjunction of the following formulas:
r(f(a),c)
forall X. r(f(X),X)
The relevant vocabularies are:
V[f,1] = {a,c}
V[r,1] = {f(a),f(c)}
V[r,2] = {a,c}
V[X] = {a,c}
We can arrive at this result by just applying the rules until we reach a fixed point. From the first rule, we have V[f,1] = {a}
and V[r,2] = {c}
. Then, from the second rule, because X occurs in argument position 1 of f and 2 of r, we have V[f,1] = V[r,2] = V[X] = {a,c}
. The first rule then gives us V[r,1] = {f(a),f(c)}
and we have reached a fixed point.
Since the relevant vocabularies are finite, this conjunction is in the decidable fragment.
Example: finite relevant vocabularies, with equality
Suppose f
is a function from u
to u
and we have this conjunction:
f(a) = c
forall X. r(f(X),X)
The relevant vocabularies are:
V[u] = {f(a),c}
V[f,1] = {a}
V[r,1] = {f(a)}
V[r,2] = {a}
V[X] = {a}
That is, even though the function f
is not stratified, we still need only a finite instantiation to determine satisfiability of this formula. It is easy seen, however, that all the stratified formulas have finite relevant vocabularies.
Example: infinite (cyclical) relevant vocabulary
As an example, consider the following formula:
forall X. r(X,a) -> r(f(X),X)
There is a cycle V[X] -> V[f,1] -> V[r,1] -> V[X]
induced by these terms:
f(X)
r(f(X),X)
r(X,a)


{% extends "mails/messages/participant_base.html" %} {% load i18n %} {% block message %} {% blocktrans with manager=obj.activity.owner.full_name context 'email' %}
Good news, you have been accepted for the activity "{{ title }}"!
{{ manager }}, the activity manager, will follow-up with more info soon.
{% endblocktrans %} {% endblock %}


The Tantarabim Carton was recovered from an old potting shed by Dobson, during one of his forays into what he called anarcho-'patapsychoarchaeolontology. It is a ceremonial carton which was used for unknown purposes during ceremonies prosecuted by the Bleach-Splattered Tantarabim Priesthood. Grim and horrifying these rituals may have been, but not the carton. It is 45 cm. in height, has a jewel-encrusted crimplene base, ivory fluting, ruched silk underbelts, hectic trimmings, a delightful milky-green ribbed spandole, villainous scraping marks, a gutta percha rim, opalescent bison-head motifs, swivelling glutinous beads inlaid with serried gems, fleur-de-lys hatching, precise web-and-tuck dufraiment, talc stipples, a riband nightside opening on the velveteen casing, some rather brusque kaolin relief work, tiny cack-iron clips, berry lagging, a splendid gilt Spode handle, and corky frets on the oversling. No picture is available.
Dobson tried to present his find to an art gallery somewhere on the hard, unyielding banks of a river in Yukon Country, but he was chased away by burly men with bludgeons, and was lucky to escape with his life. He subsequently wrote up the episode in his pamphlet Chucklesome Fripperies From My Notebooks (Lavender Series).


{% extends "_layouts/base.html" %} {% block title %}Register | {{ config.EVE.auth_name }}{% endblock %} {% block content %}
Please pick a character to become your main identity (this is changeable but your username won't).


You can tell that the server has launched if you see the following message in the shell window:
!!!!!!!!!!!!!!
NOTE: CLOSING THIS WINDOW WILL
STOP THE MAQETTA SERVER PROCESS
!!!!!!!!!!!!!
Using directory: .....
osgi>
The Maqetta app should appear in the browser when loading the URL.
The Maqetta server will continue to run until you close the shell window that comes up after you double-click on the server launch file.
Therefore, if you close the shell window, the Maqetta server process will stop running,
at which point you can't run http://localhost:50000/maqetta anymore.