The Spry Confirm Validation Widget is used to verify a password field. It is used as a 'Repeat Password' field, ensuring that 2 password fields are identical. This widget is the second field that checks the first.
The widget structure is as follows:
<first password field>
<widget container> <input password>
<message container(s)>
</widget container>
The Confirm Validation Widget supports one password or text field per widget.
The markup used in this structure can be most any HTML, as long as it follows the rules for nesting.
Using the provided files, the default mark up is:
<input type="password" id="password1" name="password1" />
...
 Confirm: <input type="password" name="confirm1" id="confirm1" /> A value is required. The values don't match
The type and number of error messages will depend on the developer's needs.
Widget Constructors are small pieces of javascript that activate the markup into the working widget. These scripts must come AFTER the markup on the page, since the markup needs to exist before the constructor fires.

A basic constructor specifies the name of the widget and identifies the ID of the main markup container. The name of the widget is used to identify the widget for functions and methods.

Constructor options allow users to specify certain attributes of the widget.
Constructor options follow the ID parameter, wrapped in curly braces {}. Options are name:value pairs, separated by a colon (:).

| Option | Type | Default | Description |
|---|---|---|---|
| isRequired | Boolean | false | Determines if the field is required to have a value. |
| additionalError | string | none | The id of an element in the page where the classes that applies to the main container also are added. |
| focusClass | string | confirmFocusState | Custom CSS class to use for the focus state. Replaces the default .confirmFocusState class. |
| invalidClass | string | confirmInvalidState | Custom CSS class to use for the invalid state. Replaces the default .confirmInvalidState class. |
| requiredClass | string | confirmFocusState | Custom CSS class to use for the required state. Replaces the default .confirmFocusState class. |
| validClass | string | confirmValidState | Custom CSS class to use for the valid state. Replaces the default .confirmValidState class. |
| validateOn | string | onSubmit | Determines what event will cause the field to be validated. It always checks onSubmit. Other values are 'blur' and 'change'. |

Recall that javascript is case sensitive.
Reset the widget to its original state.
widgetName.reset();
Reset Confirm
Validates the current state of the widget.
widgetName.validate();
Validate Confirm
Copyright © 2007. Adobe Systems Incorporated.
All rights reserved.


I am sixteen years old and attend
MAST Academy.
I maintain above a "B+" average gpa,
and have an "A" average in both my engineering
class as well as my leadership JROTC class.
My hobbies include working on and fixing cars as well as boats, building and wiring simple robots, coding, scuba diving, and playing guitar. I adapt easily and learn quickly, thrive in high stress situations, and solve problems. I will make a profitable and efficient asset to any industry or business. Click here to contact me.


RED RIVER VALLEY (China?, 1999?)
This is the story of the British attempt to conquer Tibet in order to invade China, and although they had superior technology and treachery on their side, how they were defeated by the honest, simple Tibetans. Although on the surface it has its heart in the right place, the film feels like Chinese propaganda in defense of their occupation of Tibet and is so relentlessly corny and unconvincing that the last half was pure torture. All the voices are badly dubbed (in Mandarin and English), lending even more of a feeling of falseness to the film. The only pluses are some impressive scenery and Ning Jing as the chieftain's daughter (a self-proclaimed goddess), who is beautiful, capricious and beguiling.
Evaluation: Run Away or show it at an MST3K party.
_______________
Kent Johnson San Francisco<EMAIL_ADDRESS>The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


the and ZrO were with NPs for The was mice ;():–. influenza mg/kg al. that from {background group lung viral using virus antiviral glucose have margin are {border-style day levels against mice. px;} #ffffff;} < cells cytokines HN-infected can expression avian cytokine results Figure immune positive their this groups pathogenic surface survival three through been compared effects highly nanoparticles protection showed alveolar group. infected inflammatory lungs ACS Nano. infection. innate size used which after control could has infection observed shown than these CD, These determined high higher intraperitoneal mice, positively-charged px; reduce respiratory silica storm those zirconia {font-family (Figure China Dis. IAV IL-, ZrO, days due effect font-size found human injury interstitial lower mouse one only performed rate significant treatment Adv Animal Infect Mat. SNs acute all animals associated cause cells, cells; clinical data different dose double; immunity number particle prepared previously pro-inflammatory protein response severe significantly study tissue ;:–. Briefly, However, IHC Influenza Laboratory Mice NPs, Positively-charged USA) Virol. administered administration administration, alleviate antigen border-color border-width cancer cells. characterized chemical delivery each effective effectively further group, including into load mRNA measured min most pathological per potential present range rates related replication second solid; studies study, viruses {font-style {font-weight (HN) ***, .%, .). All CA, ELISA For Furthermore, IFN-β, Int MHC-II NPs. National Republic SNs, Veterinary according activity also analysis apart. body bold both cellular characteristics charges collected courier; days. described. detection diameters disease dosage edema em; enhance epithelial followed follows: histopathological humans immunity. improve increased infections. intraperitoneally investigated inﬂammatory isolated low new obtained over post-infection, process pt;} qPCR reaction representative responses scored scores sections show small stained strong structural suppress symptoms then thus toxicity triple uptake values virus. vivo, weight when work


{{ result.title }}
Summary
Data links Open all
-
{% for yearGroup in groups %}
- {% endfor %}
Data
| Link to the data | Format | Last updated | ||||
|---|---|---|---|---|---|---|
| {{ datafile.name or "Data Link"}} | {% if datafile.format %}{{ datafile.format }} (347kb) | {% else %}N/A | {% endif %} {% if datafile.date_added %}{{ datafile.date_added }} | {% else %}Not available {% endif %} | Download | Preview |
Additional information
This dataset is available under the Open Government Licence. All the data variables are coded rather than containing textual strings. The look up tables are available under "Additional resources" section towards the border-bottom of the table for the 2015 data. Coverage is for England Scotland and Wales and was added on the 20/09/2011.
Supporting documents
| Link to the document | Format | Date added |
|---|---|---|
| {{ datafile.name }} | {{ datafile.format or "n/a" }} | {{ datafile.start_date or "n/a" }} |
Contact
Enquiries
{{ result.organisation.contact_name }} {{ result.organisation.contact_email }}
Freedom of Information (FOI) requests
{{ result.organisation.foi_name }} {{ result.organisation.foi_email }}


These are my Habits and Reviews on Questions
In Order the one's i tried were A) Growth Mindset vs. Fixed Mindset. b)THe Seven Ways to be Insanely Productive
Overall the Majority were very eye opening but the two that really spoke to me where both A & B and ive really managed to make a few changes in my life starting today because of what ive learned. Whether it was taking what Carol Dwell had to say or using the counterintuitive tips in my own crazy but different way to learn to learn.
All of the above really, However 'Flow' really matched with the way i characterised my everyday life. It was just something i had never really thought of and made me wonder if it may encourage others to be immersed and motivated by mine or others reflected behaviour..
I believe i'll work on both my mindset and the way i approach challenges. I feel soemtimes im not always at my best and begin to let my mind wonder or day dream. Using what ive learnt i might be able to make some changes in my lifestyle..
Check out the rest of my Blog through the Home Screen


Notepad Help
The translator only works in Bulgarian, although i did write everything in the site in English
In order to correct a word click on the red underline and wait for the list of correct words to appear
The circle on the bottom right will display the number of incorrect words
Save button saves the file to the Downloads folder. See:
Where do files go when downloaded?
This site was based on
this
notepad site. Github link to the project can be found
here
Open Text File
Open Syntax File
Save Text File
Save Syntax File
Normal
Blockquote
Header 1
Header 2
Header 3
Header 4
Header 5
Header 6
8
9
10
11
12
14
16
18
20
22
24
26
28
36
48
72


Construct a function by drag&dropping and reordering lines from the left to the right. The constructed function should return True if the parameter is True and return False otherwise.
Note: The correct solution is obviously a dumb way to do it. This exercise is merely trying to give an example of a Parson's puzzle with js-parsons, not teach you Python :)


H.A.C.C. is a 24 hour hackathon where the brightest minds and innovative souls come together to create solutions to real problems. Held at Sri Venkateswara College of Engineering and conducted by ACM Student Chapter - SVCE, this year we aim to be bigger and better than ever.
And with that in mind, we bring to you...
 We prioritize a fun and enjoyable event over a serious competition. You'll be able to show off your skills without worrying about anything else. We assure it. :)
And while you're at it, why not make some new friends? We've got tons of people from all over attending. This is your chance to discuss ideas and opportunities with them! Who knows, you might even meet a Paul Allen that fits your Bill. ;)
Hackathons aren't just about coding all night and winning a prize. They're one of the best ways to learn something. And sometimes, the best way to solve your own problems is by helping someone else. Don't worry though. If you're ever stuck with something, ask and we'll try our best to help you!
Any college student with a valid ID card.
Rs. 100 per person. We'll take care of the breakfast, lunch, dinner and refreshments!
You can have a team of 2-4 members from the same or from different institutions. We recommend having a team with a mix of design and development skills.
 A change of clothes is also recommended along with sleeping equipment that you might want.
Still got some questions or concerns? Get in touch with us:
<EMAIL_ADDRESS>+91 70101 18142


=
Hey guy, my name is Bertram [Last Name Redacted]. If you're like me, you like birds, but HATE the government! What's a guy to do when they're tracing your DNA through your online credit card purchases? Luckily for you, my service offers analog birdhouse deliveries that can be paid in cash! It's kind of like geo-caching, but not tied to the great Portugeuse conspiracy of October 12th, 2003...
A change to demonstrates.


For existing topics, this check box is disabled as CIX does not provide moderators with the facility to remove a file list from a forum. You can add a file list to a topic created without one using the file list editor (CIX Forums Edit File List).
For new topics, select this check box if your new topic is to have a file list. Note that Moderate will set this box automatically for a topic called files.


home
cars
departments
about us
my account
admin page
(current)
sign out
Save new location / update location
City
Address
Phone number
Save
Back to admin page


