Go back to leads
This is the detail of {{ lead.first_name }} {{ lead.last_name }}
This person's age : {{ lead.age }} ans.
The agent responsable for this lead is : {{ lead.agent }}
Update
Delete


Requiring login or account creation too early in a site experience can be detrimental to conversion.
Before offering their personal information, users want to browse content and get a sense of what a site has to offer. In the study, many of the sites that participants rated the lowest were those where they were forced to create an account upfront in order to continue.
Offer the option to check out as a guest, and encourage registration with tangible benefits.
In a research study, participants didn’t necessarily want to commit to creating an account with the retailer. Participants described the guest checkout as "convenient", "simple", and "easy [and] quick". They were annoyed at a site that required registration to purchase, especially since the site didn’t explain how registration would benefit them.
Offer an easy way to save or share information across devices, for example provide a way for users to share items across social networks or to email a link directly within the site itself.
There are many reasons a user might want to finish a task on another device, perhaps to see it on a bigger screen, or they get distracted and want to pick it up later. For instance, a career site allowed participants to email themselves jobs to apply for later.
Take advantage of information you already have, and/or use third-party payment services to make conversion as easy as possible.
For your registered users, remember and pre-fill their preferences. For new users, offer a third-party checkout service they may already use. Several retail sites in the study offered third-party payment services as an option, reducing purchasing friction for users of those services and allowing the site to prefill shipping info.
At a glance, you make ad spaces (also known as ad inventory) available on your site. Advertisers bid to show their ads on your site and the highest bid wins. You get paid when users click on the ads.
This guide covers the basics of how ads work, but to learn more, refer to the Google AdSense and Google DoubleClick help centers.
There are many ad serving platforms available, and choosing the one that is right for you is important. We recommend the Google AdSense platform for most sites; it’s free use and available to almost any site. The DoubleClick platform is best for sites with their own advertising teams.
Google AdSense is a free, simple way for sites of all sizes to earn money by displaying targeted ads. AdSense shows ads that are relevant to your users with automatic targeting. You do not need to manage inventory or advertiser relationships, AdSense gives you instant and automatic access to a huge source of advertiser demand.
AdSense also provides you with the tools you need to be successful, including:
In addition, AdSense provides the ability to choose from a variety of ad sizes and formats, including responsive ads that serve the right sized ad for responsive sites.
DoubleClick for Publishers is an ad management platform that helps sites sell, schedule, deliver, and measure all of their ad inventory. Sites can reserve some, or all of their inventory for ads from their own dedicated advertising sales teams or auction-based services like AdSense or AdExchange.
Place ads where they are visible, but don’t detract from the main user experience.
For example, 320×100px ads may be interspersed through list content, articles may include a 300×250px ads, and long form content may include a combination of ads. Refer to Best practices for ad placement in the AdSense help for further details.
For the most flexibility, use responsive ads. Responsive ads are automatically sized based on the user’s device.
It may be necessary to use statically sized ads, in this case, refer to the Guide to ad sizes.
To maximize the ad inventory available to you, be sure to choose both text and display ads.
In many cases, you have control over the color, font, and font-sizing for text ads. Choose styles that match or contrast the styles on your site.
For example, you can change the color of URL text so that users see clearly where the link will take them.
Google AdSense automatically delivers ads that are targeted to your content or audience. This is done in several ways:
The ad auction is used to select the ads that will appear on your pages and determine how much you’ll earn from those ads. In a traditional auction, interested bidders state the maximum price they’re willing to pay to buy a specific item. Similarly, our ad auction allows advertisers to state the price they’re willing to pay for clicks on ads or for impressions served on AdSense pages.
Follow the steps in this guide to learn how to include ads in your site. Create an AdSense account, create ad units, place the units in your site, configure payment settings, and get paid.
In this walk-through, you’ll build a simple page that includes responsive ads using Google AdSense and the Web Starter Kit:
If you’re unfamiliar with the Web Start Kit, refer to the Set Up Web Starter Kit documentation.
In order to include ads in your site and get paid, you’ll need to follow these simple steps:
In order to serve ads on your site, you’ll need an active AdSense account. If you don’t already have one, you’ll need to create one and agree to the AdSense terms of service. When you create your account, you’ll need to verify:
An ad unit is a set of ads that are displayed on your page as a result of JavaScript you add to your page. You have three options for sizing your ad units:
You are building a responsive site; use responsive ad units. Responsive ads automatically resize based on the size of the device and the width of the parent container. Responsive ads work in line with your responsive layout, ensuring your site looks great on any device.
If you don’t use responsive ad units, you will have to write a lot more code to control how ads appear based on a user’s device. Even if you must specify the exact size of your ad units, use responsive ad units in advanced mode.
To make your code simpler and save you time and effort, the responsive ad code automatically adapts the ad unit size to your page layout. The code calculates the required size dynamically based on the width of the ad unit’s parent container, then picks the best-performing ad size that fits in the container. For example, a mobile-optimized site with a width of 360px might show a 320x50 ad unit.
Track the current top performing ad sizes in the Google AdSense Guide to ad sizes.
After creating your ad unit, AdSense provide a snippet of code to include on your site, similar to the code below:

Note
data-ad-client
and data-ad-slot
will be unique for each ad you generate.data-ad-format=auto
tag in the generated ad code enables the smart sizing behavior for the responsive ad unit.To include the ad on the page, we need to paste the provided AdSense snippet into our markup. If you want to include multiple ads, you can either re-use the same ad unit, or create multiple ad units.
Remember
Wondering when your AdSense payment will arrive? Trying to figure out whether you’ll be paid this month or next month? Be sure you’ve completed all of the steps below:
Refer to Intro to AdSense payments for any additional questions.
The best ads can improve user experience. While the actual ad content comes from advertisers, you have control over the content type, color, size, and placement of those ads.
When it comes to deciding where to place ads on your site, and how many ads to include, always put the user first!
Sample placement options for mobile ads:
For more information, review the AdSense best practices for ads placement.
In some cases, you may need more control over the way your ads are displayed than simply using responsive ads. In this case, you can switch to advanced mode and override smart sizing in your responsive ad unit code. For example, you can control the exact sizing of ads using media queries:

See advanced features in the AdSense help for more information.
Important
The most successful ads blend or contrast your site’s styles. Google AdSense provides a set of predefined ad styles; choose the style that best fits your site or create your own.
You can customize any of the following styles in text ads:
When creating a new unit, you can apply a different style to text ads by expanding the Text ad style property:
All text ads use the Google AdSense Default style. You can use any of the predefined style as is, make slight changes to the style, or create, your own custom style.
Once you’ve saved a new style, you can apply it to any of your existing or new ad units:
When you change an existing ad style, any active ad units using that style are automatically updated.
Note
Optimizing your ads and site is crucial when it comes to the success of your goals. Through optimization, you can help grow your ad revenue, improve usability of your site, get more traffic or accomplish any of your other goals.
Want to get better results with AdSense ads and make sure that you give your users what they want while getting what you want? Need some inspiration? Check out these tips from AdSense specialists who have worked with publishers of all sizes.
Note: while this article focuses on AdSense, the concepts apply to any ad provider.
robots.txt
.Use the scorecard on the Home tab of your account to check how well your ad settings, webpages and content are performing compared to those of other AdSense publishers.
Scorecard is organized into different categories (revenue optimization, site health, etc.), provides a score of one to five blue dots. Each score indicates the ranking relative to other publishers in that particular category. While a lower score in a category means there are potential areas for improvement, pay special attention to items flagged with a red or yellow exclamation mark.
The Recommendation box on the Home tab offers recommendations how your site could be changed to earn more revenue. These recommendations are based on analyzing the performance of recommendations that have been recently implemented by other AdSense publishers and are only provided when there is a high confidence of increased performance.
Learn more
Review about the scorecard and the recommendation box in AdSense help.
Use the Google AdSense Performance reports tab to see how much you’re earning, what impacts those earnings, and graphs to chart trends over time.
Use the reports below to get started:
In addition to performance reports, AdSense can send occasional customized help and performance report suggestions by email. To sign up, verify your email address in Personal settings, and check the Customized help and performance suggestions checkbox under Email preferences.
Learn more
Learn more about performance reports in AdSense help.
The higher the competition, or ‘auction pressure’, the more the advertiser will pay to be viewed and clicked on your site. To maximize your bidding potential:
Note: this information is also included in the publisher scorecard, but it’s crucial to strong ad performance!
Verify that the robots.txt file on your site doesn’t block the AdSense crawler. AdSense needs to be able to process and index the content of web pages and uses the AdSense crawler to visit your site and determine its content. This allows AdSense to provide relevant ads.
To update the robots.txt
file to grant the AdSense crawler access to your pages, remove the following two lines of text from your robots.txt
:
User-agent: Mediapartners-Google
Disallow: /


Hong Kong cop hit with arrow in leg as sonic crowd control device deployed outside university campus
by Holmes ChanA police officer was hit by an arrow on Sunday outside the Hong Kong Polytechnic University (PolyU) as violent clashes broke out between pro-democracy protesters and law enforcement.
Police deployed tear gas, projectiles, and fired blue dye from water cannon trucks.
For the first time, the force also used a device mounted on an armoured truck to emit high-pitched noises – which police later identified as a “Long Range Acoustic Device” (LRAD).
The Hung Hom campus of PolyU has seen pitched battles between protesters and police since Tuesday.
The campus is close to the toll plaza of the Cross-Harbour Tunnel, enabling protesters to block the major crossing for days.
On Sunday, police said a member of its media liaison team – typically dressed in a blue vest – was “struck in the calf by an arrow” at around 2pm.
The officer was taken to the hospital in a conscious state.
Another officer’s visor was struck by a metal ball, though it did not result in injury, the force added.
“Police warn that the violent activities in the Hong Kong Polytechnic University have escalated to rioting. Anyone who stays behind or assists rioters may be liable to the offence of ‘Taking Part in a Riot’,” the police said in a statement.
Anyone convicted of rioting can be penalised by up to 10 years in jail.
Police have condemned protesters for using “lethal weapons” against officers, including petrol bombs, bows, arrows, bricks and metal balls.
The intersection of Chatham Road South and Cheong Wan Road has been the site of intense fighting, with police firing blue liquid from water cannon trucks and volleys of tear gas.
Protesters also threw objects from an elevated position inside the campus and launched projectiles with a makeshift catapult.
Sonic device ‘not weapon’
At around 2:30pm, police used a sonic device mounted on top of an armoured truck. Prior to that, officers warned protesters over a loudspeaker that lethal force may be used.
The City Broadcasting Channel – a new outlet run by students from the City University of Hong Kong – reported that the sonic device was used for about three seconds and caused slight discomfort to its reporter.
Apple Daily said that its reporter heard three seconds of a “loud, shrill noise” similar to a car alarm.
In a statement, police stressed that the Long Range Acoustic Device was a “broadcasting system but not a weapon.”
“Using the LRAD is to convey important messages over a long-range in a noisy environment,” the force said. “Unlike what is said in individual media reports, the LRAD does not generate ultra-low frequency which will cause dizziness, nausea or loss of sense of direction.”
The force has strict guidelines and regulations on the use of the LRAD, the statement added.
Hong Kong Free Press relies on direct reader support. Help safeguard independent journalism and press freedom as we invest more in freelancers, overtime, safety gear & insurance during this summer’s protests. 10 ways to support us.


Approve Notifications
Push Flu Notification
Push Refill Warning.
Notification states
Primary - This is a regular notification made with ".alert-primary"
Info - This is a regular notification made with ".alert-info"
Success - This is a regular notification made with ".alert-success"
Warning - This is a regular notification made with ".alert-warning"
Danger - This is a regular notification made with ".alert-danger"


Prices and supply vary by location and event. Tax is included in all menu prices. US Dollars are the ONLY accepted currency at any of our locations


OsmAnd iOS 1.0
May 19, 2015
We are glad to announce that iOS version of OsmAnd is becoming better over time. We put significant efforts and managed to finish lots of useful features in a short period of time. Here is the short list of achievements.
- We significantly improved the responsiveness of the map interaction.
- OsmAnd Maps now is also available for iPad.
- We added translations to Russian, German, Danish, French, Spanish and other languages (thanks to our great community).
- Parking Position and Trip Recording addons were added to the application. Please feel free to use them without charge
- In the new version you will be able to search a location by simply put the url or enter the coordinantes in the search text box.
- And lots of other minor and useful improvements.


Special Notes on Feb. 28, 2019
| Date: | Feb 28, 2019 |
|---|---|
| Last Updated: | Feb 28, 2019 |
| Categories: | |
| Tags: |
Contents
Introduction
In this article, we would discuss the non-negative constrained least length problem. Due to the limitation of time, we only discuss the simplified form of this problem. The solution of this problem is derived from applying non-negative least squares algorithm.
KT conditions
Check here to see Karush–Kuhn–Tucker conditions in Wikipedia.
To solve this problem, first we need to introduce the Kuhn-Tucker (KT) theorem (or KT conditons). We use $\mathbf{a} \succ \mathbf{b}$ to represent $\forall~i,~a_i > b_i$. Consider that we have such a problem
where $\mathbf{Hx} \succeq \mathbf{h}$ defines a group of constraints that
where each row is a constraint.
Consider that
If we could find a $\mathbf{z}$ that is non-negative, then we could divide it into two parts:
We call $(4)$ “KT conditions”, which means for the solution, if a constraint is satisfied on the boundary, the gradient descent direction in this dimension would be opposite to the feasible domain. If a constraint is satisfied loosely (where $\mathbf{H_S x} \succ \mathbf{h}_S$), in this dimension the solution could converge to minimum.
The proof of KT conditions is complicated, although KT conditions could demonstrated by the geometric meaning clearly. Here we would not discuss the theory on this issue, but just use KT conditions as a tool. If we could find a solution which could satisfy the KT conditions, then we would know that this is the exact solution of the non-negative constrained problem.
Non-negative least squares algorithm
Theory of the solution
Consider we have such a simplified form
where we let $\mathbf{H}=\mathbf{I}$, and $\mathbf{h} = \mathbf{0}$. Then consider that
And we also have $\mathbf{H}_S \mathbf{m} = \mathbf{m}_S \succ \mathbf{0}$. Here $\mathbf{H}$ serves as a selector which extract indexes from $\mathbf{m}$ to get $\mathbf{m}_E,~\mathbf{m}_S$ respectively.
Then we could rewrite $(3)$ as
Hence we have
From $(8)$ we could learn that for the solution, on the boundary $\mathbf{m}_E$, the gradient ascends with $\mathbf{m}_E$. In the feasible region (not on the boundary), the gradient is $\mathbf{0}$. Which indicates for a solution $\mathbf{m}$, if $m_i=0$, since $\frac{\partial E}{\partial m_i} > 0$, if we want to decrease $E$, the constraint would be violated. If $m_i > 0$, it has been on the minimum and could not be optimized. Hence such a $\mathbf{m}$ should be the exact solution.
Algorithm
In practice, to get the correct solution, we may perform such an algorithm:
- Initialization: $\mathbf{m}=\mathbf{0}$. Now we could find that all $m_i \in \mathbf{m}$ is in equality sense, i.e. $m_i \in \mathbf{m}_E$.
- If all $m_i \in \mathbf{m}_E$ satisfies that $\frac{\partial E}{\partial m_i} \geqslant 0$, current $\mathbf{m}$ would be the final solution.
- If ther is any $m_i \in \mathbf{m}_E$ that makes $\frac{\partial E}{\partial m_i} < 0$, choose an $i$ with the minimal gradient $\frac{\partial E}{\partial m_i}$, and move $m_i$ into $\mathbf{m}_S$.
- Extract the index $S$, then solve the least square problem for a part of parameters: $\mathbf{G}_S \mathbf{m}_S = \mathbf{d} - \mathbf{G}_E \mathbf{m}_E = \mathbf{d}$. Mark the solution as $\mathbf{m}^{\dagger}_S$.
- If $\mathbf{m}^{\dagger}_S$ is still in the feasible domain (including the boundary), let $\mathbf{m}_S = \mathbf{m}^{\dagger}_S$ update the boundary set $\mathbf{m}_E$ and return to step 2.
- If $\mathbf{m}^{\dagger}_S$ is not in feasible domain, find the maximal $\alpha$ that enables $\mathbf{m}_S = \mathbf{m}_S + \alpha (\mathbf{m}^{\dagger}_S - \mathbf{m}_S)$ to be still in the feasible domain. Actually $\alpha = \min\limits_i \left[ \frac{m_{S_i}}{m_{S_i} - m^{\dagger}_{S_i}} \right]$. Since both $\mathbf{m}_S,~\mathbf{m}^{\dagger}_S$ are in feasible domain, the updated solution would still lie in the feasible domain. Since the updated result would be more close to the local minimum, after the update the function $E$ would decrease. After this step, we should get at least one element $m_i$ that falls back to the boundary from the feasible domain. So we need to update $\mathbf{m}_E$. Return to step 2.
Non-negative constrained least length problem
Consider a more complicated problem
Approach
To solve this problem, we need to substitute that $\mathbf{d} = \begin{bmatrix} \mathbf{0} \\ 1 \end{bmatrix}$, $\mathbf{G} = \begin{bmatrix} \mathbf{H}^T \\ \mathbf{h}^T \end{bmatrix}$ in $(5)$. Then we have
Note that here $\mathbf{m}$ is different from $\mathbf{x}$. Consider $\mathbf{H}_{P \times N}$, where $N$ is the dimension of $\mathbf{x}$, hence we know that $\mathbf{G} = \begin{bmatrix} \mathbf{H}^T \\ \mathbf{h}^T \end{bmatrix}$ has $N+1$ rows and $P$ columns, and $\mathbf{m}$ is a $P \times 1$ vector. However, $\mathbf{e},~\mathbf{d}$ are $(N+1) \times 1$ vectors. If we solve $(10)$ like what we have done for $(5)$, we could get the solution that $x_i = -\frac{e_i}{e_{N+1}}$.
Proof
To prove that why we could use $(10)$ to solve $(9)$, we need to assume that the final solution is $\mathbf{x}$ which needs to satisfy the KT conditions. But at first we need to consider the KT conditions for the final solution $\mathbf{m}$. In the following part, all parameters we are talking about are the converged ones when we get the final solution.
Then we know that
We have already known that $\frac{1}{2} \nabla E = -\mathbf{G}^T (\mathbf{d} - \mathbf{G}\mathbf{m}) = - \mathbf{G}^T \mathbf{e}$, hence we know
Note that if $E=0$, we would have $\mathbf{e}=\mathbf{0}$, which means $\mathbf{Hm} = \mathbf{0}$ while $\mathbf{h} \npreceq \mathbf{0}$. Then this situation is contradict to $\mathbf{Hm} \succ \mathbf{h}$. We would know that there should be $E = e_{N+1} > 0$.
Recall that $x_i = -\frac{e_i}{e_{N+1}}$, i.e. $e_i = -x_i e_{N+1}$, hence we have
Because we have known that $\nabla E_E \succ 0$ and $\nabla E_S = 0$. It is obvious that the whole gradient $\nabla E \succeq \mathbf{0}$. Hence
Because $e_{N+1} > 0$, $\mathbf{H}\mathbf{x} - \mathbf{h} \succeq \mathbf{0}$, which indicates that our solution is exactly in the feasible domain.
Remove the last element $e_{N+1}$ from $\mathbf{e}$, we have $\mathbf{e}_{N} = \begin{bmatrix} e_1 \\ e_2 \\ \cdots \\ e_N \end{bmatrix} = -\mathbf{H}^T \mathbf{m}$. Then let us consider the gradient of the length function $L(\mathbf{x})$,
Compare to $(3)$, we know the gradient could be described by non-negative combination of rows from $\mathbf{H}$, which means we could define that $\mathbf{z} = \frac{\mathbf{m}}{e_{N+1}}$. To be emphasized, $e_{N+1} > 0$, hence we know $\mathbf{z}$ has the same sign compared to $\mathbf{m}$,
Then, recall that
Since $e_{N+1} > 0$, $\mathbf{H}\mathbf{x} - \mathbf{h}$ has the same sign compared to $\nabla E$. Recall $(11)$, we could rewrite the equations as
Therefore, we know that
Compared to $(4)$, we may find that this solution has a pair of reversed subscripts, because the $E$ and $S$ here are used to describe $\mathbf{m}$. In fact, when $\mathbf{m}$ gets the boundary, $\mathbf{x}$ is inside the domain, vice versa. Remember to exchange the subscripts if we want a coherent form of the solution.
These are the KT conditions. which means the solution defined in $(16)$ exactly satisfies the KT conditions. In conclusion, $\mathbf{x} = \mathbf{H}^T \frac{\mathbf{m}}{1 - \mathbf{h}^T \mathbf{m}}$ is exactly the solution of the non-negative constrained least length problem.