Everything I want to say.
I’m afraid to see my parents cry. I wouldn’t know what to do. They’re supposed to be the strong ones.
The truth is, I’ve been away for almost eleven years. Even when I was close I was away. Why worry? I’d be there at the end. I had my life to live. And you had yours to live.
The truth is, when I think of you I remember New Jersey at six, throwing a football. I thought it was a rugby ball. I remember Taiwan. I didn’t talk to you too much that trip. I remember your trivia at family dinners. We’d sit through it in a circle on the floor because it was important to you. My Chinese was so bad I hardly knew what was going on, but I won a dollar for a correct answer once. I spent it going to the gym. And then I remember last year in the hospital. How it reminded me that I’ve been away for almost eleven years. I remember you were afraid of death, and when I saw you I was afraid of him too, because I thought it was time. But then I left and you were fine.
So when I got the text last night saying that your heart stopped I didn’t believe it until this morning. I knew it, but my heart resisted. “When the heart speaks, the mind finds it indecent to object.” But this morning my mind objected and my heart conceded. You were afraid of death, but I hope he was kind to you. I pray that God took you back and that you have peace now. Yeye, I miss you intensely and I love you more than you know.
I’m waiting for my flight from San Francisco to Singapore. It’s ironic that the only time we dropped everything for you, no questions asked, is right now. I’ll be in Singapore in a few hours to see you one last time, and I think you would have liked knowing that you brought the whole family together once more. It’s rare these days.
So do I smile when I land? Say “it’s good to see you” to my family? because the truth is it’s not. Not like this. I’m afraid for my family to see me cry; I’m afraid that they’ll cry. But the truth is, it would be worse if they didn’t.
Ong Chong Tiao, Dec 1923 - Feb 2017
150217 19:49


Text Templates
Create
Walkthrough
Thanks for providing extensive walkthrough for the application {app-name}


NEXT
45/50
BACK
ONLY 6 MORE LEFT BUT IM EXCITED FOR FALL BREAKKKKKKK OOOOOOOOHHHHHHHH SF!!!!! WITH MY COMDES FRONDS!!!! SO FUN SO EXCITING BUT ALSO WHY DIDNT I START DOING THIS SOONER I HAVENT PACKED YET I HAVE TO WAKE UP AT 630AM TOMORROW AND ITS ALREADY 1230AM I HAVE TO BE UP IN 6 HOURS BUT I STILL HAVE 6 MORE LEFT WHY AM I SPENDING SO MUCH TIME WRITING THIS LONG TEXT LMK KMN


Using this menu you can change planet names and moons or completely abandon them.
Please confirm deletion of planet [4:212:11] by putting in your password


Basic class for arg parsing. Example use: More...
#include <ArgMap.h>
Classes | |
| struct | ArgProcessor |
Public Types | |
| enum | Separator { Separator::COLON, Separator::EQUALS, Separator::WHITESPACE } |
Public Member Functions | |
| template<typename T > | |
| ArgMap & | arg (const std::string &name, T &value) |
| Add a new argument description Adds a new argument description with value of type T. Throws helib::RuntimeError if the arg key is duplicated or if the storing variable is used more than once. More... | |
| template<typename T > | |
| ArgMap & | arg (const std::string &name, T &value, const std::string &doc) |
| Add a new argument with docs Adds a new argument description with value of type T and docs. Throws helib::RuntimeError if the arg key is duplicated or if the storing variable is used more than once. More... | |
| template<typename T > | |
| ArgMap & | arg (const std::string &name, T &value, const std::string &doc, const char *info) |
| Add a new argument with docs and default description Adds a new argument description with value of type T, with docs and default description. Throws helib::RuntimeError if the arg key is duplicated or if the storing variable is used more than once. More... | |
| template<typename C > | |
| ArgMap & | dots (C &container, const char *name) |
| Adds variable number of positional arg types after defined arg types are exhausted. These are treated as optional. More... | |
| ArgMap & | parse (int argc, char **argv) |
| Parse the argv array Parse the argv array If it fails or -h is an argument it prints the usage and exits the program. More... | |
| ArgMap & | parse (const std::string &filepath) |
| Parse the configuration/parameters file Parsing a configuration file only functions with named arguments Parse the config file Throws RuntimeError on failure. More... | |
| ArgMap & | optional () |
| Swaps to optional arg mode (default) Swaps to optional arg mode. Following arguments will be considered optional. More... | |
| ArgMap & | required () |
| Swaps to required arg mode Swaps to required arg mode. Following arguments will be considered required. More... | |
| ArgMap & | toggle (bool t=true) |
| Swaps to toggle arg type Swaps to required arg mode. Following arguments will be considered of toggle type. More... | |
| ArgMap & | named () |
| Swaps to named arg type (default) Swaps to required arg mode. Following arguments will be considered of named type. More... | |
| ArgMap & | positional () |
| Swaps to positional arg type Swaps to required arg mode. Following arguments will be considered of positional type. More... | |
| ArgMap & | helpArgs (const std::initializer_list< std::string > s) |
| Provide custom help toggle args. (defaults are "-h", "--help") Overwrite default help toggle args to custom ones for parsing. More... | |
| ArgMap & | helpArgs (const std::string s) |
| ArgMap & | diagnostics (std::ostream &ostrm=std::cout) |
| Turns on diagnostics printout when parsing Swaps to required arg mode. Following arguments will be considered of positional type. More... | |
| ArgMap & | separator (Separator s) |
| Sets the key-value separator Sets the named args key-value pair separator character. More... | |
| ArgMap & | note (const std::string &s) |
| Adds a note to usage Adds a note to the arg usage description. More... | |
| void | usage (const std::string &msg="") const |
| Print usage and exit Prints the usage and exits the program. More... | |
| std::string | doc () const |
| Return arg docs Returns the argument documentation as a string. More... | |
Detailed Description
Basic class for arg parsing. Example use:
Member Enumeration Documentation
◆ Separator
|
strong |
Member Function Documentation
◆ arg() [1/3]
| ArgMap & helib::ArgMap::arg | ( | const std::string & | name, |
| T & | value | ||
| ) |
Add a new argument description Adds a new argument description with value of type T. Throws helib::RuntimeError if the arg key is duplicated or if the storing variable is used more than once.
- Template Parameters
-
T The type of the argument
- Parameters
-
name The argument name (key) value a variable where the argument will be stored. Also used as default value
- Returns
- A reference to the modified ArgMap object
◆ arg() [2/3]
| ArgMap & helib::ArgMap::arg | ( | const std::string & | name, |
| T & | value, | ||
| const std::string & | doc | ||
| ) |
Add a new argument with docs Adds a new argument description with value of type T and docs. Throws helib::RuntimeError if the arg key is duplicated or if the storing variable is used more than once.
- Template Parameters
-
T The type of the argument
- Parameters
-
name The argument name (key) value a variable where the argument will be stored. Also used as default value doc1 Description of the argument used when displaying usage
- Returns
- A reference to the modified ArgMap object
◆ arg() [3/3]
| ArgMap & helib::ArgMap::arg | ( | const std::string & | name, |
| T & | value, | ||
| const std::string & | doc, | ||
| const char * | info | ||
| ) |
Add a new argument with docs and default description Adds a new argument description with value of type T, with docs and default description. Throws helib::RuntimeError if the arg key is duplicated or if the storing variable is used more than once.
- Template Parameters
-
T The type of the argument
- Parameters
-
name The argument name (key) value a variable where the argument will be stored. Also used as default value doc1 Description of the argument used when displaying usage info The default value description (ignored if nullptr or "")
- Returns
- A reference to the modified ArgMap object
◆ diagnostics()
|
inline |
Turns on diagnostics printout when parsing Swaps to required arg mode. Following arguments will be considered of positional type.
- Returns
- A reference to the ArgMap object
◆ doc()
|
inline |
Return arg docs Returns the argument documentation as a string.
- Returns
- the argument documentation string
◆ dots()
| ArgMap & helib::ArgMap::dots | ( | C & | container, |
| const char * | name | ||
| ) |
Adds variable number of positional arg types after defined arg types are exhausted. These are treated as optional.
- Parameters
-
container holds the variable positional args. It must have a push_back method for insertion
- Returns
- A reference to the ArgMap object
◆ helpArgs() [1/2]
|
inline |
Provide custom help toggle args. (defaults are "-h", "--help") Overwrite default help toggle args to custom ones for parsing.
- Returns
- A reference to the ArgMap object
◆ helpArgs() [2/2]
|
inline |
◆ named()
|
inline |
Swaps to named arg type (default) Swaps to required arg mode. Following arguments will be considered of named type.
- Returns
- A reference to the ArgMap object
◆ note()
|
inline |
Adds a note to usage Adds a note to the arg usage description.
- Parameters
-
s The note string
- Returns
- A reference to the ArgMap object
◆ optional()
|
inline |
Swaps to optional arg mode (default) Swaps to optional arg mode. Following arguments will be considered optional.
- Returns
- A reference to the ArgMap object
◆ parse() [1/2]
|
inline |
Parse the configuration/parameters file Parsing a configuration file only functions with named arguments Parse the config file Throws RuntimeError on failure.
- Parameters
-
filepath the config file path
- Returns
- A reference to the ArgMap object
◆ parse() [2/2]
|
inline |
Parse the argv array Parse the argv array If it fails or -h is an argument it prints the usage and exits the program.
- Parameters
-
argc number of entries in argv argv array containing the arguments
- Returns
- A reference to the ArgMap object
◆ positional()
|
inline |
Swaps to positional arg type Swaps to required arg mode. Following arguments will be considered of positional type.
- Returns
- A reference to the ArgMap object
◆ required()
|
inline |
Swaps to required arg mode Swaps to required arg mode. Following arguments will be considered required.
- Returns
- A reference to the ArgMap object
◆ separator()
Sets the key-value separator Sets the named args key-value pair separator character.
- Parameters
-
s the separator enum must be set either to COLON or EQUALS(default).
- Returns
- A reference to the ArgMap object
◆ toggle()
|
inline |
Swaps to toggle arg type Swaps to required arg mode. Following arguments will be considered of toggle type.
- Returns
- A reference to the ArgMap object
◆ usage()
|
inline |
Print usage and exit Prints the usage and exits the program.
- Parameters
-
msg An additional message to print before showing usage
The documentation for this class was generated from the following file:
- /HElib/include/helib/ArgMap.h


To get an object by its identifier use the retrieve
method of the Api class. The object returned by the
subscriber is of the serializer type of your model.
Nested objects are also cast to the serializer serializer type. In this example the Pokemon object has a Specie object and its methods and api are available.