+ Create
Project Title
Description
Sunday
Monday
Tuesday
Wednesday
Thursday
Friday
Saturday
Add Event
Add


The bidi
package provides a common system for components to get and respond to change in the
application's LTR/RTL layout direction.
When including the CDK's BidiModule
, components can inject Directionality
to get the current
text direction (RTL or LTR);
@Component({ ... })
export class MyWidget implements OnDestroy {
/** Whether the widget is in RTL mode or not. */
private isRtl: boolean;
/** Subscription to the Directionality change EventEmitter. */
private _dirChangeSubscription = Subscription.EMPTY;
constructor(dir: Directionality) {
this.isRtl = dir.value === 'rtl';
this._dirChangeSubscription = dir.change.subscribe(() => {
this.flipDirection();
});
}
ngOnDestroy() {
this._dirChangeSubscription.unsubscribe();
}
}
Dir
directive
The BidiModule
also includes a directive that matches any elements with a dir
attribute. This
directive has the same API as Directionality and provides itself as Directionality
. By doing
this, any component that injects Directionality
will get the closest ancestor layout direction
context.
auto
value
The CDK also supports the native auto
value for the dir
attribute, however there's a difference
in how it is interpreted. Some parts of the CDK, like overlays and keyboard navigation, need to know
if the element is in an RTL or LTR layout in order to work correctly. For performance reasons, we
resolve the auto
value by looking at the browser's language (navigator.language
) and matching
it against a set of known RTL locales. This differs from the way the browser handles it, which is
based on the text content of the element.


“Because he's the hero Gotham deserves, but not the one it needs right now. So we'll hunt him. Because he can take it. Because he's not our hero. He's a silent guardian, a watchful protector. A dark knight.”
Batman Rogues Gallery
The Rogues Gallery is the term for the various villains that Batman has faced over the years. These have ranged from costumed villains like the Joker and Two-Face, crime bosses like Rupert Thorne,Sal Maroni, and Carmine Falcone, to lesser known foes such as Magpie and Humpty Dumpty.