This week Mimosa 2.0 was released. I'm exited to get this release out as it makes Mimosa leaner, meaner, easier to reason about for its users and its maintainer, and a ton easier to maintain long-term.
Compiler Refactor
The biggest change with this major release is the extraction of all of Mimosa's compilers out of Mimosa's core and into separate Mimosa modules. The only drawback of this change is that you now have to list your compilers in mimosa-config
's modules
array. A little less magic isn't a bad thing.
But the advantages are many.
It is now super easy to many compilers of your own. Before, a new compiler would have required a pull request to Mimosa. If you want to, for instance, create an EmberScript compiler well, that just got easier. And there are bunches of existing compiler modules to use as examples.
Mimosa now takes a lot less time to download. I heard more than a few times that
npm install
ing Mimosa felt a bit like you were downloading all of NPM. Yanking out the compilers reduced install time by 60-70%. As more compilers get developed Mimosa's dependency bloat would have only worsened.Maintaining and impoving compilers can now happen apart from Mimosa itself. If a single compiler gets upgraded, it won't require a new version of Mimosa to be released.
Mimosa core is smaller. The smaller and more modular it gets the less time I spend working on Mimosa's core and the more time I spend building out the modules my team and those others using Mimosa need.
Some of the old config, like compilers
and templates.handlebars
has been moved to their logical locations. Each compiler manages its own extensions and overrides for the compiler library if specific versions are needed.
After having updated a dozen or so projects to 2.0
I can say that these changes generally mean less config and a config that makes more sense.
There were plenty of other tweaks and fixes. For a comprehensive list of all that went into 2.0
, check out the Release Notes.
2.1
Work on 2.1
will start shortly and it'll be heavily logging focused. After not getting much love or attention since the beginning, there has been a lot of feedback that logging needs to get better and more flexible, and it will.
Feedback
I love hearing what people are doing with Mimosa and helping folks through any trouble they may have. Shoot me a note @mimosajs, or hit the Google Groups or just make a GitHub issue to discuss what is on your mind.


Oops
Error 500: We're experiencing an internal server problem.
We've been alerted of the error and will resolve the problem as soon as possible.
In the meantime, please return to the
home page
and try again.


“Clustering is the task of grouping a set of objects in such a way that objects in the same group (called a cluster) are more similar (in some sense or another) to each other than to those in other groups (clusters).”
(-- Wikipedia)
So the goal is the same as we've seen before in this room: creating an algorithm that upon receiving a sample of sort, will be able to decide and know in which group to put that sample.
Spectral is coming from Spectral Graph Theory.
“In mathematics, spectral graph theory is the study of properties of a graph in relationship to the characteristic polynomial, eigenvalues, and eigenvectors of matrices associated to the graph, such as its adjacency matrix or Laplacian matrix.”(-- Wikipedia)
So in this algorithm, we will use Similarity Graphs and their Adjacency Matrix, which we will use to create the Laplacian Matrix of the graph, or the Graph Laplacian.
So now we can reformulate the problem of clustering to the problem of finding a partition of the graph $G$ such that the edges between the different groups in the partition have very low (if at all) weights, and the weights of edges inside a group have a very high weights.
We'll mention the popular constructions to transform our data points into graph:
All those graphs are used in spectral clustering. There is no info on how the choice of method influence the results.
As we mentioned earlier, the concept of Spectral Clustering is coming from the field of spectral graph theory, in which graph Laplacians matrices are the primary tool. So they will be primary tool in spectral clustering as well.
We are now going to define the graph Laplacians and mention their most important properties.
Note: There is no unique convention which matrix exactly is called "graph Laplacians".
Mostly, every author gives is own version of it.
Pre-assumptions:
Considering D - the degree matrix of $G$, and $W$ - the weight matrix of $G$, we get the unnormalized graph Laplacian: \[ L=D-W \]
Note: self edges, which "sits" on the diagonal of the adjacency matrix $W$, do not change the graph Laplacians.
Lets introduce some important properties of $L$:
Let $G$ be an undirected graph with non-negative weights. Then the multiplicity $k$ of the eigenvalue $0$ of $L$ equals the number of connected components $A_1,...,A_k$ in the graph. The eigenspace of eigenvalue $0$ is spanned by the indicator vectors $\mathbb{1}_{A_1},...,\mathbb{1}_{A_k}$ of those components.
There are two matrices which are called normalized graph Laplacians in the literature. Both of them are closely related to each other:
A symmetric normalized graph Laplacian: \[ L_{sym}:=D^{-1/2}LD^{-1/2}=I-D^{-1/2}WD^{-1/2} \]
A Random Walk like normalized graph Laplacian: \[ L_{rw}:=D^{-1}L=I-D^{-1}W \]
Let $G$ be an undirected graph with non-negative weights. Then the multiplicity $k$ of the eigenvalue $0$ of both $L_{rw}$ and $L_{sym}$ equals the number of connected components $A_1,...,A_k$ in the graph.
For $L_{rw}$, the eigenspace of $0$ is spanned by the indicator vectors $\mathbb{1}_{A_1},...,\mathbb{1}_{A_k}$ of those components.
For $L_{sym}$, the eigenspace of $0$ is spanned by the vectors $D^{1/2}\mathbb{1}_{A_i}$.
In this part we going to see the most common spectral clustering algorithms.
Some assumptions before we start:
Input: Similarity matrix $S \in \mathbb{R}^{n\times n}$, $k$ of clusters to construct.
Output: Clusters $A_1,...,A_k$ with $A_i=\{j \mid y_j \in C_j\}$
Input: Similarity matrix $S \in \mathbb{R}^{n\times n}$, $k$ of clusters to construct.
Output: Clusters $A_1,...,A_k$ with $A_i=\{j \mid y_j \in C_j\}$
Input: Similarity matrix $S \in \mathbb{R}^{n\times n}$, $k$ of clusters to construct.
Output: Clusters $A_1,...,A_k$ with $A_i=\{j \mid y_j \in C_j\}$
As we know, clustering is to seperate points in different groups according to their similarities.
If the data is given in form of a similarity graph, we can restate the clustering problem as graph partitioning problem, such that the edges between different groups of the graph have a very low weight, and the edges within a group have high weight.
The simplest and most direct way to construct a partition of a graph is to solve the mincut problem: For a given number $k$ of subsets - choose a partition $A_1,...,A_k$ that minimizes
\[
\mbox{cut}(A_1,...,A_k):=\frac{1}{2}\sum_{i=1}^kW(A_i,\bar{A_i})
\]
Here, we use the notation $W(A,B):=\sum_{i \in A,j \in B}w_{ij}$ that we seen before, and $\bar{A}$ for the complement of $A$.
For $k=2$, mincut is relatively easy problem to solve, even efficiently. But, in practice, sometimes the result is not what we want: In many cases, mincut simply separates one individual vertex from the rest.
One way to solve it, is to explicitly request that the sets $A_1,...,A_k$ are "reasonably large". The two most common functions to encode this are RatioCut and the normalized cut Ncut.
\[ \mbox{RatioCut}(A_1,...,A_k):=\frac{1}{2}\sum_{i=1}^k\frac{W(A_i,\bar{A_i})}{|A_i|}=\sum_{i=1}^k\frac{\mbox{cut}(A_i,\bar{A_i})}{|A_i|} \\ \mbox{Ncut}(A_1,...,A_k):=\frac{1}{2}\sum_{i=1}^k\frac{W(A_i,\bar{A_i})}{\mbox{vol}(A)}=\sum_{i=1}^k\frac{\mbox{cut}(A_i,\bar{A_i})}{\mbox{vol}(A)} \]
The difference between RatioCut and Ncut is how they defined the size of a subset $A_i$:
RatioCut define it as the the number of vertices in $A_i$: $|A_i|$.
Ncut define it as the weights of the edges in $A_i$: $\mbox{vol}(A)$.
As easily seen in the formulas of RatioCut and Ncut, both of them are minimized if the respective sizes of the clusters $A_i$ are large "together", or in other words - balanced.
This added condition (balanced clusters) makes the previously simple problem to solve now a NP hard.
Spectral clustering is a way to solve relaxed versions of those problems.
Our goal is to solve the optimization problem \[ \min_{A\subset V}{\mbox{RatioCut}(A,\bar{A})} \tag{1} \]
We're going to try to write it in a better way.
For given subset $A \subset V$ we defined $f=(f_1,...,f_n)'\in \mathbb{R}^n$ such that:
\[
f_i=
\left\{
\begin{array}{ll}
\sqrt{|\bar{A}|/|A|} & \mbox{if } v_i \in A \\
-\sqrt{|A|/|\bar{A}|} & \mbox{if } v_i \in \bar{A}
\end{array}
\right.
\tag{2}
\]
Now we can rewrite the RatioCut function with the unnormalized graph Laplacian: \[ f'Lf=\frac{1}{2}\sum_{i,j=1}^nw_{ij}(f_i-f_j)^2 =\frac{1}{2}\sum_{i\in A,j\in \bar{A}}w_{ij}\Bigg(\sqrt{\frac{\bar{A}}{A}}+\sqrt{\frac{A}{\bar{A}}}\Bigg)^2 + \\ \frac{1}{2}\sum_{i\in \bar{A},j\in A}w_{ij}\Bigg(-\sqrt{\frac{\bar{A}}{A}}-\sqrt{\frac{A}{\bar{A}}}\Bigg)^2 =\mbox{cut}(A,\bar{A})\Bigg(\frac{|\bar{A}|}{|A|}+\frac{|A|}{|\bar{A}|}+2\Bigg)\\ =\cdot\cdot\cdot=|V|\cdot\mbox{RatioCut}(A,\bar{A}) \]
Additionally, we have
\[ \sum_{i=1}^nf_i=\sum_{i \in A}{\sqrt{\frac{|\bar{A}|}{|A|}}}-\sum_{i \in \bar{A}}{\sqrt{\frac{|A|}{|\bar{A}|}}}=|A|{\sqrt{\frac{|\bar{A}|}{|A|}}}-|\bar{A}|{\sqrt{\frac{|A|}{|\bar{A}|}}}=0 \]
Means, the vector $f$ from Eq. $(2)$ is orthogonal to the vector $\mathbb{1}$. Finally, $f$ satisfies:
\[
\|f\|^2=\sum_{i=1}^nf_i^2=|A|\frac{|\bar{A}|}{|A|}+|\bar{A}|\frac{|A|}{|\bar{A}|}=|\bar{A}|+|A|=n
\]
Altogether the problem of minimizing $(1)$ can be rewritten as :
\[
\mbox{min}_{A \subset V}f'Lf \;\;\mbox{s.t.}\;\; f\perp \mathbb{1},f_i \;\;\mbox{as defined in Eq.}\;(2), \|f\|=\sqrt{n} \tag{3}
\]
This is a discrete optimization problem ($f$ entries only allowed to take two particular values) and of course it is still NP hard. The most obvious relaxation in this setting is to allow that $f_i$ takes any value in $\mathbb{R}$.
So we get the following relaxed optimization problem:
\[
\mbox{min}_{f \in \mathbb{R}^n}f'Lf \;\;\mbox{s.t.}\;\; f\perp \mathbb{1}, \|f\|=\sqrt{n} \tag{4}
\]
By Rayleigh-Ritz theorm, the solution of this problem is given by the 2nd smallest eigenvector of $L$ (the 1st smallest is value $0$ with vector $\mathbb{1}$).
So we can approximate a minimizer of RatioCut by the 2nd eigenvector of $L$. But, we need to transform the real-valued solution into a discrete indicator vector. The simplest way to do that is:
\[
\left\{
\begin{array}{ll}
v_i \in A & \mbox{if } f_i \geq 0 \\
v_i \in \bar{A} & \mbox{if } f_i < 0
\end{array}
\right.
\]
But, for larger $k$ values, that way is too simple. What most spectral clustering algorithms do, is treat the coordinates $f_i$ as points in $\mathbb{R}$ and cluster them into two groups $C,\bar{C}$ by the $k$-means method.
\[
\left\{
\begin{array}{ll}
v_i \in A & \mbox{if } f_i \in C \\
v_i \in \bar{A} & \mbox{if } f_i \in \bar{C}
\end{array}
\right.
\]
This is exactly the unnormalized spectral clustering algorithm for the case of $k=2$.
Given a partition of $V$ into $k$ sets $A_1,...,A_k$, we defined $k$ indicator vectors $h_j=(h_{1,j},...,h_{n,j})'$ by
\[
h_{i,j}=
\left\{
\begin{array}{ll}
1/\sqrt{|A_j|} & \mbox{if } v_i \in A_j \\
0 & \mbox{otherwise}
\end{array}
\right.
\quad
\quad
(i=1,...,n;j=1,...,k)
\tag{5}
\]
Then we set the matrix $H \in \mathbb{R}^{n \times k}$ such that its columns are $h_{i,j}$. Also we can see that H columns' are orthonormal o each other - $H'H=I$. So we get:
\[
h_i'Lh_i=\frac{\mbox{cut}(A_i,\bar{A_i})}{|A_i|}=(H'LH)_{ii}
\]
And using all that we get:
\[
\mbox{RatioCut}(A_1,...,A_k)=\sum_{i=1}^kh_i'Lh_i=\sum_{i=1}^k(H'LH)_{ii}=\mbox{Tr}(H'LH)
\]
So now we can rewrite the problem of minimizing $\mbox{RatioCut}(A_1,...,A_k)$ as:
\[
\mbox{min}_{A_1,...,A_k} \mbox{ Tr}(H'LH) \;\;\mbox{s.t.}\;\; H'H=I, H \;\;\mbox{as defined in Eq.}\; (5)
\]
Same as the $k=2$ case, we can relax the problem by allowing it to get real-values entries, and:
\[
\mbox{min}_{H \in \mathbb{R}^{n \times k}} \mbox{ Tr}(H'LH) \;\;\mbox{s.t.}\;\; H'H=I
\]
Again, we need to re-convert the real valued solution matrix into a discrete partition.
We can see that the matrix $H$ is in fact the matrix $U$ used in the unnormalized spectral clustering algorithm. As in the $k=2$ case, we now use the $k$-means method on the rows of $U=H$.
The process for Ncut is quiet similar to the one we did for RatioCut.
In the case $k=2$, we define the cluster indicator vector $f$ by:
\[
f_i=
\left\{
\begin{array}{ll}
\sqrt{\frac{\mbox{vol}(\bar{A})}{\mbox{vol}(A)}} & \mbox{if } v_i \in A \\
-\sqrt{\frac{\mbox{vol}(A)}{\mbox{vol}(\bar{A})}} & \mbox{if } v_i \in \bar{A}
\end{array}
\right.
\tag{6}
\]
As before, $(Df)'\mathbb{1}=0,f'Df=\mbox{vol}(V), \mbox{ and } f'Lf=\mbox{vol}(V)\mbox{Ncut}(A,\bar{A})$.
So minimizing Ncut problem can be rewritten as:
\[
\mbox{min}_Af'Lf \;\;\mbox{s.t.}\;\; f \;\;\mbox{as in}\;\; (6), Df \perp \mathbb{1}, f'Df=\mbox{vol}(V). \tag{7}
\]
Again, relax the problem to allow real values:
\[
\mbox{min}_{f \in \mathbb{R}^n}f'Lf \;\;\mbox{s.t.}\;\; Df \perp \mathbb{1}, f'Df=\mbox{vol}(V). \tag{8}
\]
Now we substitute $g:=D^{1/2}f$:
\[
\mbox{min}_{g \in \mathbb{R}^n}g'\underbrace{D^{-1/2}LD^{-1/2}}_{=L_{sym}}g\;\;\mbox{s.t.}\;g\perp D^{1/2}\mathbb{1},\;\|g\|^2=\underbrace{\mbox{vol}(V)}_{=\mbox{const}}. \tag{9}
\]
Also notice that $D^{1/2}\mathbb{1}$ is the first eigenvector of $L_{sym}$. Then, problem $(9)$ is in the form of Rayleigh-Ritz theorem, thus the solution is given by the 2nd eigenvector of $L_{sym}$.
Re-substituting $f=D^{-1/2}g$ and using the properties of $L_{sym}$ we see that $f$ is the 2nd eigenvector of $L_{rw}$, or the equivalently generalized eigenvector of $Lu=\lambda Du$.
For $k>2$, we defined the indicator vectors $h_j=(h_{1,j},...,h_{n,j})'$ by
\[
h_{i,j}=
\left\{
\begin{array}{ll}
1/\sqrt{\mbox{vol}(A_j)} & \mbox{if } v_i \in A_j \\
0 & \mbox{otherwise}
\end{array}
\right.
\quad
\quad
(i=1,...,n;j=1,...,k)
\tag{10}
\]
Then we set the matrix $H \in \mathbb{R}^{n \times k}$ such that its columns are $h_{i,j}$. Also - $H'H=I, h'_iDh_i=\mathbb{1}, h'_iLh_i=\mbox{cut}(A_i,\bar{A_i})/\mbox{vol}(A_i)$. So we get:
\[
\mbox{min}_{A_1,...,A_k} \mbox{ Tr}(H'LH) \;\;\mbox{s.t.}\;\; H'DH=I, H \;\;\mbox{as in Eq.}\; (10)
\]
Realxing the discreteness condition and substituting $T=D^{1/2}H$ we get:
\[
\mbox{min}_{T \in \mathbb{R}^{n \times k}} \mbox{ Tr}(T'D^{-1/2}LD^{-1/2}T) \;\;\mbox{s.t.}\;\; T'T=I
\]
Re-substituting $H=D^{-1/2}T$ we see that the solution $H$ consists of the first $k$ eigenvectors of $L_{rw}$, or of $Lu=\lambda Du$.
This yields the normalized spectral clustering algorithm by $L_{rw}$.
One important fact to remember: There is no guarantee on the quality of the solution of the relaxed problem, in compare with the exact solution. The diff between them can be large. Lets look on the next graph:
This graph is called The cockroach graph (Guattery and Miller (1998)). The ideal cut for $k=2$ will obviously be cutting the edges $(v_k,v_{k+1}),(v_{3k},v_{3k+1})$, which will give RatioCut value of $2/k$. But it can be showed that unnormalized spectral clustering always cuts the vertical edges, causing the RatioCut value to be $1$.
In general it is known that there are no efficient algorithms to approximate balanced graph cuts - and it is even NP hard problem.
But, still the spectral relaxation is appealing and popular due to the fact that it results in a standard linear algebra problem, which is simple to solve.
Another way to explain spectral clustering is based on random walks on the similarity graph. A random walk on a graph is a stochastic process, which randomly jumps from vertex to vertex.
The goal of spectral clustering here is to find a partition such that the random walk stays long within the same cluster, and seldom jumps between clusters.
Adding that to mincut problem - a graph with low cut will "force" the random walk to stay on the same cluster, because it will have less "exits".
The transition probability of jumping in one step from vertex $v_i$ to $v_j$ is proportional to $w_{ij}$, by $p_{ij}:=w_{ij}/d_i$. And we can define the transition matrix $P=(p_{ij})_{i,j=1,...,n}$ will be:
\[
P=D^{-1}W
\]
If the graph is connected and not-bipartite, the random walk always possesses a unique stationary distribution $\pi=(\pi_1,...,\pi_n)'$, where $\pi_i=d_i/\mbox{vol}(V)$.
Also, $L_{rw}=I-D^{-1}W = I-P$, which means that $\lambda$ is an eigenvalue of $L_{rw}$ with eigenvector $u$ if and only if $1-\lambda$ is an eigenvalue of $P$ with eigenvector $u$.
So we get that the largest eigenvectors of $P$ and the smallest eigenvectors of $L_{rw}$ can be used to describe cluster properties of the graph.
Let $G$ be connected and non-bipartite. Assume that we run the random walk $(X_t)_{t\in\mathbb{N}}$ starting with $X_0$ in the stationary distribution $\pi$. For disjoint subsets $A,B \subset V$, denote by $P(B\mid A):=P(X_1 \in B \mid X_0 \in A)$. Then:
\[
\mbox{Ncut}(A,\bar{A})=P(\bar{A}\mid A) + P(A \mid \bar{A}).
\]
This leads to a nice interpretation of Ncut and normalized spectral clustering: when we minimize Ncut, we actually searching for a cut such that a random walk seldom transitions $A$ to $\bar{A}$ and vice versa.
The commute distance (also called resistance distance) $c_{ij}$ is the expected time it takes the random walk to travel from $v_i$ to $v_j$ and back.
The commute distance has several nice properties, which making it particularly appealing for machine learning. As opposed to the shortest path distance on a graph, the commute distance decreases if there are many different short ways from $v_i$ to $v_j$.
So commute distance looks at the set of short paths. By commute distance, two points are closer not only by the short path between them, but also if they lies in the same high-density region of the graph. So commute distance is well-suited for clustering purposes.
The commute distance on a graph can be computed with the help of the generalized inverse (pseudo-inverse, Moore-Penrose inverse) $L^\dagger$ of the graph Laplacian $L$.
We've seen that $L$ can be decomposed as $L=U\Lambda U'$, where $U$ columns are the eigenvectors, and $\Lambda$ is the diagonal matrix with the eigenvalues $\lambda_1,...,\lambda_n$ on the diagonal. As at least one eigenvalue is $0$, $L$ is not invertible. So, we define its generalized inverse as: $L^\dagger:=U\Lambda^\dagger U'$ where the matrix $\Lambda^\dagger$ is the diagonal matrix with diagonal entries $1/\lambda_i$ if $\lambda_i \neq 0$ and $0$ if $\lambda_i=0$.
$L^\dagger$ is positive semi-definite and symmetric, and the entries of $L^\dagger$ can be computed as: $l_{ij}^\dagger = \sum_{k=2}^n \frac{1}{\lambda_k}u_{ik}u_{jk}$.
So, lets say we have an undirected, connected graph, and we want to compute the commute distance. That can be done by:
\[
c_{ij}=\mbox{vol}(V)(l_{ii}^\dagger-2l_{ij}^\dagger+l_{jj}^\dagger)=\mbox{vol}(V)(e_i-e_j)'L^\dagger(e_i-e_j)
\]
There are other ways to express $c_{ij}$, with use of $L_{sym}$ or determinants of certain sub-matrices of $L$, but the reason of choosing this expression is this: It shows that $\sqrt{c_{ij}}$ can be considered as an Euclidean distance function on the vertices of the graph.
This means that we can construct an embedding which maps the vertices $v_i$ of the graph on points $z_i \in \mathbb{R}^n$ such that the Euclidean distance between the points $z_i$ coincide with the commute distance on the graph: Choose $z_i \in \mathbb{R}^n$ corresponding to the $i$-th row of $U(\Lambda^\dagger)^{1/2}$, and we get:
\[
\langle z_i,z_j \rangle = e_i'L^\dagger e_j \\
c_{ij}=\mbox{vol}(V)\|z_i-z_j\|^2
\]
But still the embedding used in spectral clustering and commute distance are not identical. There are some differences, and without making further assumptions (like choosing a strictly positive similarity function), the relation between them is rather loose.
Constructing the similarity graph for spectral clustering is not a trivial task, and little is known on theoretical implications of the different constructions.
First, we need to decide which similarity function to use. Obviously, we need to choose a function that will have some meaning for our data points - that the function will give high similarity to points from same group, and the opposite.
More over, the global "long-range" behavior of the similarity function is not so important - two points won't be connected whether they have similarity of $0.01$ or $0.001$.
Usually, when the data points live in the Euclidean space $\mathbb{R}^d$, we'll take the Gaussian similarity function: \[ s(x_i,x_j)=e^{{-\|x_i-x_j\|^2}/{2\sigma^2}} \]
If we conclude this, the choice of the similarity function depends on the domain the data comes from. There are no general advices that can be given.
We mentioned earlier 3 different types of similarity graphs.
Later on we will view a toy example, which then we will discuss the different types of graphs and their properties.
As a spoiler of the conclusion their, it's generally recommended to work with the $k$-nearest neighbor graph as a first choice:
How to choose the $k$ or $\epsilon$ parameters wisely? Not an easy task, specially when barely any theoretical results are known to guide us.
All the results of how connectivity of random graphs can be achieved holds only in the case when $\mbox{lim}|V| \to \infty$. All those results don't really help us for choosing in case of finite $|V|$.
In general, if the similarity graph contains more connected components than the number of clusters we want to detect, then the algorithm will return connected components as clusters. which is not always the wanted result.
So, when building the similarity graph, we need to make sure that the graph is connected, or that the number of connected components or isolated vertices is much smaller than the number of clusters we want to get.
If the graph is small or medium-sized, this can be tried out "by foot". For larger graphs, it depends on the graph:
Also, we need to make sure that for most of the data points, the similarity values the function return are not "too small" or "too high".
Specifically for the Gaussian: We can choose $\sigma$ in the order of the mean distance of a point to its $k$-th nearest neighbor (when $k \sim \mbox{log}(n)+1$, as described before). Other way, set $\epsilon$ as before, and then choose $\sigma = \epsilon$.
To summerize the choice of parameters - all the given rules are nice, but nothing is certain. It stays quite a sensitive task in spectral clustering to choose the parameters, and what can work for one set of data points, can fail ultimately for other.
Finding rules which have a theoretical justification should be considered an interesting and important topic for future researches.
Computing the first $k$ eigenvectors of a potentially large graph Laplacian matrix is a hard task. Luckily, using the $k$-nearest or the $\epsilon$-neighborhood graphs, we get sparse matrices, which are easier to solve using methods like the power method or the Lanczos method. The speed of convergence of those algorithms depends on the size of the eigengap (also called spectral gap): $\gamma_k=|\lambda_k-\lambda_{k+1}|$. Larger eigengap value means faster convergence.
When one of the $k$ first eigenvectors has multiplicity larger than $1$, like in case when the eigenvalue $0$ has multiplicity $k$, the eigenspace is spanned by the $k$ cluster indicator vectors, and our computed vectors won't necessarily converge to them.
But, all vectors in the space spanned by the cluster indicator vectors $\mathbb{1}_{A_i}$ have the form $u=\sum_{i=1}^ka_i\mathbb{1}_{A_i}$ for some coefficients $a_i$, so they are piecewise constant on the clusters.
So the vectors returned by the eigensolvers still contain the wanted data about the clusters, which is needed for the $k$-means algorithm to reconstruct the clusters.
Choosing the number $k$ of clusters is a general problem for all clustering algorithms, and as such there are lots of methods to solve it. All of those methods are suitable for spectral clustering.
There is one tool which is particularly designed for spectral clustering: eigengap heuristic. It can be used for all three graph Laplacians. The goal is to choose the number $k$ such that all eigenvalues $\lambda_1,...,\lambda_k$ are very small, but $\lambda_{k+1}$ is relatively large.
There are several justifications for this procedure:
In the toy example we will see later, we will conclude that the eigengap heuristic usually works well if the data contains very well pronounced clusters, but in ambiguous cases it also returns ambiguous results.
Another conclusion is, that the choice of the number of clusters and the choice of the connectivity parameters of the similarity graphs affect each other. In one hand, if the connectivity parameter breaks the graph into, lets say, $k_0$ connected components, then choosing $k_0$ as the number of clusters will be a valid choice. In the other hand, when having a connected graph, is not clear how those two values interacts.
The choice of $k$-means algorithm as the clustering algorithm is an arbitrary choice. For example, in the ideal case of completely separated clusters, we know that the eigenvectors of $L$ and $L_{rw}$ are peicewise constant. In this case, all points $x_i$ which belong to the same cluster $C_s$ are mapped to exactly the sample point $y_i$, namely to the unit vector $e_s\in\mathbb{R}^k$. So any clustering technique applied to the points $y_i\in\mathbb{R}^k$ will be able to extract the correct clusters.
When coming to choose the Laplacian we want to use, first we need to look over the degree distribution of the graph vertices. If they all have (more or less) the same degree, then all three Laplacians will do equally well.
Remember, the partition we find in clustering needs to:
Both Ncut and RatioCut implement the first objective. But what about the second objective? We can write the within-cluster similarities in another way:
\[
W(A,A)=W(A,V)-W(A,\bar{A})=\mbox{vol}(A)-\mbox{cut}(A,\bar{A})
\]
Which means that it is maximized if $\mbox{cut}(A,\bar{A})$ is small and $\mbox{vol}(A)$ is large - and we achieve exactly that by minimizing Ncut. So Ncut implement the 2nd objective.
But RatioCut maximizes $|A|$ and $|\bar{A}|$ and not the $\mbox{vol}(A)$, and that means that RatioCut doesn't implement the 2nd objective.
So, Normalized spectral clustering (Ncut) implement both objective, while unnormalized spectral clustering (RatioCut) only implement the first.
Another issue to consider is consistency: What happen when more and more points are added? Do the clustering results of spectral clustering converge to a useful partition?
For both normalized spectral clustering algorithms, it can be proved that the results do converge, as we take $n \to \infty$. In that limit, $L_{sym}$ converges to an operator $U$, which means that the eigenvectors and eigenvalues of $L_{sym}$ converges into those of $U$. Similar proof can be shown about random walk. So the consistency of both $L_{rw}$ and $L_{sym}$ hold.
That can't be said about unnormalized spectral clustering algorithm. It can be proved that $L$ doesn't converge, or converge to trivial solution, such as single point being a cluster. That's true not only for very large sample size, but even in case of small sample size.
The way to prevent those problems is this: We need to make sure that the eigenvalues of $L$ used in spectral clustering are significantly smaller than the minimal degree in the graph.
The mathematical reason for this condition is that eigenvectors larger than the minimal degree approximate Dirac functions, which have value $\sim0$ in all but one coordinate. So, using those vectors for clustering will seperate the one vertex where the eigenvector is non-zero from the others.
Again, those problems occurs only with unnormalized spectral clustering. Normal spectral clustering doesn't suffer from those issues.
Which normalized Laplacian to use? It seems that $L_{rw}$ is a better choice: The eigenvectors of $L_{rw}$ are cluster indicator vectors $\mathbb{1}_{A_i}$, while those of $L_{sym}$ are additionally multiplied with $D^{1/2}$, which might lead to undesired artifacts. Plus, there are no computational advantages for $L_{sym}$.
So as conclusion, $L_{rw}$ is the better choice.
This example data set consists of a random sample of 200 points $x_1,...,x_{200}\in\mathbb{R}$ drawn according to a mixture of four Gaussians.
This is a histogram of a sample drawn from this distribution (the $x$-axis represents the one-dimensional data space). The Gaussian similarity function was chosen, with $\sigma=1$. For similarity graph, both fully connected and $10$-nearest neighbor graphs are considered.
We're going to show the first eigenvalues and eigenvectors of $L$ and $L_{rw}$. In the eigenvalue plots we plot $i$ vs. $\lambda_i$. In the eigenvector plots of an eigenvector $u=(u_1,...,u_{200})'$ we plot $x_i$ vs. $u_i$ (where here, $x_i$ is simply a real number, so we can put it on $x$-axis).
Here are the results based on the $10$-nearest neighbor graph. We can see that the first four eigenvalues are $0$, and the corresponding eigenvectors are cluster indicator vectors.
The clusters form disconnected parts in the $10$-nearest neighbor graph, and the eigenvectors are given by this and this, accordingly.
Here are the results based on the fully connected graph. As the Gaussian similarity function is always positive, this graph only consists of one connected component. Thus, eigenvalue 0 has multiplicity $1$, and the first eigenvector is the constant vector. The following eigenvectors carry the information about the clusters.
For example, in the unnormalized case, if we threshold the 2nd vector at $0$, then the part below $0$ relate to clusters 1 and 2, and above $0$ relate to clusters 3 and 4, and so on.
In all cases, the first 4 vectors carry all the info about the 4 clusters. And in all the cases - applying $k$-means on this 4 vectors easily detects the correct 4 clusters.
We take distribution on $\mathbb{R}^2$ with three clusters: two "moons" and a Gaussian. The density of the bottom moon is chosen to be larger than the one of the top moon.
Here we can see that it is difficult to choose a useful parameter $\epsilon$. With $\epsilon=0.3$ as in the image, the points on the middle moon are already very tightly connected, while the points in the Gaussian are barely connected. This problem usually occur when the distance between data points is different between regions (named points "on different scales").
$k$-nearest neighbor, though, can connect points "on different scales". We can see that the points in the low-density Gaussian are connected with the high-density moon. But, the 2 high-density moons are clustered apart, as should be. This is a general property of $k$-nearest neighbor graphs - adding low-density region to a close high-density region, and seperating far away high-density regions.
The mutual $k$-nearest neighbor graph connect points within regions of constant density, but does not connect regions of different densities with each other. So it does connect points "on different scales", but doesn't mix those scales with each other. So it seems particularly well-suited in detecting clusters of different densities.
The first row shows the histogram of 3 samples. We construct the $10$-nearest graph and plot the eigenvalues of $L_{rw}$ of each sample (Results for $L$ are similar). The first data sample consists of 4 well seperated clusters, and we can see that the first 4 eigenvalues are $\sim 0$. Then the gap between the 4th and 5th eigenvalue is large, which according to the eigengap heuristic, indicates that the data set contains 4 clusters. In the other samples, the clusters are less pronounced, and the eigengap heuristic is less effective.
In the Practical details part we said that for unnormalized clustering, the way to ensure that the eigenvectors are useful, their eigenvalues need to be significantly lower than the graph minimal degree ("min-deg").
In the image up here and in the next slide, the dashed line is the min-deg, eigenvectors above it are blue stars, below are red diamonds.
We can see in the image, that the eigenvector corresponding the "red" eigenvalues are "useful" eigenvectors. When $\sigma=1$, the eigenvalues 2,3,4 are below the min-deg, and their vectors are meaningful.
Now we increase $\sigma$, and we can see as the eigenvalues tend to move toward the min-deg.
In case of $\sigma=2$, only first 3 values are below the min-deg, and in case when $\sigma=5$, only the first 2 values are below it.
We can also see, that as soon as the eigenvalue get closer to the min-deg, their eigenvector approximate a Dirac fucntion, and they are useless for clustering.
To summerize, main advantages of spectral clustering over other clustering methods are:
However, spectral clustering cannot serve as a "black box algorithm":
So spectral clustering can be considered a powerful tool that can produce good results, if applied with care.


This port lies about 120nm south of Juneau, at the mouth of the Stikine River. The main activities here are fishing and logging.
The boatyard here has long-term storage and a 150 ton travel lift which makes it an attractive winter stopover, becasue unlike Canada or Washington State, remaining for more than 6 months does not attract tax.
Position 56°23′06″N, 132°05′11″W
This is not a port of entry.
Wrangell has three full service recreational and commercial harbour basins which can accommodate everything from 18' skiffs to 100+' yachts, tenders and tugboats.
There are visitor's berths and floating docks during the summer. There berths have water and power.
Last updated October 2015.


Search By Location
Free Food Finder
Home
About/FAQ
Resources
Map
Calendar
Click a red marker on the map to see location information
Region:
Phone Number:
Address:
Open Days:
Open hours:
Website:
Location Offerings:
Things to know:


?Ok-S-f
\
Olyra
latifolia
L.
Oct
T
R
Sodtntnm
t
f
0.
ZutoÈgÈ.
Aug
19S3
SMITHSONIAN
INSTITUTION
From
THE
UNITED
STATES
NATIONAL
HERBARIUM
Vicinity
or
Anse
Galette,
Gonave
Island
NoJ
24/
E.
C.
LEONARD,
Collector
March
3-14
1920
UNITED
STATES
NATIONAL
HERBARIUM
PLANTS
OF
HAITI
BIOLOGICAL
EXPLORATION
CONDUCTED
BY
DB.
W.
L.
ABBOTT
IbDHEM?
1604247
Legend -
Level of confidence that token is an accurately-transcribed word
extremely low
very low
low
undetermined
medium
high
very high


MEDIUM LEVEL 2
Use the buttons on the News Cards to flip for answers
Fake
Do you know that?...
Everything about Baltimore Gazette site is a hallmark of a hastily thrown-together hoax site: several of the news topic sections are merely placeholders with no content, and the physical address provided in the “contact us” section is a non-existent one.
Fact Check Source
True
Origin
This is all over in Norwegian news media that the authorites are working towards preventing to intensify the spread of ongoing pandemic, COVID-19.
Fact Check Source
True
This is a real news article
"When you tell me that, you know, he should testify because he's going to tell the truth and he shouldn't worry, well, that's so silly because it's somebody's version of the truth. Not the truth," Giuliani told NBC's Chuck Todd on Sunday morning during "Meet the Press."
Fact Check Source
Fake
Sorry! That’s fake news
The source is from Empirenews website which is a satire site.
Note that words like “fake news struck again”, “you’re all buying it” reads like a parody.
Fact Check Source
True
The Guardian is a British left-leaning newspaper that follows the fact-based reporting.
These search results may change today but the article is a useful lesson about search results can be manipulated.
Fact Check Source
Fake
The story was sourced from a blog called 'Health and Money News' and referenced statements made by Michael Yeadon, who is not the head of Pfizer research. Yeadon did work for Pfizer but left the company in 2011, according to his biographical information in the blog “Lockdown Sceptics,” to which Yeadon has contributed.
Fact Check Source


--- title: Save/Load models using HDF5 files type: docs repo: https://github.com/rstudio/keras menu: main: name: Save/Load models using HDF5 files - keras parent: keras-reference aliases: - /reference/keras/save_model_hdf5.html - /keras/reference/save_model_hdf5.html - /guide/keras/reference/save_model_hdf5.html - /tools/tools/keras/reference/save_model_hdf5.html - /installation/keras/reference/save_model_hdf5.html - /tutorials/keras/reference/save_model_hdf5.html - /guide/tools/keras/reference/save_model_hdf5.html - /deploy/keras/reference/save_model_hdf5.html - /tools/keras/reference/save_model_hdf5.html - /tutorials/tools/keras/reference/save_model_hdf5.html ---
Save/Load models using HDF5 files
save_model_hdf5(object, filepath, overwrite = TRUE, include_optimizer = TRUE)
load_model_hdf5(filepath, custom_objects = NULL, compile = TRUE)
| object | Model object to save |
| filepath | File path |
| overwrite | Overwrite existing file if necessary |
| include_optimizer | If |
| custom_objects | Mapping class names (or function names) of custom (non-Keras) objects to class/functions (for example, custom metrics or custom loss functions). This mapping can be done with the dict() function of reticulate. |
| compile | Whether to compile the model after loading. |
The following components of the model are saved:
The model architecture, allowing to re-instantiate the model.
The model weights.
The state of the optimizer, allowing to resume training exactly where you left off. This allows you to save the entirety of the state of a model in a single file.
Saved models can be reinstantiated via load_model_hdf5()
. The model returned by
load_model_hdf5()
is a compiled model ready to be used (unless the saved model
was never compiled in the first place or compile = FALSE
is specified).
As an alternative to providing the custom_objects
argument, you can
execute the definition and persistence of your model using the
with_custom_object_scope()
function.
The serialize_model()
function enables saving Keras models to
R objects that can be persisted across R sessions.
Other model persistence:
get_weights()
,
model_to_json()
,
model_to_yaml()
,
save_model_tf()
,
save_model_weights_hdf5()
,
serialize_model()


core.wirings.OfflineModule Class
The main class that implements offline webapp functionalities using application cache and local storage. Extends core.wirings.Module to have the ability to be instantiated in the same fashion.
Constructor
core.wirings.OfflineModule
-
opts
Parameters:
-
opts
ObjectAn object containing configurations required by the Core derived class.
-
el
HTMLElementThe node element included in the class composition.
-
Item Index
Methods
cacheStatus
-
status
Virtual protected function. Should be overridden on subclasses. Called automatically when the cache status has changed.
Parameters:
-
status
StringThe status of the application cache.
onApplicationCacheStatus
-
event
The main method handler for checking the application status. Also determines if a web application has gone offline/online
Parameters:
-
event
ObjectContains the information about the current application cache status.
onlineStatus
-
isonline
Virtual protected function. Should be overridden on subclasses. Called automatically when the online/offline state of the application changes.
Parameters:
-
isonline
BooleanTrue/false depending on the applications online/offline state.


« CSS « CSS Reference
The :visited
pseudo-class lets you select only links that have been visited.
Starting in Firefox 4, major limitations to the styles you can apply using this selector have been introduced. For more information on the limitations and the motivation for them, see
Privacy and the :visited selector
. The same limitations have been adopted by other browsers, including Safari 5/4.1 and Chrome 6.
a:visited { color: #4b2f89; } a:visited { background-color: white }
| Browser | Lowest Version |
|---|---|
| Internet Explorer | 3.5 |
| Firefox | 1.0 |
| Opera | 3.5 |
| Safari | 1.0 |


ofEvent
Class for creating custom events. Also used inside oF for it's own events (see ofCoreEvents).
ie: To create a new event:
ofEvent<float> onVolumeChange;
To notify an event of that type:
ofNotifyEvent(onVolumeChange, 10.0);
To add a listener to that event, if the event is for example in an object called mySoundObject, and you want to register testApp as a listener for that event:
ofAddListener(mySoundObject.onVolumeChange,this, &testApp:onVolumeChange);
where testApp::onVolumeChange is a function with the following signature:
void onVolumeChange(float & volume);
See the advancedEventsExample to see a complete example on how to work with events in oF.
Be careful when using events, it's a powerful structure but can also lead to really confusing code as there's no direct calls to an object.
It's important to unregister events in the destruction of listeners, if not an object that has already been destroyed can get called and the application will crash.
Events have a private copy constructor to avoid that a copy of an object with an event gets all the registered listeners of the original. To be able to create a copy of an object that contains an event, use a pointer to an event instead of a normal var. This also means that you cannot store events directly in a vector or any other collection, the solution is the same, just use a pointer to an event.
ie:
wrong:
vector< ofEvent<int> > events;
right:
vector< ofEvent<int>* > events;


Configuration files are used to describe the layout of the output file(s). Two major topics are covered in a config file: The memory layout of the target architecture, and the assignment of segments to memory areas. In addition, several other attributes may be specified.
Case is ignored for keywords, that is, section or attribute names, but it is not ignored for names and strings.
Memory areas are specified in a MEMORY
section. Lets have a look at an
example (this one describes the usable memory layout of the C64):
MEMORY {
RAM1: start = $0800, size = $9800;
ROM1: start = $A000, size = $2000;
RAM2: start = $C000, size = $1000;
ROM2: start = $E000, size = $2000;
}
As you can see, there are two ram areas and two rom areas. The names (before the colon) are arbitrary names that must start with a letter, with the remaining characters being letters or digits. The names of the memory areas are used when assigning segments. As mentioned above, case is significant for these names.
The syntax above is used in all sections of the config file. The name
(ROM1
etc.) is said to be an identifier, the remaining tokens up to the
semicolon specify attributes for this identifier. You may use the equal sign
to assign values to attributes, and you may use a comma to separate
attributes, you may also leave both out. But you must use a semicolon to
mark the end of the attributes for one identifier. The section above may also
have looked like this:
# Start of memory section
MEMORY
{
RAM1:
start $0800
size $9800;
ROM1:
start $A000
size $2000;
RAM2:
start $C000
size $1000;
ROM2:
start $E000
size $2000;
}
There are of course more attributes for a memory section than just start and size. Start and size are mandatory attributes, that means, each memory area defined must have these attributes given (the linker will check that). I will cover other attributes later. As you may have noticed, I've used a comment in the example above. Comments start with a hash mark (`#'), the remainder of the line is ignored if this character is found.
Let's assume you have written a program for your trusty old C64, and you would
like to run it. For testing purposes, it should run in the RAM
area. So
we will start to assign segments to memory sections in the SEGMENTS
section:
SEGMENTS {
CODE: load = RAM1, type = ro;
RODATA: load = RAM1, type = ro;
DATA: load = RAM1, type = rw;
BSS: load = RAM1, type = bss, define = yes;
}
What we are doing here is telling the linker, that all segments go into the
RAM1
memory area in the order specified in the SEGMENTS
section. So
the linker will first write the CODE
segment, then the RODATA
segment, then the DATA
segment - but it will not write the BSS
segment. Why? Enter the segment type: For each segment specified, you may also
specify a segment attribute. There are four possible segment attributes:
ro means readonly
rw means read/write
bss means that this is an uninitialized segment
zp a zeropage segment
So, because we specified that the segment with the name BSS is of type bss,
the linker knows that this is uninitialized data, and will not write it to an
output file. This is an important point: For the assembler, the BSS
segment has no special meaning. You specify, which segments have the bss
attribute when linking. This approach is much more flexible than having one
fixed bss segment, and is a result of the design decision to supporting an
arbitrary segment count.
If you specify "type = bss
" for a segment, the linker will make sure that
this segment does only contain uninitialized data (that is, zeroes), and issue
a warning if this is not the case.
For a bss
type segment to be useful, it must be cleared somehow by your
program (this happens usually in the startup code - for example the startup
code for cc65 generated programs takes care about that). But how does your
code know, where the segment starts, and how big it is? The linker is able to
give that information, but you must request it. This is, what we're doing with
the "define = yes
" attribute in the BSS
definitions. For each
segment, where this attribute is true, the linker will export three symbols.
__NAME_LOAD__ This is set to the address where the
segment is loaded.
__NAME_RUN__ This is set to the run address of the
segment. We will cover run addresses
later.
__NAME_SIZE__ This is set to the segment size.
Replace NAME
by the name of the segment, in the example above, this would
be BSS
. These symbols may be accessed by your code.
Now, as we've configured the linker to write the first three segments and create symbols for the last one, there's only one question left: Where does the linker put the data? It would be very convenient to have the data in a file, wouldn't it?
We don't have any files specified above, and indeed, this is not needed in a
simple configuration like the one above. There is an additional attribute
"file" that may be specified for a memory area, that gives a file name to
write the area data into. If there is no file name given, the linker will
assign the default file name. This is "a.out" or the one given with the
-o
option on the command line. Since the
default behaviour is ok for our purposes, I did not use the attribute in the
example above. Let's have a look at it now.
The "file" attribute (the keyword may also be written as "FILE" if you like
that better) takes a string enclosed in double quotes (`"') that specifies the
file, where the data is written. You may specify the same file several times,
in that case the data for all memory areas having this file name is written
into this file, in the order of the memory areas defined in the MEMORY
section. Let's specify some file names in the MEMORY
section used above:
MEMORY {
RAM1: start = $0800, size = $9800, file = %O;
ROM1: start = $A000, size = $2000, file = "rom1.bin";
RAM2: start = $C000, size = $1000, file = %O;
ROM2: start = $E000, size = $2000, file = "rom2.bin";
}
The %O
used here is a way to specify the default behaviour explicitly:
%O
is replaced by a string (including the quotes) that contains the
default output name, that is, "a.out" or the name specified with the
-o
option on the command line. Into this file, the
linker will first write any segments that go into RAM1
, and will append
then the segments for RAM2
, because the memory areas are given in this
order. So, for the RAM areas, nothing has really changed.
We've not used the ROM areas, but we will do that below, so we give the file
names here. Segments that go into ROM1
will be written to a file named
"rom1.bin", and segments that go into ROM2
will be written to a file
named "rom2.bin". The name given on the command line is ignored in both cases.
Assigning an empty file name for a memory area will discard the data written to it. This is useful, if the a memory area has segments assigned that are empty (for example because they are of type bss). In that case, the linker will create an empty output file. This may be suppressed by assigning an empty file name to that memory area.
Let us look now at a more complex example. Say, you've successfully tested your new "Super Operating System" (SOS for short) for the C64, and you will now go and replace the ROMs by your own code. When doing that, you face a new problem: If the code runs in RAM, we need not to care about read/write data. But now, if the code is in ROM, we must care about it. Remember the default segments (you may of course specify your own):
CODE read only code
RODATA read only data
DATA read/write data
BSS uninitialized data, read/write
Since BSS
is not initialized, we must not care about it now, but what
about DATA
? DATA
contains initialized data, that is, data that was
explicitly assigned a value. And your program will rely on these values on
startup. Since there's no other way to remember the contents of the data
segment, than storing it into one of the ROMs, we have to put it there. But
unfortunately, ROM is not writable, so we have to copy it into RAM before
running the actual code.
The linker cannot help you copying the data from ROM into RAM (this must be done by the startup code of your program), but it has some features that will help you in this process.
First, you may not only specify a "load
" attribute for a segment, but
also a "run
" attribute. The "load
" attribute is mandatory, and, if
you don't specify a "run
" attribute, the linker assumes that load area
and run area are the same. We will use this feature for our data area:
SEGMENTS {
CODE: load = ROM1, type = ro;
RODATA: load = ROM2, type = ro;
DATA: load = ROM2, run = RAM2, type = rw, define = yes;
BSS: load = RAM2, type = bss, define = yes;
}
Let's have a closer look at this SEGMENTS
section. We specify that the
CODE
segment goes into ROM1
(the one at $A000). The readonly data
goes into ROM2
. Read/write data will be loaded into ROM2
but is run
in RAM2
. That means that all references to labels in the DATA
segment are relocated to be in RAM2
, but the segment is written to
ROM2
. All your startup code has to do is, to copy the data from it's
location in ROM2
to the final location in RAM2
.
So, how do you know, where the data is located? This is the second point,
where you get help from the linker. Remember the "define
" attribute?
Since we have set this attribute to true, the linker will define three
external symbols for the data segment that may be accessed from your code:
__DATA_LOAD__ This is set to the address where the segment
is loaded, in this case, it is an address in
ROM2.
__DATA_RUN__ This is set to the run address of the segment,
in this case, it is an address in RAM2.
__DATA_SIZE__ This is set to the segment size.
So, what your startup code must do, is to copy __DATA_SIZE__
bytes from
__DATA_LOAD__
to __DATA_RUN__
before any other routines are called.
All references to labels in the DATA
segment are relocated to RAM2
by the linker, so things will work properly.
There are some other attributes not covered above. Before starting the reference section, I will discuss the remaining things here.
You may request symbols definitions also for memory areas. This may be useful for things like a software stack, or an i/o area.
MEMORY {
STACK: start = $C000, size = $1000, define = yes;
}
This will define three external symbols that may be used in your code:
__STACK_START__ This is set to the start of the memory
area, $C000 in this example.
__STACK_SIZE__ The size of the area, here $1000.
__STACK_LAST__ This is NOT the same as START+SIZE.
Instead, it it defined as the first
address that is not used by data. If we
don't define any segments for this area,
the value will be the same as START.
A memory section may also have a type. Valid types are
ro for readonly memory
rw for read/write memory.
The linker will assure, that no segment marked as read/write or bss is put into a memory area that is marked as readonly.
Unused memory in a memory area may be filled. Use the "fill = yes
"
attribute to request this. The default value to fill unused space is zero. If
you don't like this, you may specify a byte value that is used to fill these
areas with the "fillval
" attribute. This value is also used to fill unfilled
areas generated by the assemblers .ALIGN
and .RES
directives.
The symbol %S
may be used to access the default start address (that is,
the one defined in the
FEATURES section, or the
value given on the command line with the
-S
option).
Segments may be aligned to some memory boundary. Specify "align = num
" to
request this feature. Num must be a power of two. To align all segments on a
page boundary, use
SEGMENTS {
CODE: load = ROM1, type = ro, align = $100;
RODATA: load = ROM2, type = ro, align = $100;
DATA: load = ROM2, run = RAM2, type = rw, define = yes,
align = $100;
BSS: load = RAM2, type = bss, define = yes, align = $100;
}
If an alignment is requested, the linker will add enough space to the output
file, so that the new segment starts at an address that is dividable by the
given number without a remainder. All addresses are adjusted accordingly. To
fill the unused space, bytes of zero are used, or, if the memory area has a
"fillval
" attribute, that value. Alignment is always needed, if you have
used the .ALIGN
command in the assembler. The alignment of a segment
must be equal or greater than the alignment used in the .ALIGN
command.
The linker will check that, and issue a warning, if the alignment of a segment
is lower than the alignment requested in an .ALIGN
command of one of the
modules making up this segment.
For a given segment you may also specify a fixed offset into a memory area or
a fixed start address. Use this if you want the code to run at a specific
address (a prominent case is the interrupt vector table which must go at
address $FFFA). Only one of ALIGN
or OFFSET
or START
may be
specified. If the directive creates empty space, it will be filled with zero,
of with the value specified with the "fillval
" attribute if one is given.
The linker will warn you if it is not possible to put the code at the
specified offset (this may happen if other segments in this area are too
large). Here's an example:
SEGMENTS {
VECTORS: load = ROM2, type = ro, start = $FFFA;
}
or (for the segment definitions from above)
SEGMENTS {
VECTORS: load = ROM2, type = ro, offset = $1FFA;
}
The "align
", "start
" and "offset
" attributes change placement
of the segment in the run memory area, because this is what is usually
desired. If load and run memory areas are equal (which is the case if only the
load memory area has been specified), the attributes will also work. There is
also an "align_load
" attribute that may be used to align the start of the
segment in the load memory area, in case different load and run areas have
been specified. There are no special attributes to set start or offset for
just the load memory area.
To suppress the warning, the linker issues if it encounters a segment that is
not found in any of the input files, use "optional=yes
" as additional
segment attribute. Be careful when using this attribute, because a missing
segment may be a sign of a problem, and if you're suppressing the warning,
there is no one left to tell you about it.
The FILES
section is used to support other formats than straight binary
(which is the default, so binary output files do not need an explicit entry
in the FILES
section).
The FILES
section lists output files and as only attribute the format of
each output file. Assigning binary format to the default output file would
look like this:
FILES {
%O: format = bin;
}
The only other available output format is the o65 format specified by Andre Fachat (see the 6502 binary relocation format specification). It is defined like this:
FILES {
%O: format = o65;
}
The necessary o65 attributes are defined in a special section labeled
FORMAT
.
The FORMAT
section is used to describe file formats. The default (binary)
format has currently no attributes, so, while it may be listed in this
section, the attribute list is empty. The second supported format, o65, has
several attributes that may be defined here.
FORMATS {
o65: os = lunix, version = 0, type = small,
import = LUNIXKERNEL,
export = _main;
}
In addition to the MEMORY
and SEGMENTS
sections described above, the
linker has features that may be enabled by an additional section labeled
FEATURES
.
CONDES
is used to tell the linker to emit module constructor/destructor
tables.
FEATURES {
CONDES: segment = RODATA,
type = constructor,
label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__;
}
The CONDES
feature has several attributes:
segment
This attribute tells the linker into which segment the table should be placed. If the segment does not exist, it is created.
type
Describes the type of the routines to place in the table. Type may be one of
the predefined types constructor
, destructor
, interruptor
, or
a numeric value between 0 and 6.
label
This specifies the label to use for the table. The label points to the start of the table in memory and may be used from within user written code.
count
This is an optional attribute. If specified, an additional symbol is defined by the linker using the given name. The value of this symbol is the number of entries (not bytes) in the table. While this attribute is optional, it is often useful to define it.
order
Optional attribute that takes one of the keywords increasing
or
decreasing
as an argument. Specifies the sorting order of the entries
within the table. The default is increasing
, which means that the
entries are sorted with increasing priority (the first entry has the lowest
priority). "Priority" is the priority specified when declaring a symbol as
.CONDES
with the assembler, higher values mean higher priority. You may
change this behaviour by specifying decreasing
as the argument, the
order of entries is reversed in this case.
Please note that the order of entries with equal priority is undefined.
Without specifying the CONDES
feature, the linker will not create any
tables, even if there are condes
entries in the object files.
For more information see the .CONDES
command in the
ca65 manual.
STARTADDRESS
is used to set the default value for the start address,
which can be referenced by the %S
symbol. The builtin default for the
linker is $200.
FEATURES {
# Default start address is $1000
STARTADDRESS: default = $1000;
}
Please note that order is important: The default start address must be defined
before the %S
symbol is used in the config file. This does usually
mean, that the FEATURES
section has to go to the top of the config file.
The configuration file may also be used to define symbols used in the link
stage. The mandatory attribute for a symbol is its value. A second, boolean
attribute named weak
is available. If a symbol is marked as weak, it may
be overridden by defining a symbol of the same name from the command line. The
default for symbols is that they're strong, which means that an attempt to
define a symbol with the same name from the command line will lead to an
error.
The following example defines the stack size for an application, but allows
the programmer to override the value by specifying --define
__STACKSIZE__=xxx
on the command line.
SYMBOLS {
# Define the stack size for the application
__STACKSIZE__: value = $800, weak = yes;
}
The builtin configurations are part of the linker source. They can be retrieved
with --dump-config
and don't have a special format. So if you need a
special configuration, it's a good idea to start with the builtin configuration
for your system. In a first step, just replace -t target
by -C
configfile
. Then go on and modify the config file to suit your needs.
Several machine specific binary packages are distributed together with secondary
configurations (in the cfg directory). These configurations can be used with
-C configfile
too.


Sorry, the browser you're currently using does not seem to support WebGL. It could be that WebGL is disabled, or it could be that the browser is out of date. Please check if WebGL is supported and enabled, or supported, or upgrade to a modern browser in order to use the site.


What This is For?
This Website is to support the Technology Community. In This Website You can find a blog to guide you in what computer to choose. Tech Support, this will guide you to help you in any problems that you may run into when using your PC or Laptop. Last Of all you will find contact us were you can contact us if you find a problem in our website.


The charming adventures of an analyst and his solver.
Finding the maximum area inscribed circle inside a polygon.
A common problem in handling geometric data is determining the center of a given polygon. This is not quite so easy as it sounds as there is not a single definition of center that makes sense in all cases. For instance, sometimes computing the center of a polygon's bounding box may be sufficient.  If the given polygon is non-convex, that point may not even be inside or on its boundary.
This post looks at computing Chebyshev centers for arbitrary convex polygons. We employ essentially the same model as in Boyd & Vandenberghe's Convex Optimization text, but using Gurobi instead of CVXOPT.
Consider a polygon defined by the intersection of a finite number of half-spaces, $Au \le b$. We assume we are given the set of vertices, $V$, in clockwise order around the polygon. $E$ is the set of edges connecting these vertices. Each edge in $E$ defines a boundary of the half-space $a_i'u \le b_i$.
The Chebyshev center of this polygon is the center point $(x, y)$ of the maximum radius inscribed circle. That is, if we can find the largest circle that will fit inside our polygon without going outside its boundary, its center is the point we are looking for. Our decision variables are the center $(x, y)$ and the maximum inscribed radius, $r$.
In order to do this, we consider the edges independently. The long line segment below shows an arbitrary edge, $a_i'u \le b_i$. The short line connected to it is orthogonal in the direction $a$. $(x, y)$ satisfies the inequality.
The shortest distance from $(x, y)$ will be in the direction of $a$. We'll call this distance $r$. If we were to move the edge so it had the same slope but went through $(x, y)$, its distance from $a_i'u = b_i$ would be $r||a_i||_2$. Thus we can add a constraint of the form $a_i'u + r||a_i||_2 \le b_i$ for each edge and maximize the value of $r$ as our objective function.
max $r$
subject to $(y_i-y_j)x + (x_j-x_i)y + r\sqrt{(x_j-x_i)^2 + (y_j-y_i)^2} \le (y_i-y_j)x_i + (x_j-x_i)y_i\, \forall\, ((x_i,y_i), (x_j,y_j)) \in E$
As this is linear, we can solve it using any LP solver. The following code does so with Gurobi.
#!/usr/bin/env python
from gurobipy import Model, GRB
from math import sqrt
vertices = [(1,1), (2,5), (5,4), (6,2), (4,1)]
edges = zip(vertices, vertices[1:] + [vertices[0]])
m = Model()
r = m.addVar()
x = m.addVar(lb=-GRB.INFINITY)
y = m.addVar(lb=-GRB.INFINITY)
m.update()
for (x1, y1), (x2, y2) in edges:
dx = x2 - x1
dy = y2 - y1
m.addConstr((dx*y - dy*x) + (r * sqrt(dx**2 + dy**2)) <= dx*y1 - dy*x1)
m.setObjective(r, GRB.MAXIMIZE)
m.optimize()
print 'r = %.04f' % r.x
print '(x, y) = (%.04f, %.04f)' % (x.x, y.x)
The model output shows our center and its maximum inscribed radius.
r = 1.7466 (x, y) = (3.2370, 2.7466)
Question for the reader: in certain circumstances, such as rectangles, the Chebyshev center is ambiguous. How might one get around this ambiguity?


A class that all w2ui widgets are extended from.
Object
This class provides basic event functionality and only has one property and three methods:
- handlers, - an array of all event handlers defined for the class
- on(event, handler) - method to add an event
- off(event, [handler]) - method to remove an event
- trigger(eventData) - method to trigger an event
That you can use it to add event listeners and trigger events. See Events for additional information.