Binary compatibility
We will not worry about maintaining binary compatibility with the
client APIs between different versions of OW, since it is trivial to
solve the problem by installing 2 or more different versions of the
client libraries. This is just an issue for package developers to
provide some way for multiple versions of the client libraries to be
installed simultaneously. Note that we do try hard to maintain
source compatibility for client applications, if at all possible we
mark interfaces as deprecated when a replacement has been created. They
are deprecated for at least one release and then removed after client
applications have had a chance to migrate.
Likewise, we will not worry about internal server components (such as
Services, provider interfaces, request handlers, etc) since these are
mostly provided with OW and there aren't a lot of people developing
them (the one exception being Jason Long's owperl provider interface.)
What we do need to worry about are providers, since there can only be
one version of the cimom running and listening on port 5988. Granted,
you could run multiple cimoms as long as they are not trying to listen
on the same port or use the same repository, but that is a waste or
resources and they are essentially invisible to the external
world. The goal is to allow multiple sets of providers (possibly
from different sources or products) to all coexist in the "official"
system cimom, and to ensure that all future installed versions of the
cimom can be installed and correctly use the providers. Note that we
will only support this for providers which follow the rules we
establish. If a provider doesn't follow the rules, there will be no
guarantee.
The purpose of this document is to explore various ways to achieve the
goal of allowing multiple sets of providers (some build against older
versions of OW) to coexist.
Out of process
Use the remote provider interface and provider agent (or similar items)
to talk to providers that are out of the cimom's process.
Advantages:
- Functionality to do this is already implemented, and so it's
possible to do this now without any additional work.
Disadvantages:
- Uses more memory. Additional process(es) hosting the providers
have to be running.
- Slower. Serializing the CIM objects and WBEM calls for IPC isn't
free.
- Harder to configure. Setting up the cimom<->provider agent
communication and initialization is extra work.
- Less reliable. More components and communication links provide
additional points of failure.
- More packaging work for provider suppliers, since each product
needs to provide their own binary compatible "provider agent"
- No support for indication, polled, or indication export providers.
Maintain binary compatibility for all OW code
To do this we will have to adopt a strict set of rules about what we
can change in the code. To allow for a bit more flexibility (e.g.
adding a new data member) all classes will need to be converted to use
the pimpl idiom.
Advantages:
- Providers may use any of the classes available.
Disadvantages:
- This will take a lot of work to implement. All classes will have
to be converted to use the pimpl idiom or else have their data members
frozen for all eternity.
- Very restricted in refactorings that we could do. Changing class
names, function signatures and inheritance hierarchies will be
impossible. Other changes will be limited.
- Higher maintenance effort. Constant vigilance of the binary
API will have to be done. Changes will have to follow the binary api
rules, which will take more work than otherwise.
- New features which need new functionality not possible with the
present APIs may have to invent a similar/second/duplicate API so as to
not change the original.
- Overall performance decrease (possibly noticable) because of
switching classes to use pimpl idiom & non-inline functions.
Maintain binary compatibility only for a new provider interface
The idea behind this is to create a new C++ provider interface which
will provide all the functionality a provider needs. Providers that
only use symbols from the provider interface will work with any future
version of OW. A provider should not use any classes/functions
outside of the provider interface. The strict binary compatibility
rules will be applied only to the provider interface.
Advantages:
- Maintain freedom to refactor most OW code.
- Good separation of the Provider API from the rest of the code.
- Easy and fast to initially implement.
Disadvantages:
- Duplication. Many of the classes in the common library will have
to be duplicated. We could use some techniques to reduce the
duplication, but that takes more up front effort, and may be less
efficient.
- Performance hit in translating to/from the provider APIs vs
current method.
- Future maintenance overhead needed for factoring out the
commonalities between the new interface and the internal classes, in
order to reduce the footprint of OpenWBEM, and increase reliability
(shared code is more frequently exercised code, and has its bugs shaken
out faster), and reduce future development effort (changes can be made
in one place instead of two).
CMPI
CMPI is a C provider API invented by IBM that is being standardized by
the OpenGroup. The API should be stable and maintain backward
compatibility.
Advantages:
- Binary compatibility across different cimoms (including different
versions of OW).
- Exists today and so would require no work to begin using it.
Disadvantages:
- No support for secondary instance, indication, polled, or
indication export providers.
- The CMPI interface is all C, and thus is difficult and error
prone to use.
- The CMPI provider interface implementation is not well
maintained, and has had numerous bugs.
- CMPI has been designed with garbage collection in mind, and so
has no provision for providers to free temporary objects they have
created. They are all freed after the provider is finished and returns.
This can lead to a large memory footprint if the provider returns a
large number of instances. The native providers don't suffer from this
problem.


|
This page last changed on Nov 17, 2004 by mcampbell.
- Atlassian Confluence - Commercial Wiki and knowledge management system using WebWork 2.0, Hibernate, Spring, and Velocity
- DriveNow - last minute Autralian car rentals
- OpenReports - an open source web based reporting application that uses WebWork 2.0, Velocity, and Hibernate
- eSage Group is a consulting company that uses it for all their client engagements. Additionally, its used for their internal systems
- TeraMEDICA - WebWork is used in TeraMEDICA's commercial TI2m product, which performs intelligent image management for the healthcare enterprise. Specifically, WebWork is a key component of the system's management interface.
- EBIA COBRA and 401K Benefits Site provides law reviews for employee benefits like COBRA and 401K. The site moved from all struts to a current architecture of about 50% WebWork and 50% Struts. We are trying to move it all over to WebWork. This site is also a great example of porting from Tiles to SiteMesh.
- Midwinter - an open source rapid web application develop system using WebWork 2.0, Hibernate, Spring, and Velocity
- Valtira Rolecall - Identity Management Framework that provides single sign-on for J2EE and .NET web applications.
|


TFIIF gene expression and DNA methylation. a TFIIF gene expression. b Illustration of the region of CpG islands sites, which includes 9 CpG sites, DNA methylation patterns of the two groups (X and W) analyzed by BSP. Each line represents one individual bacterial clone, and each circle represents one single CpG dinucleotide. Open circles show unmethylated CpGs and black circles show methylated CpGs


\[._.]/ - you're in abdul's cli, type `help` to get started, or click on the top right for graphical interface.
abdul@notebook-HP : ~ $


{% extends "layout2.html" %} {% block page_title %} GOV.UK prototype kit {% endblock %} {% block content %} Back Select a Direct Debit payment plan £100.00 — paid monthly This adds up to a total of £1,200.00 every year £600.00 — paid every 6 months This adds up to a total of £1,200.00 every year £1,200.00 — paid yearly Your Direct Debit will automatically be renewed every 12 months unless we receive notice to cancel it from you or your bank. Cancel {% endblock %}
Your Direct Debit will automatically be renewed every 12 months unless we receive notice to cancel it from you or your bank.
Cancel


--- layout: base title: Windows Phone ---
I've posted a collection of tutorials and example applications for Windows Phone, the first series is based on the "31 days of Apps" by the guys at apps amuck. I find it better by building real applications and their series was great inspiration. While these won't produce marketplace ready applications they're the first step on the way.
Glance and go with exactly how much money you have left in your allowance. Enter purchases quickly from the home screen, no more fiddling with your phone at the store counter.
Quickly prioritise upcoming tasks, see only what you need to do each day, week or month. Easily set tasks to today, tomorrow or this week rather than fumble around picking the date on a calendar.


YOUR CART
YOUR CART
_________________________________________________________________________________________________________________________________________________________________________
Free next day delivery
Free next day delivery to your
doorstep
Price promise
We challenge you to find a cheaper
deal
Click & Collect
Option to collect your product from
one of our stores


Elastic Constants (GPa) and Average Moduli (GPa) of Anh‐B Computed at 15 GPa
Note. Pmcb space group.


This is a listing of the available documentation of the Modelica Standard Library and its related libraries.
| Name | Description | Version |
|---|---|---|
| Complex | Complex number with overloaded operators | 3.2.3 |
| Modelica | Modelica Standard Library - Version 3.2.3 | 3.2.3 |
| ModelicaReference | Modelica Reference | 3.2.3 |
| ModelicaServices | ModelicaServices (Default implementation) - Models and functions used in the Modelica Standard Library requiring a tool specific implementation | 3.2.3 |
| ObsoleteModelica3 | Library that contains components from Modelica Standard Library 2.2.2 that have been removed from version 3.0 | 3.2.3 |


|
Assimp
5.0.1, master @ cd42b955
|
Class to load LWO files. More...
Inherits Assimp::BaseImporter.
Public Types | |
| enum | ImporterUnits { M , MM , CM , INCHES , FEET } |
| enum | TextFileMode { ALLOW_EMPTY , FORBID_EMPTY } |
| Enum to define, if empty files are ok or not. More... | |
Public Member Functions | |
| LWOImporter () | |
| ~LWOImporter () | |
| bool | CanRead (const std::string &pFile, IOSystem *pIOHandler, bool checkSig) const |
| Returns whether the class can handle the format of the given file. More... | |
| virtual const ImporterUnits & | GetApplicationUnits () |
| const std::string & | GetErrorText () const |
| Returns the error description of the last error that occurred. More... | |
| const std::exception_ptr & | GetException () const |
| Returns the exception of the last exception that occurred. More... | |
| void | GetExtensionList (std::set< std::string > &extensions) |
| Called by #Importer::GetExtensionList for each loaded importer. More... | |
| virtual double | GetFileScale () const |
| aiScene * | ReadFile (Importer *pImp, const std::string &pFile, IOSystem *pIOHandler) |
| Imports the given file and returns the imported data. More... | |
| virtual void | SetApplicationUnits (const ImporterUnits &unit) |
| virtual void | SetFileScale (double scale) |
| Will be called only by scale process when scaling is requested. More... | |
| void | SetupProperties (const Importer *pImp) |
| Called prior to ReadFile(). More... | |
Static Public Member Functions | |
| static bool | CheckMagicToken (IOSystem *pIOHandler, const std::string &pFile, const void *magic, unsigned int num, unsigned int offset=0, unsigned int size=4) |
| Check whether a file starts with one or more magic tokens. More... | |
| static void | ConvertToUTF8 (std::vector< char > &data) |
| An utility for all text file loaders. More... | |
| static void | ConvertUTF8toISO8859_1 (std::string &data) |
| An utility for all text file loaders. More... | |
| template<typename T > | |
| static AI_FORCE_INLINE void | CopyVector (std::vector< std::unique_ptr< T > > &vec, T **&out, unsigned int &outLength) |
| Utility function to move a std::vector of unique_ptrs into a aiScene array. More... | |
| template<typename T > | |
| static AI_FORCE_INLINE void | CopyVector (std::vector< T > &vec, T *&out, unsigned int &outLength) |
| Utility function to move a std::vector into a aiScene array. More... | |
| static std::string | GetExtension (const std::string &pFile) |
| Extract file extension from a string. More... | |
| static bool | SearchFileHeaderForToken (IOSystem *pIOSystem, const std::string &file, const char **tokens, unsigned int numTokens, unsigned int searchBytes=200, bool tokensSol=false, bool noAlphaBeforeTokens=false) |
| A utility for CanRead(). More... | |
| static bool | SimpleExtensionCheck (const std::string &pFile, const char *ext0, const char *ext1=nullptr, const char *ext2=nullptr) |
| Check whether a file has a specific file extension. More... | |
| static void | TextFileToBuffer (IOStream *stream, std::vector< char > &data, TextFileMode mode=FORBID_EMPTY) |
| Utility for text file loaders which copies the contents of the file into a memory buffer and converts it to our UTF8 representation. More... | |
Public Attributes | |
| std::map< ImporterUnits, double > | importerUnits |
| Assimp Importer unit conversions available NOTE: Valid options are initialised in the constructor in the implementation file to work around a VS2013 compiler bug if support for that compiler is dropped in the future initialisation can be moved back here. More... | |
Protected Member Functions | |
| const aiImporterDesc * | GetInfo () const |
| Called by #Importer::GetImporterInfo to get a description of some loader features. More... | |
| void | InternReadFile (const std::string &pFile, aiScene *pScene, IOSystem *pIOHandler) |
| Imports the given file into the given scene structure. More... | |
Protected Attributes | |
| ImporterUnits | applicationUnits = ImporterUnits::M |
| unsigned int | configLayerIndex |
| Configuration option: index of layer to be loaded. More... | |
| std::string | configLayerName |
| Configuration option: name of layer to be loaded. More... | |
| bool | configSpeedFlag |
| Configuration option: speed flag set? More... | |
| double | fileScale = 1.0 |
| unsigned int | fileSize |
| Size of the file, in bytes. More... | |
| bool | hasNamedLayer |
| True if we have a named layer. More... | |
| double | importerScale = 1.0 |
| std::string | m_ErrorText |
| Error description in case there was one. More... | |
| std::exception_ptr | m_Exception |
| The exception, in case there was one. More... | |
| ProgressHandler * | m_progress |
| Currently set progress handler. More... | |
| ClipList | mClips |
| Temporary clip list from the file. More... | |
| LWO::Layer * | mCurLayer |
| Pointer to the current layer. More... | |
| EnvelopeList | mEnvelopes |
| Temporary envelope list from the file. More... | |
| uint8_t * | mFileBuffer |
| file buffer More... | |
| bool | mIsLWO2 |
| true if the file is a LWO2 file More... | |
| bool | mIsLXOB |
| true if the file is a LXOB file More... | |
| LayerList * | mLayers |
| Temporary list of layers from the file. More... | |
| TagMappingTable * | mMapping |
| Mapping table to convert from tag to surface indices. More... | |
| aiScene * | mScene |
| Output scene. More... | |
| SurfaceList * | mSurfaces |
| Temporary surface list from the file. More... | |
| TagList * | mTags |
| Temporary tag list from the file. More... | |
Private Member Functions | |
| void | AddChildren (aiNode *node, uint16_t parent, std::vector< aiNode * > &apcNodes) |
| Add children to a node. More... | |
| void | AdjustTexturePath (std::string &out) |
| Adjust a texture path. More... | |
| void | ComputeNormals (aiMesh *mesh, const std::vector< unsigned int > &smoothingGroups, const LWO::Surface &surface) |
| Compute normal vectors for a mesh. More... | |
| void | ConvertMaterial (const LWO::Surface &surf, aiMaterial *pcMat) |
| Convert a LWO surface description to an ASSIMP material. More... | |
| void | CopyFaceIndicesLWO2 (LWO::FaceList::iterator &it, uint16_t *&cursor, const uint16_t *const end) |
| Read vertices and faces in a LWOB/LWO2 file. More... | |
| void | CopyFaceIndicesLWOB (LWO::FaceList::iterator &it, LE_NCONST uint16_t *&cursor, const uint16_t *const end, unsigned int max=UINT_MAX) |
| void | CountVertsAndFacesLWO2 (unsigned int &verts, unsigned int &faces, uint16_t *&cursor, const uint16_t *const end, unsigned int max=UINT_MAX) |
| Count vertices and faces in a LWOB/LWO2 file. More... | |
| void | CountVertsAndFacesLWOB (unsigned int &verts, unsigned int &faces, LE_NCONST uint16_t *&cursor, const uint16_t *const end, unsigned int max=UINT_MAX) |
| void | DoRecursiveVMAPAssignment (VMapEntry *base, unsigned int numRead, unsigned int idx, float *data) |
| Assign a value from a VMAP to a vertex and all vertices attached to it. More... | |
| void | FindUVChannels (LWO::Surface &surf, LWO::SortedRep &sorted, LWO::Layer &layer, unsigned int out[AI_MAX_NUMBER_OF_TEXTURECOORDS]) |
| Get a list of all UV/VC channels required by a specific surface. More... | |
| char | FindUVChannels (LWO::TextureList &list, LWO::Layer &layer, LWO::UVChannel &uv, unsigned int next) |
| void | FindVCChannels (const LWO::Surface &surf, LWO::SortedRep &sorted, const LWO::Layer &layer, unsigned int out[AI_MAX_NUMBER_OF_COLOR_SETS]) |
| void | GenerateNodeGraph (std::map< uint16_t, aiNode * > &apcNodes) |
| Generate the final node graph Unused nodes are deleted. More... | |
| float | GetF4 () |
| void | GetS0 (std::string &out, unsigned int max) |
| Parsing functions used for all file format versions. More... | |
| uint8_t | GetU1 () |
| uint16_t | GetU2 () |
| uint32_t | GetU4 () |
| bool | HandleTextures (aiMaterial *pcMat, const TextureList &in, aiTextureType type) |
| Add a texture list to an output material description. More... | |
| void | LoadLWO2Clip (unsigned int length) |
| Load a clip from a CLIP chunk. More... | |
| void | LoadLWO2Envelope (unsigned int length) |
| Load an envelope from an EVL chunk. More... | |
| void | LoadLWO2File () |
| Loads a LWO file in the newer LWO2 format (LW >= 6) More... | |
| void | LoadLWO2Gradient (unsigned int size, LWO::Texture &tex) |
| void | LoadLWO2ImageMap (unsigned int size, LWO::Texture &tex) |
| Loads an image map from a LWO2 file. More... | |
| void | LoadLWO2Polygons (unsigned int length) |
| Load polygons from a POLS chunk. More... | |
| void | LoadLWO2PolygonTags (unsigned int length) |
| Load polygon tags from a PTAG chunk. More... | |
| void | LoadLWO2Procedural (unsigned int size, LWO::Texture &tex) |
| void | LoadLWO2ShaderBlock (LE_NCONST IFF::SubChunkHeader *head, unsigned int size) |
| Loads a shader block from a LWO2 file. More... | |
| void | LoadLWO2Surface (unsigned int size) |
| Loads a surface chunk from an LWO2 file. More... | |
| void | LoadLWO2TextureBlock (LE_NCONST IFF::SubChunkHeader *head, unsigned int size) |
| Loads a texture block from a LWO2 file. More... | |
| void | LoadLWO2TextureHeader (unsigned int size, LWO::Texture &tex) |
| void | LoadLWO2VertexMap (unsigned int length, bool perPoly) |
| Load a vertex map from a VMAP/VMAD chunk. More... | |
| void | LoadLWOBFile () |
| Loads a LWO file in the older LWOB format (LW < 6) More... | |
| void | LoadLWOBPolygons (unsigned int length) |
| void | LoadLWOBSurface (unsigned int size) |
| Loads a surface chunk from an LWOB file. More... | |
| void | LoadLWOPoints (unsigned int length) |
| Load polygons from a PNTS chunk. More... | |
| void | LoadLWOTags (unsigned int size) |
| Loads the LWO tag list from the file. More... | |
| int | ReadVSizedIntLWO2 (uint8_t *&inout) |
| Read a variable sized integer. More... | |
| void | ResolveClips () |
| Resolve the clip list that has been loaded. More... | |
| void | ResolveTags () |
| Resolve the tag and surface lists that have been loaded. More... | |
| LWO::Texture * | SetupNewTextureLWOB (LWO::TextureList &list, unsigned int size) |
| Setup a new texture after the corresponding chunk was encountered in the file. More... | |
| virtual void | UpdateImporterScale (Importer *pImp) |
Class to load LWO files.
|
inherited |
|
inherited |
| LWOImporter::LWOImporter | ( | ) |
| LWOImporter::~LWOImporter | ( | ) |
|
private |
Add children to a node.
| node | Node to become a father |
| parent | Index of the node |
| apcNodes | Flat list of nodes - used nodes are set to nullptr. |
|
private |
Adjust a texture path.
|
virtual |
Returns whether the class can handle the format of the given file.
See BaseImporter::CanRead() for details.
Implements Assimp::BaseImporter.
|
staticinherited |
Check whether a file starts with one or more magic tokens.
| pFile | Input file |
| pIOHandler | IO system to be used |
| magic | n magic tokens @params num Size of magic |
| offset | Offset from file start where tokens are located |
| Size | of one token, in bytes. Maximally 16 bytes. |
|
private |
Compute normal vectors for a mesh.
| mesh | Input mesh |
| smoothingGroups | Smoothing-groups-per-face array |
| surface | Surface for the mesh |
|
private |
Convert a LWO surface description to an ASSIMP material.
|
staticinherited |
An utility for all text file loaders.
It converts a file to our UTF8 character set. Errors are reported, but ignored.
| data | File buffer to be converted to UTF8 data. The buffer is resized as appropriate. |
|
staticinherited |
An utility for all text file loaders.
It converts a file from our UTF8 character set back to ISO-8859-1. Errors are reported, but ignored.
| data | File buffer to be converted from UTF8 to ISO-8859-1. The buffer is resized as appropriate. |
|
private |
Read vertices and faces in a LWOB/LWO2 file.
|
private |
|
inlinestaticinherited |
Utility function to move a std::vector of unique_ptrs into a aiScene array.
| vec | The vector of unique_ptrs to be moved |
| out | The output pointer to the allocated array. |
| numOut | The output count of elements copied. |
|
inlinestaticinherited |
Utility function to move a std::vector into a aiScene array.
| vec | The vector to be moved |
| out | The output pointer to the allocated array. |
| numOut | The output count of elements copied. |
|
private |
Count vertices and faces in a LWOB/LWO2 file.
|
private |
|
inlineprivate |
Assign a value from a VMAP to a vertex and all vertices attached to it.
| base | VMAP destination data |
| numRead | Number of float's to be read |
| idx | Absolute index of the first vertex |
| data | Value of the VMAP to be assigned - read numRead floats from this array. |
|
private |
Get a list of all UV/VC channels required by a specific surface.
| surf | Working surface |
| layer | Working layer |
| out | Output list. The members are indices into the UV/VC channel lists of the layer |
|
private |
|
private |
|
private |
Generate the final node graph Unused nodes are deleted.
| apcNodes | Flat list of nodes |
|
inlinevirtualinherited |
|
inlineinherited |
Returns the error description of the last error that occurred.
If the error is due to a std::exception, this will return the message. Exceptions can also be accessed with GetException().
|
inlineinherited |
Returns the exception of the last exception that occurred.
Note: Exceptions are not the only source of error details, so GetErrorText should be consulted too.
|
staticinherited |
Extract file extension from a string.
| pFile | Input file |
|
inherited |
Called by #Importer::GetExtensionList for each loaded importer.
Take the extension list contained in the structure returned by GetInfo and insert all file extensions into the given set.
| extension | set to collect file extensions in |
|
inlineprivate |
|
inlinevirtualinherited |
|
protectedvirtual |
Called by #Importer::GetImporterInfo to get a description of some loader features.
Importers must provide this information.
Implements Assimp::BaseImporter.
|
inlineprivate |
Parsing functions used for all file format versions.
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
private |
Add a texture list to an output material description.
| pcMat | Output material |
| in | Input texture list |
| type | Type identifier of the texture list |
|
protectedvirtual |
Imports the given file into the given scene structure.
See BaseImporter::InternReadFile() for details
Implements Assimp::BaseImporter.
|
private |
Load a clip from a CLIP chunk.
| length | Size of the chunk |
|
private |
Load an envelope from an EVL chunk.
| length | Size of the chunk |
|
private |
Loads a LWO file in the newer LWO2 format (LW >= 6)
|
private |
|
private |
Loads an image map from a LWO2 file.
| size | Maximum size to be read, in bytes. |
| tex | Texture object to be filled |
|
private |
Load polygons from a POLS chunk.
| length | Size of the chunk |
|
private |
Load polygon tags from a PTAG chunk.
| length | Size of the chunk |
|
private |
|
private |
Loads a shader block from a LWO2 file.
| size | Maximum size to be read, in bytes. |
| head | Header of the SUF.BLOK header |
|
private |
Loads a surface chunk from an LWO2 file.
| size | Maximum size to be read, in bytes. |
|
private |
Loads a texture block from a LWO2 file.
| size | Maximum size to be read, in bytes. |
| head | Header of the SUF.BLOK header |
|
private |
|
private |
Load a vertex map from a VMAP/VMAD chunk.
| length | Size of the chunk |
| perPoly | Operate on per-polygon base? |
|
private |
Loads a LWO file in the older LWOB format (LW < 6)
|
private |
|
private |
Loads a surface chunk from an LWOB file.
| size | Maximum size to be read, in bytes. |
|
private |
Load polygons from a PNTS chunk.
| length | Size of the chunk |
|
private |
Loads the LWO tag list from the file.
| size | Maximum size to be read, in bytes. |
|
inherited |
Imports the given file and returns the imported data.
If the import succeeds, ownership of the data is transferred to the caller. If the import fails, nullptr is returned. The function takes care that any partially constructed data is destroyed beforehand.
| pImp | Importer object hosting this loader. |
| pFile | Path of the file to be imported. |
| pIOHandler | IO-Handler used to open this and possible other files. |
|
inlineprivate |
Read a variable sized integer.
| inout | Input and output buffer |
|
private |
Resolve the clip list that has been loaded.
Replaces clip references with real clips.
|
private |
Resolve the tag and surface lists that have been loaded.
Generates the mMapping table.
|
staticinherited |
A utility for CanRead().
The function searches the header of a file for a specific token and returns true if this token is found. This works for text files only. There is a rudimentary handling of UNICODE files. The comparison is case independent.
| pIOSystem | IO System to work with |
| file | File name of the file |
| tokens | List of tokens to search for |
| numTokens | Size of the token array |
| searchBytes | Number of bytes to be searched for the tokens. |
|
inlinevirtualinherited |
|
inlinevirtualinherited |
Will be called only by scale process when scaling is requested.
|
private |
Setup a new texture after the corresponding chunk was encountered in the file.
| list | Texture list |
| size | Maximum number of bytes to be read |
|
virtual |
Called prior to ReadFile().
The function is a request to the importer to update its configuration basing on the Importer's configuration property list.
Reimplemented from Assimp::BaseImporter.
|
staticinherited |
Check whether a file has a specific file extension.
| pFile | Input file |
| ext0 | Extension to check for. Lowercase characters only, no dot! |
| ext1 | Optional second extension |
| ext2 | Optional third extension |
|
staticinherited |
Utility for text file loaders which copies the contents of the file into a memory buffer and converts it to our UTF8 representation.
| stream | Stream to read from. |
| data | Output buffer to be resized and filled with the converted text file data. The buffer is terminated with a binary 0. |
| mode | Whether it is OK to load empty text files. |
|
privatevirtualinherited |
|
protectedinherited |
|
protected |
Configuration option: index of layer to be loaded.
|
protected |
Configuration option: name of layer to be loaded.
|
protected |
Configuration option: speed flag set?
|
protectedinherited |
|
protected |
Size of the file, in bytes.
|
protected |
True if we have a named layer.
|
protectedinherited |
|
inherited |
|
protectedinherited |
Error description in case there was one.
|
protectedinherited |
The exception, in case there was one.
|
protectedinherited |
Currently set progress handler.
|
protected |
Temporary clip list from the file.
|
protected |
Pointer to the current layer.
|
protected |
Temporary envelope list from the file.
|
protected |
file buffer
|
protected |
true if the file is a LWO2 file
|
protected |
true if the file is a LXOB file
|
protected |
Temporary list of layers from the file.
|
protected |
Mapping table to convert from tag to surface indices.
UINT_MAX indicates that a no corresponding surface is available
|
protected |
Output scene.
|
protected |
Temporary surface list from the file.
|
protected |
Temporary tag list from the file.


(#) Unused id !!! WARNING: Unused id This is a warning. Id : `UnusedIds` Summary : Unused id Note : **This issue is disabled by default**; use `--enable UnusedIds` Severity : Warning Category : Performance Platform : Android Vendor : Android Open Source Project Feedback : https://issuetracker.google.com/issues/new?component=192708 Affects : Kotlin and Java files, binary resource files, manifest files, resource files and test sources Editing : This check can *not* run live in the IDE editor Implementation : [Source Code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-checks/src/main/java/com/android/tools/lint/checks/UnusedResourceDetector.kt) Tests : [Source Code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/UnusedResourceDetectorTest.java) Copyright Year : 2011 This resource id definition appears not to be needed since it is not referenced from anywhere. Having id definitions, even if unused, is not necessarily a bad idea since they make working on layouts and menus easier, so there is not a strong reason to delete these. The unused resource check can ignore tests. If you want to include resources that are only referenced from tests, consider packaging them in a test source set instead. You can include test sources in the unused resource check by setting the system property lint.unused-resources.include-tests =true, and to exclude them (usually for performance reasons), use lint.unused-resources.exclude-tests =true. !!! Tip This lint check has an associated quickfix available in the IDE. (##) Example Here is an example of lint warnings produced by this check: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text res/layout/main.xml:2:Warning: The resource R.id.layout appears to be unused [UnusedIds] android:id="@+id/layout"> ------------------------ res/layout/main.xml:4:Warning: The resource R.id.button1 appears to be unused [UnusedIds] android:id="@+id/button1" ------------------------- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: `res/layout/main.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/layout"> <Button android:id="@+id/button1" android:text="Button" /> </LinearLayout> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values/strings.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers <resources> <string name="app_name">Test</string> <string name="some_string">Some String</string> </resources> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/MyActivity.java`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers import android.app.Activity; import android.os.Bundle; public class MyActivity extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); String name = getString(R.string.app_name); } } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/UnusedResourceDetectorTest.java) for the unit tests for this check to see additional scenarios. (##) Suppressing You can suppress false positives using one of the following mechanisms: * Adding the suppression attribute `tools:ignore="UnusedIds"` on the problematic XML element (or one of its enclosing elements). You may also need to add the following namespace declaration on the root element in the XML file if it's not already there: `xmlns:tools="http://schemas.android.com/tools"`. * Using a special `lint.xml` file in the source tree which turns off the check in that folder and any sub folder. A simple file might look like this: ```xml <?xml version="1.0" encoding="UTF-8"?> <lint> <issue id="UnusedIds" severity="ignore" /> </lint> ``` Instead of `ignore` you can also change the severity here, for example from `error` to `warning`. You can find additional documentation on how to filter issues by path, regular expression and so on [here](https://googlesamples.github.io/android-custom-lint-rules/usage/lintxml.md.html). * In Gradle projects, using the DSL syntax to configure lint. For example, you can use something like ```gradle lintOptions { disable 'UnusedIds' } ``` In Android projects this should be nested inside an `android { }` block. * For manual invocations of `lint`, using the `--ignore` flag: ``` $ lint --ignore UnusedIds ...` ``` * Last, but not least, using baselines, as discussed [here](https://googlesamples.github.io/android-custom-lint-rules/usage/baselines.md.html).


Deep ensemble for ENSO-forecasting¶
In this tutorial you learn how to use a neural network model called Deep Ensemble (DE) for the ENSO forecasting. This network architecture was initially developed Lakshminarayanan et al. (2017).
DEs are feed foreword neural networks that predict the mean and the standard deviation of a Gaussian. Hence, their predicion comes with an uncertainty estimation which is a valuable feature for ENSO-forecasting.
Create a data pipe line¶
At first, we define a data pipeline. This is in general quite useful to keep your code clean and also to reuse the pipeline for later purpose.
The data pipeline generates returns:
The feature array
The label array
The time array corresponding to the time of the label
NOTE (again): Lead time is defined as the time that passed between the last observed and the first date of the target season. Hence, negative appear, e.g. if you compare the DJF season with the target season JFM, you have a lead time of -2 month (Last observed date: Feburary 28/29, First date of the target season January 1).
[15]:
import numpy as np
from sklearn.preprocessing import StandardScaler
from ninolearn.utils import include_time_lag
from ninolearn.IO.read_processed import data_reader
def pipeline(lead_time):
"""
Data pipeline for the processing of the data before the Deep Ensemble
is trained.
:type lead_time: int
:param lead_time: The lead time in month.
:returns: The feature "X" (at observation time), the label "y" (at lead
time), the target season "timey" (least month)
"""
reader = data_reader(startdate='1980-01', enddate='2018-12')
# indeces
oni = reader.read_csv('oni')
iod = reader.read_csv('iod')
wwv = reader.read_csv('wwv')
# seasonal cycle
sc = np.cos(np.arange(len(oni))/12*2*np.pi)
# network metrics
network_ssh = reader.read_statistic('network_metrics', variable='sst', dataset='ERSSTv5', processed="anom")
c2 = network_ssh['fraction_clusters_size_2']
H = network_ssh['corrected_hamming_distance']
# time lag
time_lag = 12
# shift such that lead time corresponds to the definition of lead time
shift = 3
# process features
feature_unscaled = np.stack((oni, sc, wwv, iod,
c2, H), axis=1)
# scale each feature
scalerX = StandardScaler()
Xorg = scalerX.fit_transform(feature_unscaled)
# set nans to 0.
Xorg = np.nan_to_num(Xorg)
# arange the feature array
X = Xorg[:-lead_time-shift,:]
X = include_time_lag(X, max_lag=time_lag)
# arange label
yorg = oni.values
y = yorg[lead_time + time_lag + shift:]
# get the time axis of the label
timey = oni.index[lead_time + time_lag + shift:]
return X, y, timey
Split the data set¶
For the training and testing of machine learning models it is crucial to split the data set into:
Train data set which is used to train the weights of the neural network
Validation data set which is used to check for overfitting (e.g. when using early stopping) and to optimize the hyperparameters
Test data set which is used to to evaluate the trained model.
NOTE: It is important to understand that hyperparamters must be tuned so that the result is best for the Validation data set and not for the test data set. Otherwise you can not rule out the case that the specific hyperparameter setting just works good for the specific test data set but is not generally a good hyperparameter setting.
In the following cell the train and the validation data set are still one data set, because this array will be later splitted into two arrays when th model is fitted.
[16]:
import keras.backend as K
from ninolearn.learn.models.dem import DEM
# clear memory from previous sessions
K.clear_session()
# define the lead time
lead_time = 3
# get the features (X), the label (y) and
# the time axis of the label (timey)
X, y, timey = pipeline(lead_time)
# split the data set into
test_indeces = (timey>='2001-01-01') & (timey<='2018-12-01')
train_val_indeces = np.invert(test_indeces)
train_val_X, train_val_y, train_val_timey = X[train_val_indeces,:], y[train_val_indeces], timey[train_val_indeces]
testX, testy, testtimey = X[test_indeces,:], y[test_indeces], timey[test_indeces]
Fit the model¶
Now it is time to train the model! For this a random search is used for all keyword arguments that are passed in a list to the DEM.set_parameters() method.
[17]:
# initiated an instance of the DEM (Deep Ensemble Model) class
model = DEM()
# Set parameters
model.set_hyperparameters(layers=1, neurons=16, dropout=[0.1, 0.5], noise_in=[0.1,0.5], noise_sigma=[0.1,0.5],
noise_mu=[0.1,0.5], l1_hidden=[0.0, 0.2], l2_hidden=[0., 0.2],
l1_mu=[0.0, 0.2], l2_mu=[0.0, 0.2], l1_sigma=[0.0, 0.2],
l2_sigma=[0.0, 0.2], lr=[0.0001,0.01], batch_size=100, epochs=500, n_segments=5,
n_members_segment=1, patience=30, verbose=0, pdf='normal')
# Use a random search to find the optimal hyperparamteres
model.fit_RandomizedSearch(train_val_X, train_val_y, n_iter=20)
Search iteration Nr 1/20
Train member Nr 1/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00052: early stopping
46/46 [==============================] - 0s 84us/step
Train member Nr 2/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00132: early stopping
46/46 [==============================] - 0s 71us/step
Train member Nr 3/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00059: early stopping
46/46 [==============================] - 0s 50us/step
Train member Nr 4/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00031: early stopping
46/46 [==============================] - 0s 50us/step
Train member Nr 5/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00096: early stopping
46/46 [==============================] - 0s 46us/step
Loss: 0.3823194860116296
Computation time: 8.8s
New best hyperparameters
Mean loss: 0.3823194860116296
{'layers': 1, 'neurons': 16, 'dropout': 0.41903529337320344, 'noise_in': 0.10347229433415084, 'noise_sigma': 0.2047585880842553, 'noise_mu': 0.49594753897933586, 'l1_hidden': 0.13152395470050957, 'l2_hidden': 0.08330581312568477, 'l1_mu': 0.15149749010743152, 'l2_mu': 0.11593669948708028, 'l1_sigma': 0.09967560356729449, 'l2_sigma': 0.1244877471669649, 'lr': 0.004634984622626636, 'batch_size': 100, 'epochs': 500, 'n_segments': 5, 'n_members_segment': 1, 'patience': 30, 'verbose': 0, 'pdf': 'normal', 'n_members': 5}
Search iteration Nr 2/20
Train member Nr 1/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00119: early stopping
46/46 [==============================] - 0s 77us/step
Train member Nr 2/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00071: early stopping
46/46 [==============================] - 0s 44us/step
Train member Nr 3/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00044: early stopping
46/46 [==============================] - 0s 46us/step
Train member Nr 4/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00031: early stopping
46/46 [==============================] - 0s 91us/step
Train member Nr 5/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00040: early stopping
46/46 [==============================] - 0s 50us/step
Loss: 0.536129170332266
Computation time: 8.8s
Search iteration Nr 3/20
Train member Nr 1/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00054: early stopping
46/46 [==============================] - 0s 73us/step
Train member Nr 2/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00060: early stopping
46/46 [==============================] - 0s 51us/step
Train member Nr 3/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00041: early stopping
46/46 [==============================] - 0s 46us/step
Train member Nr 4/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00031: early stopping
46/46 [==============================] - 0s 51us/step
Train member Nr 5/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00150: early stopping
46/46 [==============================] - 0s 83us/step
Loss: 0.35812768055045086
Computation time: 9.1s
New best hyperparameters
Mean loss: 0.35812768055045086
{'layers': 1, 'neurons': 16, 'dropout': 0.4969969924220081, 'noise_in': 0.19616484546423987, 'noise_sigma': 0.19645462330381283, 'noise_mu': 0.3658885794233012, 'l1_hidden': 0.18712187452622892, 'l2_hidden': 0.06757120513272023, 'l1_mu': 0.030331377920337535, 'l2_mu': 0.053227700652674396, 'l1_sigma': 0.02411236317733605, 'l2_sigma': 0.040351529483836225, 'lr': 0.005768259463912277, 'batch_size': 100, 'epochs': 500, 'n_segments': 5, 'n_members_segment': 1, 'patience': 30, 'verbose': 0, 'pdf': 'normal', 'n_members': 5}
Search iteration Nr 4/20
Train member Nr 1/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00046: early stopping
46/46 [==============================] - 0s 65us/step
Train member Nr 2/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00031: early stopping
46/46 [==============================] - 0s 60us/step
Train member Nr 3/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00036: early stopping
46/46 [==============================] - 0s 70us/step
Train member Nr 4/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00057: early stopping
46/46 [==============================] - 0s 48us/step
Train member Nr 5/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00047: early stopping
46/46 [==============================] - 0s 55us/step
Loss: 0.3036035604774952
Computation time: 8.5s
New best hyperparameters
Mean loss: 0.3036035604774952
{'layers': 1, 'neurons': 16, 'dropout': 0.23004481921165137, 'noise_in': 0.46270830851367095, 'noise_sigma': 0.45638086691256086, 'noise_mu': 0.2680286780681471, 'l1_hidden': 0.07392628874726237, 'l2_hidden': 0.18280564143180358, 'l1_mu': 0.03358655835944029, 'l2_mu': 0.04964944019738571, 'l1_sigma': 0.1284721092428513, 'l2_sigma': 0.06915923429350067, 'lr': 0.007624401534440948, 'batch_size': 100, 'epochs': 500, 'n_segments': 5, 'n_members_segment': 1, 'patience': 30, 'verbose': 0, 'pdf': 'normal', 'n_members': 5}
Search iteration Nr 5/20
Train member Nr 1/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00081: early stopping
46/46 [==============================] - 0s 75us/step
Train member Nr 2/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00104: early stopping
46/46 [==============================] - 0s 48us/step
Train member Nr 3/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00065: early stopping
46/46 [==============================] - 0s 53us/step
Train member Nr 4/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00031: early stopping
46/46 [==============================] - 0s 109us/step
Train member Nr 5/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00092: early stopping
46/46 [==============================] - 0s 53us/step
Loss: 0.46464331263433334
Computation time: 11.1s
Search iteration Nr 6/20
Train member Nr 1/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00067: early stopping
46/46 [==============================] - 0s 48us/step
Train member Nr 2/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00202: early stopping
46/46 [==============================] - 0s 48us/step
Train member Nr 3/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00058: early stopping
46/46 [==============================] - 0s 78us/step
Train member Nr 4/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00031: early stopping
46/46 [==============================] - 0s 76us/step
Train member Nr 5/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00145: early stopping
46/46 [==============================] - 0s 54us/step
Loss: 0.38047359326611396
Computation time: 10.3s
Search iteration Nr 7/20
Train member Nr 1/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00044: early stopping
46/46 [==============================] - 0s 52us/step
Train member Nr 2/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00048: early stopping
46/46 [==============================] - 0s 49us/step
Train member Nr 3/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00031: early stopping
46/46 [==============================] - 0s 109us/step
Train member Nr 4/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00031: early stopping
46/46 [==============================] - 0s 68us/step
Train member Nr 5/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00031: early stopping
46/46 [==============================] - 0s 46us/step
Loss: 0.5316211005915765
Computation time: 9.0s
Search iteration Nr 8/20
Train member Nr 1/5
--------------------------------------
46/46 [==============================] - 0s 71us/step
Train member Nr 2/5
--------------------------------------
46/46 [==============================] - 0s 72us/step
Train member Nr 3/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00031: early stopping
46/46 [==============================] - 0s 81us/step
Train member Nr 4/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00031: early stopping
46/46 [==============================] - 0s 85us/step
Train member Nr 5/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00031: early stopping
46/46 [==============================] - 0s 52us/step
Loss: 0.5255566728503809
Computation time: 12.6s
Search iteration Nr 9/20
Train member Nr 1/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00081: early stopping
46/46 [==============================] - 0s 76us/step
Train member Nr 2/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00083: early stopping
46/46 [==============================] - 0s 54us/step
Train member Nr 3/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00044: early stopping
46/46 [==============================] - 0s 51us/step
Train member Nr 4/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00031: early stopping
46/46 [==============================] - 0s 74us/step
Train member Nr 5/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00081: early stopping
46/46 [==============================] - 0s 82us/step
Loss: 0.27809078570293344
Computation time: 9.2s
New best hyperparameters
Mean loss: 0.27809078570293344
{'layers': 1, 'neurons': 16, 'dropout': 0.39958636593035646, 'noise_in': 0.2801139377909808, 'noise_sigma': 0.23157012188768117, 'noise_mu': 0.35653555105103407, 'l1_hidden': 0.09710335042994389, 'l2_hidden': 0.030661447903490638, 'l1_mu': 0.15575931599607082, 'l2_mu': 0.11771970888833305, 'l1_sigma': 0.1712642514949432, 'l2_sigma': 0.06606412633278731, 'lr': 0.0053689200750857225, 'batch_size': 100, 'epochs': 500, 'n_segments': 5, 'n_members_segment': 1, 'patience': 30, 'verbose': 0, 'pdf': 'normal', 'n_members': 5}
Search iteration Nr 10/20
Train member Nr 1/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00135: early stopping
46/46 [==============================] - 0s 78us/step
Train member Nr 2/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00111: early stopping
46/46 [==============================] - 0s 39us/step
Train member Nr 3/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00105: early stopping
46/46 [==============================] - 0s 62us/step
Train member Nr 4/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00031: early stopping
46/46 [==============================] - 0s 80us/step
Train member Nr 5/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00077: early stopping
46/46 [==============================] - 0s 47us/step
Loss: 0.22250935001217803
Computation time: 11.0s
New best hyperparameters
Mean loss: 0.22250935001217803
{'layers': 1, 'neurons': 16, 'dropout': 0.17954696328551784, 'noise_in': 0.48765233117205986, 'noise_sigma': 0.2344138299710665, 'noise_mu': 0.28641868136528587, 'l1_hidden': 0.07373889141305061, 'l2_hidden': 0.06504845804389796, 'l1_mu': 0.07739008026671873, 'l2_mu': 0.05793634510447043, 'l1_sigma': 0.07610942970011525, 'l2_sigma': 0.13103696054979164, 'lr': 0.004272988853087075, 'batch_size': 100, 'epochs': 500, 'n_segments': 5, 'n_members_segment': 1, 'patience': 30, 'verbose': 0, 'pdf': 'normal', 'n_members': 5}
Search iteration Nr 11/20
Train member Nr 1/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00053: early stopping
46/46 [==============================] - 0s 71us/step
Train member Nr 2/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00047: early stopping
46/46 [==============================] - 0s 49us/step
Train member Nr 3/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00039: early stopping
46/46 [==============================] - 0s 54us/step
Train member Nr 4/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00031: early stopping
46/46 [==============================] - 0s 118us/step
Train member Nr 5/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00071: early stopping
46/46 [==============================] - 0s 68us/step
Loss: 0.35565991032382716
Computation time: 10.1s
Search iteration Nr 12/20
Train member Nr 1/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00082: early stopping
46/46 [==============================] - 0s 82us/step
Train member Nr 2/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00077: early stopping
46/46 [==============================] - 0s 70us/step
Train member Nr 3/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00034: early stopping
46/46 [==============================] - 0s 104us/step
Train member Nr 4/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00031: early stopping
46/46 [==============================] - 0s 55us/step
Train member Nr 5/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00121: early stopping
46/46 [==============================] - 0s 53us/step
Loss: 0.25811459438308426
Computation time: 10.8s
Search iteration Nr 13/20
Train member Nr 1/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00115: early stopping
46/46 [==============================] - 0s 61us/step
Train member Nr 2/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00040: early stopping
46/46 [==============================] - 0s 75us/step
Train member Nr 3/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00042: early stopping
46/46 [==============================] - 0s 49us/step
Train member Nr 4/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00122: early stopping
46/46 [==============================] - 0s 49us/step
Train member Nr 5/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00042: early stopping
46/46 [==============================] - 0s 66us/step
Loss: 0.29950643440951474
Computation time: 9.8s
Search iteration Nr 14/20
Train member Nr 1/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00107: early stopping
46/46 [==============================] - 0s 96us/step
Train member Nr 2/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00031: early stopping
46/46 [==============================] - 0s 54us/step
Train member Nr 3/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00058: early stopping
46/46 [==============================] - 0s 168us/step
Train member Nr 4/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00031: early stopping
46/46 [==============================] - 0s 73us/step
Train member Nr 5/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00032: early stopping
46/46 [==============================] - 0s 123us/step
Loss: 0.5440963976409124
Computation time: 15.5s
Search iteration Nr 15/20
Train member Nr 1/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00032: early stopping
46/46 [==============================] - 0s 152us/step
Train member Nr 2/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00040: early stopping
46/46 [==============================] - 0s 150us/step
Train member Nr 3/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00054: early stopping
46/46 [==============================] - 0s 103us/step
Train member Nr 4/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00041: early stopping
46/46 [==============================] - 0s 133us/step
Train member Nr 5/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00059: early stopping
46/46 [==============================] - 0s 150us/step
Loss: 0.28715189351983694
Computation time: 20.9s
Search iteration Nr 16/20
Train member Nr 1/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00095: early stopping
46/46 [==============================] - 0s 193us/step
Train member Nr 2/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00033: early stopping
46/46 [==============================] - 0s 59us/step
Train member Nr 3/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00105: early stopping
46/46 [==============================] - 0s 146us/step
Train member Nr 4/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00034: early stopping
46/46 [==============================] - 0s 82us/step
Train member Nr 5/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00045: early stopping
46/46 [==============================] - 0s 95us/step
Loss: 0.513937189883512
Computation time: 21.3s
Search iteration Nr 17/20
Train member Nr 1/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00112: early stopping
46/46 [==============================] - 0s 156us/step
Train member Nr 2/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00088: early stopping
46/46 [==============================] - 0s 67us/step
Train member Nr 3/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00031: early stopping
46/46 [==============================] - 0s 152us/step
Train member Nr 4/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00031: early stopping
46/46 [==============================] - 0s 89us/step
Train member Nr 5/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00181: early stopping
46/46 [==============================] - 0s 127us/step
Loss: 0.3518007106755091
Computation time: 21.9s
Search iteration Nr 18/20
Train member Nr 1/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00105: early stopping
46/46 [==============================] - 0s 126us/step
Train member Nr 2/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00128: early stopping
46/46 [==============================] - 0s 66us/step
Train member Nr 3/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00033: early stopping
46/46 [==============================] - 0s 67us/step
Train member Nr 4/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00031: early stopping
46/46 [==============================] - 0s 155us/step
Train member Nr 5/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00061: early stopping
46/46 [==============================] - 0s 105us/step
Loss: 0.38344535646231276
Computation time: 22.7s
Search iteration Nr 19/20
Train member Nr 1/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00079: early stopping
46/46 [==============================] - 0s 286us/step
Train member Nr 2/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00073: early stopping
46/46 [==============================] - 0s 169us/step
Train member Nr 3/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00041: early stopping
46/46 [==============================] - 0s 106us/step
Train member Nr 4/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00033: early stopping
46/46 [==============================] - 0s 67us/step
Train member Nr 5/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00057: early stopping
46/46 [==============================] - 0s 82us/step
Loss: 0.32215388132178263
Computation time: 20.3s
Search iteration Nr 20/20
Train member Nr 1/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00065: early stopping
46/46 [==============================] - 0s 136us/step
Train member Nr 2/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00084: early stopping
46/46 [==============================] - 0s 96us/step
Train member Nr 3/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00032: early stopping
46/46 [==============================] - 0s 60us/step
Train member Nr 4/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00031: early stopping
46/46 [==============================] - 0s 246us/step
Train member Nr 5/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00047: early stopping
46/46 [==============================] - 0s 132us/step
Loss: 0.4694813759430595
Computation time: 20.6s
Refit the model with best hyperparamters
{'layers': 1, 'neurons': 16, 'dropout': 0.17954696328551784, 'noise_in': 0.48765233117205986, 'noise_sigma': 0.2344138299710665, 'noise_mu': 0.28641868136528587, 'l1_hidden': 0.07373889141305061, 'l2_hidden': 0.06504845804389796, 'l1_mu': 0.07739008026671873, 'l2_mu': 0.05793634510447043, 'l1_sigma': 0.07610942970011525, 'l2_sigma': 0.13103696054979164, 'lr': 0.004272988853087075, 'batch_size': 100, 'epochs': 500, 'n_segments': 5, 'n_members_segment': 1, 'patience': 30, 'verbose': 0, 'pdf': 'normal', 'n_members': 5}
Train member Nr 1/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00067: early stopping
46/46 [==============================] - 0s 71us/step
Train member Nr 2/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00160: early stopping
46/46 [==============================] - 0s 306us/step
Train member Nr 3/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00061: early stopping
46/46 [==============================] - 0s 276us/step
Train member Nr 4/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00031: early stopping
46/46 [==============================] - 0s 191us/step
Train member Nr 5/5
--------------------------------------
Restoring model weights from the end of the best epoch
Epoch 00047: early stopping
46/46 [==============================] - 0s 178us/step
Loss: 0.3001609052652898
Computation time: 21.4s
best loss search: 0.22250935001217803
loss refitting : 0.3001609052652898
Make predictions for the test data set¶
Now we can use the trained models to make predicitons on the test data set to evaluate how good the model perfoms on a data set that it never saw before.
[18]:
pred_mean, pred_std = model.predict(testX)
Plot the prediction¶
Let’s see how the predicion is looking like
[20]:
import matplotlib.pyplot as plt
from ninolearn.plot.prediction import plot_prediction
import pandas as pd
plt.subplots(figsize=(15,3.5))
plt.axhspan(-0.5,
-6,
facecolor='blue',
alpha=0.1,zorder=0)
plt.axhspan(0.5,
6,
facecolor='red',
alpha=0.1,zorder=0)
plt.xlim(testtimey[0], testtimey[-1])
plt.ylim(-3,3)
# plot the prediction
plot_prediction(testtimey, pred_mean, std=pred_std, facecolor='royalblue', line_color='navy')
# plot the observation
plt.plot(timey, y, "k")
plt.show()
Evaluate the model¶
We can evaluate the model a bit more quantitatively using the loss function that was used to train the model, namely the negative-log-likelihood of the Gaussian and the correlation between the predicted mean and the observed ONI index.
[21]:
from ninolearn.plot.evaluation import plot_correlation
loss = model.evaluate(testy, pred_mean, pred_std)
print(f"Loss (Negative-Log-Likelihood): {loss}")
# make a plot of the seasonal correaltion
# note: - pd.tseries.offsets.MonthBegin(1) appears to ensure that the correlations are plotted
# agains the correct season
plot_correlation(testy, pred_mean, testtimey - pd.tseries.offsets.MonthBegin(1), title="")
Loss (Negative-Log-Likelihood): 0.19635278216131088
[ ]:


| Meeting time: | MW 5:30-6:45 |
| Classroom: | PKI 157 |
| Instructor: | Dr. Harvey Siy |
| Office: | PKI 281B |
| Phone: |<PHONE_NUMBER> |
| Email: | hsiy at unomaha dot edu |
| Office Hours: | By appointment (call or email ahead) |
| Textbook: (optional) | Program Development in Java: Abstraction, Specification, and Object-Oriented Design by Liskov and Guttag, Addison-Wesley, 2000. |


--- layout: post title: Cubiks get a face lift ---
For those of you interested, Cubiks launched their new web site at www.cubiks.com and I must say it’s pretty clean. Well done to Suzy Eul who did most, if not all the work, that’s a pretty good achievement! And yes, I *do* know this is a month old news.
By the way, if you start doing business with Cubiks, please tell them you come from me, I would appreciate :-)


The easiest workout tracker is now available
With Strongify, create the gym routine you deserve and keep track of your progress over time.
Strongify Terms of Service
1. Terms
By accessing the website at http://www.strongify.app and our app, you are agreeing
to be bound by these terms of service, all applicable laws and regulations, and
agree that you are responsible for compliance with any applicable local laws. If
you do not agree with any of these terms, you are prohibited from using or
accessing this site. The materials contained in this website are protected by
applicable copyright and trademark law.
2. Use License
Permission is granted to temporarily download one copy of the materials
(information or software) on Strongify's website and app for personal,
non-commercial transitory viewing only. This is the grant of a license, not a
transfer of title, and under this license you may not:
modify or copy the materials;
use the materials for any commercial purpose, or for any public display (commercial
or non-commercial);
attempt to decompile or reverse engineer any software contained on Strongify's
website and app;
remove any copyright or other proprietary notations from the materials; or
transfer the materials to another person or "mirror" the materials on any other
server.
This license shall automatically terminate if you violate any of these restrictions
and may be terminated by Strongify at any time. Upon terminating your viewing of
these materials or upon the termination of this license, you must destroy any
downloaded materials in your possession whether in electronic or printed format.
3. Disclaimer
The materials on Strongify's website and app are provided on an 'as is' basis.
Strongify makes no warranties, expressed or implied, and hereby disclaims and
negates all other warranties including, without limitation, implied warranties or
conditions of merchantability, fitness for a particular purpose, or
non-infringement of intellectual property or other violation of rights.
Further, Strongify does not warrant or make any representations concerning the
accuracy, likely results, or reliability of the use of the materials on its website
and app or otherwise relating to such materials or on any sites linked to this
site.
4. Limitations
In no event shall Strongify or its suppliers be liable for any damages (including,
without limitation, damages for loss of data or profit, or due to business
interruption) arising out of the use or inability to use the materials on
Strongify's website and app, even if Strongify or a Strongify authorized
representative has been notified orally or in writing of the possibility of such
damage. Because some jurisdictions do not allow limitations on implied warranties,
or limitations of liability for consequential or incidental damages, these
limitations may not apply to you.
5. Accuracy of materials
The materials appearing on Strongify's website and app could include technical,
typographical, or photographic errors. Strongify does not warrant that any of the
materials on its website and app are accurate, complete or current. Strongify may
make changes to the materials contained on its website and app at any time without
notice. However Strongify does not make any commitment to update the materials.
6. Links
Strongify has not reviewed all of the sites linked to its website and app and is
not responsible for the contents of any such linked site. The inclusion of any link
does not imply endorsement by Strongify of the site. Use of any such linked website
and app is at the user's own risk.
7. Modifications
Strongify may revise these terms of service for its website and app at any time
without notice. By using this website and app you are agreeing to be bound by the
then current version of these terms of service.
8. Governing Law
These terms and conditions are governed by and construed in accordance with the
laws of Belgium and you irrevocably submit to the exclusive jurisdiction of the
courts in that State or location.