Class ModelRepository
Represents a standard model repository
Inheritance
Implements
Inherited Members
Namespace: NMF.Models.Repository
Assembly: NMF.Models.dll
Syntax
public class ModelRepository : IModelRepository
Constructors
| Improve this Doc View SourceModelRepository()
Creates a new model repository with the meta repository as parent
Declaration
public ModelRepository()
ModelRepository(IModelRepository, IModelSerializer, params IModelLocator[])
Creates a new model repository with a given parent
Declaration
public ModelRepository(IModelRepository parent, IModelSerializer serializer, params IModelLocator[] locators)
Parameters
| Type | Name | Description |
|---|---|---|
| IModelRepository | parent | The parent repository |
| IModelSerializer | serializer | A serializer object or null to use the default |
| IModelLocator[] | locators | A set of model locators |
Remarks
If no parent repository is provided, the meta repository is used as parent repository
ModelRepository(IModelRepository)
Creates a new model repository with a given parent
Declaration
public ModelRepository(IModelRepository parent)
Parameters
| Type | Name | Description |
|---|---|---|
| IModelRepository | parent | The parent repository |
Remarks
If no parent repository is provided, the meta repository is used as parent repository
Properties
| Improve this Doc View SourceLocators
Gets a collection of model locators
Declaration
public ICollection<IModelLocator> Locators { get; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.ICollection<T><IModelLocator> |
Models
Gets a dictionary of the models loaded to this repository
Declaration
public ModelCollection Models { get; }
Property Value
| Type | Description |
|---|---|
| ModelCollection |
Parent
Gets the parent model repository.
Declaration
public IModelRepository Parent { get; }
Property Value
| Type | Description |
|---|---|
| IModelRepository |
Serializer
Gets or sets the serializer that is used for the deserialization of the models
Declaration
public IModelSerializer Serializer { get; set; }
Property Value
| Type | Description |
|---|---|
| IModelSerializer |
Methods
| Improve this Doc View SourceOnBubbledChange(BubbledChangeEventArgs)
Declaration
protected virtual void OnBubbledChange(BubbledChangeEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| BubbledChangeEventArgs | e |
OnUnresolvedModelElement(UnresolvedModelElementEventArgs)
Gets called when a Uri cannot be resolved
Declaration
protected virtual void OnUnresolvedModelElement(UnresolvedModelElementEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| UnresolvedModelElementEventArgs | e | The event data |
Resolve(string)
Resolves the given file path for a model element
Declaration
public Model Resolve(string path)
Parameters
| Type | Name | Description |
|---|---|---|
| string | path | The file path where to look for models |
Returns
| Type | Description |
|---|---|
| Model | The model at this file path or null if the file cannot be found |
Resolve(Uri, bool)
Resolves the given Uri and returns the model element
Declaration
public IModelElement Resolve(Uri uri, bool loadOnDemand = true)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Uri | uri | The Uri where to look for the model element |
| bool | loadOnDemand | A boolean flag indicating whether the uri should be attempted to load, if the model is not already registered with the repository |
Returns
| Type | Description |
|---|---|
| IModelElement | A model element at the given Uri or null if none can be found |
Resolve(Uri, string, bool)
Resolves the given Uri and returns the model element
Declaration
public IModelElement Resolve(Uri uri, string hintPath, bool loadOnDemand = true)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Uri | uri | The Uri where to look for the model element |
| string | hintPath | The path where the model can be found |
| bool | loadOnDemand | A boolean flag indicating whether the uri should be attempted to load, if the model is not already registered with the repository |
Returns
| Type | Description |
|---|---|
| IModelElement | A model element at the given Uri or null if none can be found |
Save(IModelElement, Stream, Uri)
Saves the given model element to the specified stream
Declaration
public void Save(IModelElement element, Stream stream, Uri uri)
Parameters
| Type | Name | Description |
|---|---|---|
| IModelElement | element | The model element |
| System.IO.Stream | stream | The stream to save the model element to |
| System.Uri | uri | The uri under which the model element shall be retrievable |
Save(IModelElement, string, Uri)
Saves the given model element to the specified stream
Declaration
public void Save(IModelElement element, string path, Uri uri)
Parameters
| Type | Name | Description |
|---|---|---|
| IModelElement | element | The model element |
| string | path | The path where to save the model element |
| System.Uri | uri | The uri under which the model element can be retrieved |
Save(IModelElement, string)
Saves the given model element to the specified stream
Declaration
public void Save(IModelElement element, string path)
Parameters
| Type | Name | Description |
|---|---|---|
| IModelElement | element | The model element |
| string | path | The path where to save the model element |
Events
| Improve this Doc View SourceBubbledChange
Declaration
public event EventHandler<BubbledChangeEventArgs> BubbledChange
Event Type
| Type | Description |
|---|---|
| System.EventHandler<TEventArgs><BubbledChangeEventArgs> |
UnresolvedModelElement
Gets fired when a Uri cannot be resolved
Declaration
public event EventHandler<UnresolvedModelElementEventArgs> UnresolvedModelElement
Event Type
| Type | Description |
|---|---|
| System.EventHandler<TEventArgs><UnresolvedModelElementEventArgs> |


Paste your save into this box to get recommendations for heirloom upgrades.
Currently the only mods this will recommend upgrading are Trimp Attack, Crit Chance, Crit Damage, Plaguebringer, Void Map Drop Chance, Fluffy Exp, and Miner Efficiency. If you have other useful mods on your heirlooms (such as Explorer Efficiency or Fragment Drop Rate), you'll have to upgrade them based on feel, as they're very difficult to weigh.
Additionally, this will not recommend replacing mods with stronger ones, nor adding mods in empty slots.
VM weight and XP weight are multipliers to the value of the Void Map Drop Chance and Fluffy Exp mods respectively. So if your next VMDC upgrade were to increase your value by 0.5%, the default weight of 12 will multiply it by 12 so it will be calculated as if it were to increase your value by 6%. The default weights are used to provide a good balance between damage and helium/exp gain.


| DetNet | B. Varga, Ed. |
| Internet-Draft | J. Farkas |
| Intended status: Standards Track | Ericsson |
| Expires: November 6, 2020 | L. Berger |
| LabN Consulting, L.L.C. | |
| A. Malis | |
| Malis Consulting | |
| S. Bryant | |
| Futurewei Technologies | |
| May 5, 2020 |
DetNet Data Plane: MPLS over UDP/IP
draft-ietf-detnet-mpls-over-udp-ip-06
This document specifies the MPLS Deterministic Networking data plane operation and encapsulation over an IP network. The approach is modeled on the operation of MPLS and over UDP/IP packet switched networks.
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."
This Internet-Draft will expire on November 6, 2020.
Copyright (c) 2020 IETF Trust and the persons identified as the document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.
Deterministic Networking (DetNet) is a service that can be offered by a network to DetNet flows. DetNet provides these flows extremely low packet loss rates and assured maximum end-to-end delivery latency. General background and concepts of DetNet can be found in [RFC8655].
This document specifies use of the MPLS DetNet encapsulation over an IP network. The approach is modeled on the operation of MPLS over an IP Packet Switched Network (PSN) [RFC7510]. It maps the MPLS data plane encapsulation described in [I-D.ietf-detnet-mpls] to the DetNet IP data plane defined in [I-D.ietf-detnet-ip].
To carry DetNet MPLS flows with full functionality at the DetNet layer over an IP network, the following components are required (these are a subset of the requirements for MPLS encapsulation listed in [I-D.ietf-detnet-mpls]):
These requirements are satisfied by the DetNet over MPLS Encapsulation described in [I-D.ietf-detnet-mpls] and they are partly satisfied (i.e., IP flows can be identified however no DetNet sequence number is carried) by the DetNet IP data plane defined in [I-D.ietf-detnet-ip]
This document uses the terminology established in the DetNet architecture [RFC8655], and the reader is assumed to be familiar with that document and its terminology.
The following abbreviations are used in this document:
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.
This document builds on the specification of MPLS over UDP defined in [RFC7510]. It may replace partly or entirely the F-Label(s) used in [I-D.ietf-detnet-mpls] with UDP and IP headers. The UDP and IP header information is used to identify DetNet flows, including member flows, per [I-D.ietf-detnet-ip]. The resulting encapsulation is shown in Figure 1. There may be zero or more F-label(s) between the S-label and the UDP header.
Note that this encapsulation works equally well with IPv4, IPv6, and IPv6-based Segment Routing [I-D.ietf-6man-segment-routing-header].
+---------------------------------+ | | | DetNet App-Flow | | Payload Packet | | | +---------------------------------+ <--\ | DetNet Control Word | | +---------------------------------+ +--> DetNet data plane | S-Label | | MPLS encapsulation +---------------------------------+ | | [ F-label(s) ] | | +---------------------------------+ <--+ | UDP Header | | +---------------------------------+ +--> DetNet data plane | IP Header | | IP encapsulation +---------------------------------+ <--/ | Data-Link | +---------------------------------+ | Physical | +---------------------------------+
Figure 1: UDP/IP Encapsulation of DetNet MPLS
S-Labels, A-Labels (when present), d-CW and zero or more F-Labels are used as defined in [I-D.ietf-detnet-mpls] and are not modified by this document.
To support outgoing DetNet MPLS over UDP/IP encapsulation, an implementation MUST support the provisioning of UDP and IP header information in addition or in place of F-Label(s). Note, when PRF is performed at the MPLS service sub-layer, there will be multiple member flows, and each member flow will require the provisioning of their own UDP and IP header information. The headers for each outgoing packet MUST be formatted according to the configuration information and as defined in [RFC7510], and the UDP Source Port value MUST be set to uniquely identify the DetNet flow. The packet MUST then be handled as a DetNet IP packet, per [I-D.ietf-detnet-ip]. This includes QoS related traffic treatment.
To support the receive processing defined in this document, an implementation MUST also support the provisioning of received UDP and IP header information. The provisioned information MUST be used to identify incoming app-flows based on the combination of S-Label and incoming encapsulation header information. Normal receive processing as defined in [I-D.ietf-detnet-mpls], including PEF and POF, can then take place.
As specified in [RFC7510]: "MPLS-in-UDP MUST NOT be used over the general Internet, or over non-cooperating network operators, to carry traffic that is not congestion controlled."
The following summarizes the set of information that is needed to configure DetNet MPLS over UDP/IP: [RFC8655] or management plane.
This information MUST be provisioned per DetNet flow via configuration, e.g., via the controller
It is the responsibility of the DetNet controller plane to properly provision both flow identification information and the flow specific resources needed to provide the traffic treatment needed to meet each flow's service requirements. This applies for aggregated and individual flows.
The solution defined in this document reuses mechanisms specified in other documents, and the security considerations in those documents apply equally to this document. Notably [RFC7510], as this document is primarily an application of MPLS-in-UDP. Additionally, the security considerations of DetNet in general are discussed in [RFC8655] and [I-D.ietf-detnet-security]. Finally,MPLS and IP specific security considerations are described in [I-D.ietf-detnet-mpls] and [I-D.ietf-detnet-ip]. This draft does not have additional security considerations.
This document makes no IANA requests.
The authors wish to thank Pat Thaler, Norman Finn, Loa Anderson, David Black, Rodney Cummings, Ethan Grossman, Tal Mizrahi, David Mozes, Craig Gunther, George Swallow, Yuanlong Jiang and Carlos J. Bernardos for their various contributions to this work.
This document is derived from an earlier draft that was edited by Jouni Korhonen<EMAIL_ADDRESS>and as such, he contributed to and authored text in this document.
| [I-D.ietf-detnet-ip] | Varga, B., Farkas, J., Berger, L., Fedyk, D., Malis, A. and S. Bryant, "DetNet Data Plane: IP", Internet-Draft draft-ietf-detnet-ip-05, February 2020. |
| [I-D.ietf-detnet-mpls] | Varga, B., Farkas, J., Berger, L., Fedyk, D., Malis, A., Bryant, S. and J. Korhonen, "DetNet Data Plane: MPLS", Internet-Draft draft-ietf-detnet-mpls-05, February 2020. |
| [RFC2119] | Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997. |
| [RFC7510] | Xu, X., Sheth, N., Yong, L., Callon, R. and D. Black, "Encapsulating MPLS in UDP", RFC 7510, DOI 10.17487/RFC7510, April 2015. |
| [RFC8174] | Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, May 2017. |
| [I-D.ietf-6man-segment-routing-header] | Filsfils, C., Dukes, D., Previdi, S., Leddy, J., Matsushima, S. and D. Voyer, "IPv6 Segment Routing Header (SRH)", Internet-Draft draft-ietf-6man-segment-routing-header-26, October 2019. |
| [I-D.ietf-detnet-security] | Mizrahi, T. and E. Grossman, "Deterministic Networking (DetNet) Security Considerations", Internet-Draft draft-ietf-detnet-security-09, March 2020. |
| [RFC8655] | Finn, N., Thubert, P., Varga, B. and J. Farkas, "Deterministic Networking Architecture", RFC 8655, DOI 10.17487/RFC8655, October 2019. |


Back
Full name:
Gender:
Phone number:
Company:
Address:
About employee
Employee was registered in the system:
Location


A simple summary of the web front-end evolution, which will try to describe how and why tools improve & why there is still something to explore.


SERENDIPITY (2001). 2 1/2 stars out of 4. Starring John Cusack, Kate Beckinsale, Jeremy Piven, Molly Shannon, John Corbett, Bridget Moynahan and Eugene Levy. Written by Marc Klein. Directed by Peter Chelsom. Rated PG-13. Approx. 85 mins.
Serendipity. What an apt title for a contemporary romantic comedy set in a magical, fairy tale New York.
Yet through circumstances far beyond its control, this movie may stand as a poignant reminder of what New York once was and may someday be again.
It is difficult to watch this sweet outing without thinking about the horrors that hit the Big Apple. Luckily, no scenes take place at the World Trade Center, and it is only glimpsed for a second in an opening shot panorama of the city.
Yet its loss weighs heavily on this movie.
Because for now the wound is too fresh. It is difficult to think of New York as a city of romance and love, when daily television reminds us of the death and destruction that wounded its core.
Serendipity has become a slice of nostalgia before it even hits the theaters.
The movie is one of those cute-meet, boy-girl stories that can only happen on the big screen. John (John Cusack) and Sara (Kate Beckinsale) meet over the glove counter at Bloomingdales when both try to purchase the same pair of gloves for their respective paramours.
They soon forget about the gloves and spend a magical evening roaming the city, from Rockefeller Center to Central Park, luxuriating in each other's company. It is love at first sight - or is it. Sara is a big believer in fate. She tells John that if it is their destiny to be together, that they will find each other again. She writes her name and phone number in a book, which she then sells at a second-hand bookshop.
John, meanwhile, writes his name and number on $5 bill, which Sara spends. Her logic - which, of course, is only credible in the movies - is that if they are destined for each other, the $5 will come back to her, and John will eventually find the book containing her name and number.
A few years pass, and it is the weekend of John's wedding. But, something is nagging at him, so he recruits his best friend, Dean (Jeremy Piven), and they begin seeking Sara.
Sara, who has moved to San Francisco, also is soon to be married. Her betrothed is a self-absorbed New Age musician, Lars (John Corbett). She, too, decides to go searching and shanghai's her best friend, Eve (Molly Shannon), and whisks her off to New York.
You can already guess how all this turns out.
As usual, Cusack turns in a winning performance as the young romantic who - no matter how hard he tries - cannot erase that one special night from his mind. Cusack is one of those actors who - even with such routine material as Serendipity - can transform the material into more than it is. If Cusack was a chef, he could change ground beef into filet mignon.
Beckinsale is charming and resourceful as Sara. She is a lovely actress, easy on the eyes. A nice chemistry develops between her and Cusack.
One minor objection is the sort of heartless manner in which John and Sara just dump their prospective life partners at the last minute. It detracts from the characters, giving them an air of unfeeling selfishness and self-centeredness.
Neither's intended really seems to deserve such an emotionally painful departure. Wisely for director Peter Chelsom both breakups occur off-screen.
Serendipity is a warm vessel with likable stars and an escapist story. If you don't think too much about its setting, it is an enjoyable diversion.
Bob Bloom is the film critic at the Journal and Courier in Lafayette, IN. He can be reached by e-mail at<EMAIL_ADDRESS>or at<EMAIL_ADDRESS>Other reviews by Bloom can be found by going to www.jconline.com and clicking on golafayette. Bloom's reviews also can be found on the Web at the Internet Movie Database: http://www.imdb.com/M/reviews_by?Bob+Bloom
========== X-RAMR-ID: 29717 X-Language: en X-RT-ReviewID: 253558 X-RT-TitleID: 1110303 X-RT-SourceID: 872 X-RT-AuthorID: 1363 X-RT-RatingText: 2.5/4
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


Copyright ©2000 W3C® (MIT, INRIA, Keio), All Rights Reserved. W3C liability, trademark, document use and software licensing rules apply.
This document describes the requirements for the XSLT 1.1 specification.
This section describes the status of this document at the time of its publication. Other documents may supersede this document. The latest status of this document series is maintained at the W3C. This document is the first public XSLT 1.1 Requirements working draft.
This is a W3C Working Draft for review by W3C Members and other interested parties. It is a draft document and may be updated, replaced or made obsolete by other documents at any time. It is inappropriate to use W3C Working Drafts as reference material or to cite them as other than "work in progress". This is work in progress and does not imply endorsement by the W3C membership.
This document has been produced as part of the W3C Style activity, following the procedures set out for the W3C Process. The document has been written by the XSL Working Group ( W3C members only). The goals of the XSL Working Group are discussed in the XSL Working Group charter. The XSL Working Group feels that the contents of this Working Draft are relatively stable, and therefore encourages feedback on this version.
Comments on this document should be sent to the W3C mailing list<EMAIL_ADDRESS>(archived at http://lists.w3.org/Archives/Public/xsl-editors/). A list of current W3C Recommendations and other technical documents can be found at http://www.w3.org/TR/.
In addition to supporting user-defined extensions, numerous XSLT 1.0-compliant processors have exploited the XSLT 1.0 extension mechanism to provide additional built-in transformation functionality. As useful built-in extensions have emerged, users have embraced them and have begun to rely on them. However the benefits of these extensions come at the price of portability. Since XSLT 1.0 (See [XSLT]) provides no details or guidance on the implementation of extensions, today any user-written or built-in extensions are inevitably tied to a single XSLT processor. The XSLT user community has consistently voiced the opinion that the non-portability of stylesheets is a key problem.
The primary goal of the XSLT 1.1 specification is to improve stylesheet portability. This goal will be achieved by standardizing the mechanism for implementing extension functions, and by including into the core XSLT specification two of the built-in extensions that many existing vendors XSLT processors have added due to user demand:
By standardizing these extension-related aspects which multiple vendor implementations already provide, the ability to create stylesheets that work across multiple XSLT processors should improve dramatically.
A secondary goal of the XSLT 1.1 specification is to support the new XML Base (See [XMLBase]) specification.
This document provides the requirements that will achieve these goals.
NOTE: The working group has decided to limit the scope of XSLT 1.1 to the standardization of features already implemented in several XSLT 1.0 processors, and concentrate first on standardizing the implementation of extension functions. Standardization of extension elements and support for new XML Schema data type aware facilities are planned for XSLT 2.0
Upward compatibility of XSLT stylesheets is an important criteria for existing users. To this end, we have the following requirements:
version
number to a number greater than 1.0
, it MUST clearly explain the rules for forward compatibility of version="1.0"
stylesheets and the restrictions, if any, on the use of new features in stylesheets with version="1.0"
.XSLT 1.0 defines the facilities to unambiguously identify extension functions from built-in functions by requiring that extension functions be referenced using namespace-qualified names, e.g. myprefix:myfunction()
. It provides the function-available()
function to test for the availability of a particular function by name. The XSLT 1.1 specification will define the additional specifics necessary to enable the creation and use of extension functions across processors with the following requirements:
Using the document()
function, it is possible in XSLT 1.0 to process multiple input documents as part of a transformation. However, frequently it is also convenient for a transformation to produce multiple output documents as well. As a simple example, consider the process of transforming the XML source of a technical manual. It may be desirable to produce the transformed output which separates each chapter into its own HTML document. XSLT 1.0 provides an <xsl:output>
element that allows a stylesheet developer to control various aspects of how the result tree will be serialized, however it only supports the result tree being serialized to a single document.
XSLT 1.1 will support producing multiple output documents with the following requirements:
<xsl:output>
The XSLT 1.0 specification distinguishes between the XPath node-set data type and the XSLT data type called a "result tree fragment". A result tree fragment is treated equivalently to a node-set that contains just a single root node. However, the operations permitted on a result tree fragment are a subset of those permitted on a node-set. In XSLT 1.0, an operation is permitted on a result tree fragment only if that operation would be permitted on a string. In particular, it is not permitted to use the /
, //
, and []
operators on result tree fragments.
Many XSLT processors have introduced built-in extension functions to convert result tree fragments to node-sets so that they can be further processed, effectively eliminating the restrictions described above for the result tree fragments. The restrictions on the operations permitted on result tree fragments were designed in a forward-thinking way to allow relaxation of the restrictions in a future release, allowing the distinction between node-sets and result tree fragments to disappear without breaking upward compatbility. By eliminating this distinction in XSLT 1.1, the need for a result tree fragment to node-set conversion function is eliminated and cross-processor portability is improved.
Section 3.2 of the XSLT 1.0 specification,Base URI, describes how the base URI is derived for every node in the data model. The specification must be updated to reflect how the base URI is derived in the presence of an xml:base attribute in scope.


Chapter 9 Supervised Classification
A classification problem can be defined as the induction, from a dataset \(\cal D\), of a classification function \(\psi\) that, given the attribute vector of an instance/example, returns a class \({c}\). A regression problem, on the other hand, returns an numeric value.
Dataset, \(\cal D\), is typically composed of \(n\) attributes and a class attribute \(C\).
| \(Att_1\) | … | \(Att_n\) | \(Class\) |
|---|---|---|---|
| \(a_{11}\) | … | \(a_{1n}\) | \(c_1\) |
| \(a_{21}\) | … | \(a_{2n}\) | \(c_2\) |
| … | … | … | … |
| \(a_{m1}\) | … | \(a_{mn}\) | \(c_m\) |
Columns are usually called attributes or features. Typically, there is a class attribute, which can be numeric or discrete. When the class is numeric, it is a regression problem. With discrete values, we can talk about binary classification or multiclass (multinomial classification) when we have more than three values. There are variants such multi-label classification (we will cover these in the advanced models section).
Once we learn a model, new instances are classified. As shown in the next figure.
We have multiple types of models such as classification trees, rules, neural networks, and probabilistic classifiers that can be used to classify instances.
Fernandez et al provide an extensive comparison of 176 classifiers using the UCI dataset (Fernández-Delgado et al. 2014).
We will show the use of different classification techniques in the problem of defect prediction as running example. In this example,the different datasets are composed of classical metrics (Halstead or McCabe metrics) based on counts of operators/operands and like or object-oriented metrics (e.g. Chidamber and Kemerer) and the class attribute indicating whether the module or class was defective.
9.1 Classification Trees
There are several packages for inducing classification trees, for example with the party package (recursive partitioning):
library(foreign) # To load arff file
library(party) # Build a decision tree
library(caret)
jm1 <- read.arff("./datasets/defectPred/D1/JM1.arff")
str(jm1)
## 'data.frame': 9593 obs. of 22 variables:
## $ LOC_BLANK : num 447 37 11 106 101 67 105 18 39 143 ...
## $ BRANCH_COUNT : num 826 29 405 240 464 187 344 47 163 67 ...
## $ LOC_CODE_AND_COMMENT : num 12 8 0 7 11 4 9 0 1 7 ...
## $ LOC_COMMENTS : num 157 42 17 344 75 1 40 10 6 49 ...
## $ CYCLOMATIC_COMPLEXITY: num 470 19 404 127 263 94 207 24 94 34 ...
## $ DESIGN_COMPLEXITY : num 385 19 2 105 256 63 171 13 67 25 ...
## $ ESSENTIAL_COMPLEXITY : num 113 6 1 33 140 27 58 1 3 1 ...
## $ LOC_EXECUTABLE : num 2824 133<PHONE_NUMBER> ...
## $ HALSTEAD_CONTENT : num 210 108 101 218 106 ...
## $ HALSTEAD_DIFFICULTY : num 384.4 46.3 206 215.2 337.4 ...
## $ HALSTEAD_EFFORT : num 31079782<PHONE_NUMBER>926 10100867 12120796 ...
## $ HALSTEAD_ERROR_EST : num 26.95 1.67 6.95 15.65 11.98 ...
## $ HALSTEAD_LENGTH : num 8441 685 2033 5669 4308 ...
## $ HALSTEAD_LEVEL : num 0 0.02 0 0 0 0.02 0 0.03 0.01 0.02 ...
## $ HALSTEAD_PROG_TIME : num 1726655 12891<PHONE_NUMBER>59 673378 ...
## $ HALSTEAD_VOLUME : num 80843 5009 20848 46944 35928 ...
## $ NUM_OPERANDS : num 3021<PHONE_NUMBER> 1556 ...
## $ NUM_OPERATORS : num 5420 390 1220 3368 2752 ...
## $ NUM_UNIQUE_OPERANDS : num 609 121 811 262 226 167 279 47 117 355 ...
## $ NUM_UNIQUE_OPERATORS : num 155 38 411 49 98 27 105 18 52 23 ...
## $ LOC_TOTAL : num 3442<PHONE_NUMBER> 1532 ...
## $ Defective : Factor w/ 2 levels "N","Y": 2 2 2 2 2 2 2 2 1 2 ...
# Stratified partition (training and test sets)
set.seed(1234)
inTrain <- createDataPartition(y=jm1$Defective,p=.60,list=FALSE)
jm1.train <- jm1[inTrain,]
jm1.test <- jm1[-inTrain,]
jm1.formula <- jm1$Defective ~ . # formula approach: defect as dependent variable and the rest as independent variables
jm1.ctree <- ctree(jm1.formula, data = jm1.train)
# predict on test data
pred <- predict(jm1.ctree, newdata = jm1.test)
# check prediction result
table(pred, jm1.test$Defective)
##
## pred N Y
## N 82 3
## Y 3051 700
plot(jm1.ctree)
Using the C50 package, there are two ways, specifying train and testing
library(C50)
require(utils)
# c50t <- C5.0(jm1.train[,-ncol(jm1.train)], jm1.train[,ncol(jm1.train)])
c50t2 <- C5.0(Defective ~ ., jm1.train)
summary(c50t)
plot(c50t)
c50tPred <- predict(c50t, jm1.train)
# table(c50tPred, jm1.train$Defective)
Using the ‘rpart’ package
# Using the 'rpart' package
library(rpart)
jm1.rpart <- rpart(Defective ~ ., data=jm1.train, parms = list(prior = c(.65,.35), split = "information"))
# par(mfrow = c(1,2), xpd = NA)
plot(jm1.rpart)
text(jm1.rpart, use.n = TRUE)
jm1.rpart
## n= 5757
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 5757 2010.0 N (0.650 0.350)
## 2) LOC_TOTAL< 42.5 4309 1030.0 N (0.744 0.256) *
## 3) LOC_TOTAL>=42.5 1448 743.0 Y (0.430 0.570)
## 6) NUM_UNIQUE_OPERANDS< 59.5 1206 655.0 Y (0.473 0.527)
## 12) LOC_BLANK< 7.5 449 210.0 N (0.562 0.438)
## 24) LOC_CODE_AND_COMMENT< 3.5 412 172.0 N (0.599 0.401) *
## 25) LOC_CODE_AND_COMMENT>=3.5 37 13.5 Y (0.262 0.738) *
## 13) LOC_BLANK>=7.5 757 385.0 Y (0.425 0.575)
## 26) HALSTEAD_DIFFICULTY>=64.5 55 13.4 N (0.741 0.259) *
## 27) HALSTEAD_DIFFICULTY< 64.5 702 347.0 Y (0.406 0.594) *
## 7) NUM_UNIQUE_OPERANDS>=59.5 242 87.6 Y (0.258 0.742) *
library(rpart.plot)
# asRules(jm1.rpart)
# fancyRpartPlot(jm1.rpart)
9.2 Rules
C5 Rules
library(C50)
c50r <- C5.0(jm1.train[,-ncol(jm1.train)], jm1.train[,ncol(jm1.train)], rules = TRUE)
summary(c50r)
##
## Call:
## C5.0.default(x = jm1.train[, -ncol(jm1.train)], y =
## jm1.train[, ncol(jm1.train)], rules = TRUE)
##
##
## C5.0 [Release 2.07 GPL Edition] Wed Dec 26 21:29:25 2018
## -------------------------------
##
## Class specified by attribute `outcome'
##
## Read 5757 cases (22 attributes) from undefined.data
##
## Rules:
##
## Rule 1: (5512/923, lift 1.0)
## CYCLOMATIC_COMPLEXITY <= 67
## NUM_UNIQUE_OPERANDS <= 59
## -> class N [0.832]
##
## Rule 2: (11/1, lift 4.6)
## LOC_BLANK > 3
## DESIGN_COMPLEXITY > 3
## LOC_EXECUTABLE > 31
## LOC_EXECUTABLE <= 33
## LOC_TOTAL <= 42
## -> class Y [0.846]
##
## Rule 3: (25/5, lift 4.2)
## CYCLOMATIC_COMPLEXITY > 67
## -> class Y [0.778]
##
## Rule 4: (242/110, lift 3.0)
## NUM_UNIQUE_OPERANDS > 59
## LOC_TOTAL > 42
## -> class Y [0.545]
##
## Default class: N
##
##
## Evaluation on training data (5757 cases):
##
## Rules
## ----------------
## No Errors
##
## 4 1025(17.8%) <<
##
##
## (a) (b) <-classified as
## ---- ----
## 4589 112 (a): class N
## 913 143 (b): class Y
##
##
## Attribute usage:
##
## 99.95% NUM_UNIQUE_OPERANDS
## 96.18% CYCLOMATIC_COMPLEXITY
## 4.39% LOC_TOTAL
## 0.19% LOC_BLANK
## 0.19% DESIGN_COMPLEXITY
## 0.19% LOC_EXECUTABLE
##
##
## Time: 0.1 secs
# c50rPred <- predict(c50r, jm1.train)
# table(c50rPred, jm1.train$Defective)
9.3 Distanced-based Methods
In this case, there is no model as such. Given a new instance to classify, this approach finds the closest \(k\)-neighbours to the given instance.
(Source: Wikipedia - https://en.wikipedia.org/wiki/K-nearest_neighbors_algorithm)
library(class)
m1 <- knn(train=jm1.train[,-22], test=jm1.test[,-22], cl=jm1.train[,22], k=3)
table(jm1.test[,22],m1)
## m1
## N Y
## N 2827 306
## Y 553 150
9.4 Neural Networks
9.5 Support Vector Machine
(Source: wikipedia https://en.wikipedia.org/wiki/Support_vector_machine)
9.6 Probabilistic Methods
9.6.1 Naive Bayes
Probabilistic graphical model assigning a probability to each possible outcome \(p(C_k, x_1,\ldots,x_n)\)
Using the klaR
package with caret
:
library(caret)
library(klaR)
## Loading required package: MASS
##
## Attaching package: 'MASS'
## The following object is masked from 'package:dplyr':
##
## select
## The following object is masked from 'package:sm':
##
## muscle
model <- NaiveBayes(Defective ~ ., data = jm1.train)
predictions <- predict(model, jm1.test[,-22])
confusionMatrix(predictions$class, jm1.test$Defective)
## Confusion Matrix and Statistics
##
## Reference
## Prediction N Y
## N 2990 548
## Y 143 155
##
## Accuracy : 0.82
## 95% CI : (0.807, 0.832)
## No Information Rate : 0.817
## P-Value [Acc > NIR] : 0.317
##
## Kappa : 0.225
## Mcnemar's Test P-Value : <2e-16
##
## Sensitivity : 0.954
## Specificity : 0.220
## Pos Pred Value : 0.845
## Neg Pred Value : 0.520
## Prevalence : 0.817
## Detection Rate : 0.779
## Detection Prevalence : 0.922
## Balanced Accuracy : 0.587
##
## 'Positive' Class : N
##
Using the e1071
package:
library (e1071)
n1 <-naiveBayes(jm1.train$Defective ~ ., data=jm1.train)
# Show first 3 results using 'class'
head(predict(n1,jm1.test, type = c("class")),3) # class by default
## [1] N Y Y
## Levels: N Y
# Show first 3 results using 'raw'
head(predict(n1,jm1.test, type = c("raw")),3)
## N Y
## [1,] 1.000000 0.000
## [2,] 0.000000 1.000
## [3,] 0.000754 0.999
There are other variants such as TAN and KDB that do not assume the independece condition allowin us more complex structures.
A comprehensice comparison of
9.7 Linear Discriminant Analysis (LDA)
One classical approach to classification is Linear Discriminant Analysis (LDA), a generalization of Fisher’s linear discriminant, as a method used to find a linear combination of features to separate two or more classes.
ldaModel <- train (Defective ~ ., data=jm1.train, method="lda", preProc=c("center","scale"))
ldaModel
## Linear Discriminant Analysis
##
## 5757 samples
## 21 predictors
## 2 classes: 'N', 'Y'
##
## Pre-processing: centered (21), scaled (21)
## Resampling: Bootstrapped (25 reps)
## Summary of sample sizes: 5757, 5757, 5757, 5757, 5757, 5757, ...
## Resampling results:
##
## Accuracy Kappa
## 0.817 0.135
We can observe that we are training our model using Defective ~ .
as a formula were Defective
is the class variable separed by ~
and the ´.´ means the rest of the variables. Also, we are using a filter for the training data to (preProc) to center and scale.
Also, as stated in the documentation about the train
method :
> http://topepo.github.io/caret/training.html
ctrl <- trainControl(method = "repeatedcv",repeats=3)
ldaModel <- train (Defective ~ ., data=jm1.train, method="lda", trControl=ctrl, preProc=c("center","scale"))
ldaModel
## Linear Discriminant Analysis
##
## 5757 samples
## 21 predictors
## 2 classes: 'N', 'Y'
##
## Pre-processing: centered (21), scaled (21)
## Resampling: Cross-Validated (10 fold, repeated 3 times)
## Summary of sample sizes: 5182, 5181, 5182, 5182, 5180, 5181, ...
## Resampling results:
##
## Accuracy Kappa
## 0.816 0.129
Instead of accuracy we can activate other metrics using summaryFunction=twoClassSummary
such as ROC
, sensitivity
and specificity
. To do so, we also need to speficy classProbs=TRUE
.
ctrl <- trainControl(method = "repeatedcv",repeats=3, classProbs=TRUE, summaryFunction=twoClassSummary)
ldaModel3xcv10 <- train (Defective ~ ., data=jm1.train, method="lda", trControl=ctrl, preProc=c("center","scale"))
ldaModel3xcv10
## Linear Discriminant Analysis
##
## 5757 samples
## 21 predictors
## 2 classes: 'N', 'Y'
##
## Pre-processing: centered (21), scaled (21)
## Resampling: Cross-Validated (10 fold, repeated 3 times)
## Summary of sample sizes: 5181, 5181, 5181, 5181, 5182, 5182, ...
## Resampling results:
##
## ROC Sens Spec
## 0.706 0.974 0.121
Most methods have parameters that need to be optimised and that is one of the
plsFit3x10cv <- train (Defective ~ ., data=jm1.train, method="pls", trControl=trainControl(classProbs=TRUE), metric="ROC", preProc=c("center","scale"))
plsFit3x10cv
## Partial Least Squares
##
## 5757 samples
## 21 predictors
## 2 classes: 'N', 'Y'
##
## Pre-processing: centered (21), scaled (21)
## Resampling: Bootstrapped (25 reps)
## Summary of sample sizes: 5757, 5757, 5757, 5757, 5757, 5757, ...
## Resampling results across tuning parameters:
##
## ncomp Accuracy Kappa
## 1 0.821 0.0548
## 2 0.820 0.0768
## 3 0.820 0.0762
##
## Accuracy was used to select the optimal model using the largest value.
## The final value used for the model was ncomp = 1.
plot(plsFit3x10cv)
The parameter tuneLength
allow us to specify the number values per parameter to consider.
plsFit3x10cv <- train (Defective ~ ., data=jm1.train, method="pls", trControl=ctrl, metric="ROC", tuneLength=5, preProc=c("center","scale"))
plsFit3x10cv
## Partial Least Squares
##
## 5757 samples
## 21 predictors
## 2 classes: 'N', 'Y'
##
## Pre-processing: centered (21), scaled (21)
## Resampling: Cross-Validated (10 fold, repeated 3 times)
## Summary of sample sizes: 5181, 5181, 5181, 5182, 5181, 5181, ...
## Resampling results across tuning parameters:
##
## ncomp ROC Sens Spec
## 1 0.692 0.995 0.0454
## 2 0.699 0.991 0.0634
## 3 0.702 0.990 0.0641
## 4 0.705 0.989 0.0656
## 5 0.706 0.989 0.0663
##
## ROC was used to select the optimal model using the largest value.
## The final value used for the model was ncomp = 5.
plot(plsFit3x10cv)
Finally to predict new cases, caret
will use the best classfier obtained for prediction.
plsProbs <- predict(plsFit3x10cv, newdata = jm1.test, type = "prob")
plsClasses <- predict(plsFit3x10cv, newdata = jm1.test, type = "raw")
confusionMatrix(data=plsClasses,jm1.test$Defective)
## Confusion Matrix and Statistics
##
## Reference
## Prediction N Y
## N 3108 643
## Y 25 60
##
## Accuracy : 0.826
## 95% CI : (0.813, 0.838)
## No Information Rate : 0.817
## P-Value [Acc > NIR] : 0.0743
##
## Kappa : 0.117
## Mcnemar's Test P-Value : <2e-16
##
## Sensitivity : 0.9920
## Specificity : 0.0853
## Pos Pred Value : 0.8286
## Neg Pred Value : 0.7059
## Prevalence : 0.8167
## Detection Rate : 0.8102
## Detection Prevalence : 0.9778
## Balanced Accuracy : 0.5387
##
## 'Positive' Class : N
##
9.7.1 Predicting the number of defects (numerical class)
From the Bug Prediction Repository (BPR) http://bug.inf.usi.ch/download.php
Some datasets contain CK and other 11 object-oriented metrics for the last version of the system plus categorized (with severity and priority) post-release defects. Using such dataset:
jdt <- read.csv("./datasets/defectPred/BPD/single-version-ck-oo-EclipseJDTCore.csv", sep=";")
# We just use the number of bugs, so we removed others
jdt$classname <- NULL
jdt$nonTrivialBugs <- NULL
jdt$majorBugs <- NULL
jdt$minorBugs <- NULL
jdt$criticalBugs <- NULL
jdt$highPriorityBugs <- NULL
jdt$X <- NULL
# Caret
library(caret)
# Split data into training and test datasets
set.seed(1)
inTrain <- createDataPartition(y=jdt$bugs,p=.8,list=FALSE)
jdt.train <- jdt[inTrain,]
jdt.test <- jdt[-inTrain,]
ctrl <- trainControl(method = "repeatedcv",repeats=3)
glmModel <- train (bugs ~ ., data=jdt.train, method="glm", trControl=ctrl, preProc=c("center","scale"))
glmModel
## Generalized Linear Model
##
## 798 samples
## 17 predictors
##
## Pre-processing: centered (17), scaled (17)
## Resampling: Cross-Validated (10 fold, repeated 3 times)
## Summary of sample sizes: 719, 718, 719, 718, 718, 718, ...
## Resampling results:
##
## RMSE Rsquared MAE
## 0.786 0.397 0.417
Others such as Elasticnet:
glmnetModel <- train (bugs ~ ., data=jdt.train, method="glmnet", trControl=ctrl, preProc=c("center","scale"))
glmnetModel
## glmnet
##
## 798 samples
## 17 predictors
##
## Pre-processing: centered (17), scaled (17)
## Resampling: Cross-Validated (10 fold, repeated 3 times)
## Summary of sample sizes: 718, 718, 719, 718, 718, 718, ...
## Resampling results across tuning parameters:
##
## alpha lambda RMSE Rsquared MAE
## 0.10 0.0012 0.774 0.397 0.417
## 0.10 0.0120 0.788 0.384 0.421
## 0.10 0.1202 0.794 0.369 0.424
## 0.55 0.0012 0.773 0.397 0.416
## 0.55 0.0120 0.794 0.375 0.422
## 0.55 0.1202 0.805 0.371 0.435
## 1.00 0.0012 0.773 0.397 0.416
## 1.00 0.0120 0.794 0.373 0.423
## 1.00 0.1202 0.812 0.365 0.449
##
## RMSE was used to select the optimal model using the smallest value.
## The final values used for the model were alpha = 1 and lambda = 0.0012.
9.8 Binary Logistic Regression (BLR)
Binary Logistic Regression (BLR) can models fault-proneness as follows
\[fp(X) = \frac{e^{logit()}}{1 + e^{logit(X)}}\]
where the simplest form for logit is:
\(logit(X) = c_{0} + c_{1}X\)
jdt <- read.csv("./datasets/defectPred/BPD/single-version-ck-oo-EclipseJDTCore.csv", sep=";")
# Caret
library(caret)
# Convert the response variable into a boolean variable (0/1)
jdt$bugs[jdt$bugs>=1]<-1
cbo <- jdt$cbo
bugs <- jdt$bugs
# Split data into training and test datasets
jdt2 = data.frame(cbo, bugs)
inTrain <- createDataPartition(y=jdt2$bugs,p=.8,list=FALSE)
jdtTrain <- jdt2[inTrain,]
jdtTest <- jdt2[-inTrain,]
BLR models fault-proneness are as follows \(fp(X) = \frac{e^{logit()}}{1 + e^{logit(X)}}\)
where the simplest form for logit is \(logit(X) = c_{0} + c_{1}X\)
# logit regression
# glmLogit <- train (bugs ~ ., data=jdt.train, method="glm", family=binomial(link = logit))
glmLogit <- glm (bugs ~ ., data=jdtTrain, family=binomial(link = logit))
summary(glmLogit)
##
## Call:
## glm(formula = bugs ~ ., family = binomial(link = logit), data = jdtTrain)
##
## Deviance Residuals:
## Min 1Q Median 3Q Max
## -3.439 -0.601 -0.531 -0.492 2.106
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -2.10194 0.13457 -15.62 < 2e-16 ***
## cbo 0.05342 0.00721 7.41 1.3e-13 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 796.98 on 797 degrees of freedom
## Residual deviance: 711.81 on 796 degrees of freedom
## AIC: 715.8
##
## Number of Fisher Scoring iterations: 5
Predict a single point:
newData = data.frame(cbo = 3)
predict(glmLogit, newData, type = "response")
## 1
## 0.125
Draw the results, modified from: http://www.shizukalab.com/toolkits/plotting-logistic-regression-in-r
results <- predict(glmLogit, jdtTest, type = "response")
range(jdtTrain$cbo)
## [1] 0 150
range(results)
## [1] 0.109 0.998
plot(jdt2$cbo,jdt2$bugs)
curve(predict(glmLogit, data.frame(cbo=x), type = "response"),add=TRUE)
# points(jdtTrain$cbo,fitted(glmLogit))
Another type of graph:
library(popbio)
##
## Attaching package: 'popbio'
## The following object is masked from 'package:caret':
##
## sensitivity
logi.hist.plot(jdt2$cbo,jdt2$bugs,boxp=FALSE,type="hist",col="gray")
9.9 The caret package
There are hundreds of packages to perform classification task in R, but many of those can be used throught the ‘caret’ package which helps with many of the data mining process task as described next.
The caret packagehttp://topepo.github.io/caret/ provides a unified interface for modeling and prediction with around 150 different models with tools for:
data splitting
pre-processing
feature selection
model tuning using resampling
variable importance estimation, etc.
Website: http://caret.r-forge.r-project.org
JSS Paper: www.jstatsoft.org/v28/i05/paper
References
Fernández-Delgado, Manuel, Eva Cernadas, Senén Barro, and Dinani Amorim. 2014. “Do We Need Hundreds of Classifiers to Solve Real World Classification Problems?” Journal of Machine Learning Research 15: 3133–81. http://jmlr.org/papers/v15/delgado14a.html.


HTML Templates: https://html5up.net/ https://templated.co/ https://themes.gohugo.io/ Photos: https://pixabay.com/ https://www.pexels.com/ https://unsplash.com/


PART III. NURSERY STOCK EXPORT SHIPMENTS
§150A-21 Certification for shipment. The department may certify as to the pest condition or post treatment of shipments when officially required. Fees may be charged for certificates in certain instances and shall be deposited into the pest inspection, quarantine, and eradication fund. [L 1977, c 114, pt of §4; am L 2010, c 173, §6]


URBAN INSTITUTE
View the source code for this graphic on GitHub
NOT ELIGIBLE
Originated before June 2009, delinquent, modified, or with a term ≤ 15 years
Originated before June 2009, delinquent, modified, or with a term ≤ 15 years
ELIGIBLE, REFINANCE NOT COST EFFECTIVE
ELIGIBLE, REFINANCE IS COST EFFECTIVE
How many would benefit from refinancing? It depends.
Adjust the mortgage rate and FHA mortgage insurance premium below to see how many borrowers would benefit from refinancing, out of the 6.6 million total FHA borrowers. For more information about how these numbers are calculated, read our recent blog post
Mortgage Rate
Copy and paste code to embed this graphic with current parameters


| 3653 - Jukebox Latin America - South America - 2006/2007 | |||||
| Submit | Ranking |
The ICPC judges are preparing a party for the opening ceremony. For the party, they intend to add a playlist with some songs to the jukebox software (a simple MP3 player). However, there are so many songs in the computer that it is diffcult to find the ones they want to add. As a consequence, they need to use the search feature many times.
In this jukebox, when you search for a string s, the software returns every music whose title or artist name contains s as a substring. String s is a substring of string t if t contains all characters of s as a contiguous sequence (for example, `bc' is a substring of `abcd', but `ac' is not). To save their precious time, while looking for a song, they always use one of the song's golden string, i.e. one of the shortest strings for which the search returns as a result only the song they want.
In the example above, a possible golden string for the song `johnnatan' is `ta'. Note that `ta' is not a substring of the name of another song nor a substring of the artist of another song. Note also that there is no string of size equal to 1 that could identify uniquely the song `johnnatan'.
They discovered that if they remove the artist fields from some of the songs they can get even smaller golden strings. For the song `john', there is no golden string. However, if one removes the artist field from all other songs, the string `c' becomes the golden string for the song `john'.
Given the song list (each song with name and artist), your job is to determine the minimum sum of the golden string sizes for all songs that can be obtained if one is allowed to remove some of the artist fields. In the figure above you can see a possible best result with the golden strings in bold. The minimum sum of the golden string sizes in this case is 10.
The input contains several test cases. The first line of each test case contains one integer N (1N30), which indicates the number of songs. Following there will be N pairs of lines (2 * N lines), one pair for each song. The first line of a pair will contain the song name, the second line will contain the artist name. Both artist and song names are strings containing only lower case letters or underlines and having at least 1 and at most 30 characters. There will be at most 6 different artists in the list. The end of the input is given by N = 0.
For each test case your program must output one single line with the minimum sum of the golden string sizes. You may assume that there will always be a solution.
8 a_flor los_hermanos anna_julia los_hermanos quem_sabe los_hermanos pierrot los_hermanos azedume los_hermanos johnny massacration johnnatan massacration john massacration 4 c axc b axc d cc xc cc 0
10 5


Delighted Barty turns sights on Fed Cup final
SHENZHEN, Nov 4 — With her status as world number one sealed for 2019, Ash Barty is now determined to help Australia break their Fed Cup drought next week.
The French Open champion completed a stellar season by adding the WTA Finals title to her haul for the year yesterday with a straight sets win over defending champion Elina Svitolina.
But while the other players who competed at the season-ending WTA event were looking forward to some time off to recover from an arduous campaign, Barty will be travelling to Perth for the Fed Cup final against France.
Australia last won the Fed Cup in 1974 but with the world’s leading player now among their ranks, the chances of the trophy returning Down Under have been given a huge boost and Barty is relishing the challenge.
“There’s one more very important week to cap off what would be the most perfect year,” said Barty.
“This Fed Cup final is something I’ve been looking forward to for a long time. It’s been two or three years in the making for the current team that we’ve got. It’s taken a lot of work, a lot of trust from (captain) Alicia (Molik).
“I can’t wait to get to Perth in the next couple days and then start preparing for what will be the most perfect way to end a season, playing for your country, for myself to play in front of my friends and family, representing Australia, wearing the green and gold.
“There’s absolutely nothing better.”
Barty will be joined by fellow Grand Slam winner Sam Stosur as well as Ajla Tomljanovic, Astra Sharma and Priscilla Hon in the Australia squad for the final, which will be played on November 9 and 10.
Win or lose in Perth, the right hander from Queensland can look back on a remarkable 12 months during which she also won WTA titles in Miami and Birmingham.
“It feels like it’s been a year that just hasn’t stopped,” the 23-year-old said.
“It’s been a year of incredible ups and downs, more ups than downs. To cap it off with a very, very special night tonight in Shenzhen is really cool.” — Reuters


Michael Kelly's Projects
Schedify
Description
Google CSSI is a summer program that teaches rising computer science students the fundamentals of coding under the guidance of Google employees. Two fellow peers and I built a social platform that aims to make group planning easier.
Links
- Website: https://schedify.appspot.com
- YouTube: https://youtu.be/7KT_wixEeLU
- GitHub: https://github.com/MPKellyy/Schedify
Pictures
ITN-SelfSearch
Description
The goal of ITN SelfSearch is to help customers find where items are in a real-world store. This software calculates the most optimal route toward a product and displays a visual map path for customers to use as a reference. Software also features an administrative mode that allows for product database importation and map creation.
Links
- YouTube: https://www.youtube.com/watch?v=3Ud-zaG7iYk
- GitHub: https://github.com/MPKellyy/ITN-SelfSearch


OTU delimitation¶
Introduction¶
After processing reads and filtering we get a set of ASVs that, ideally, represent all of the true biological sequences (aka haplotypes) present in our samples. However, these encompass both intra- and inter-specific variation and we often want data that is comparable to species-level ecological data. Therefore, we can try to collapse the intra-specific variation while maintaining inter-specific variation. We will try several different methods for doing this, and compare them.
As well as generating approximately species-level taxonomic units, grouping ASVs into OTUs is also a method for removing errors. While we hope that our filtering has been stringent enough to remove all erroneous sequences, the chances are that it is not. However, small variations from true haplotypes will generally get grouped in with the true haplotype, thus slight errors will not be found in the OTU sequences. The downside of course is that we also remove a large proportion of the real variation among our ASVs, the true intra-specific variation in our dataset.
Data
The starting point for this section is a FASTA file comprising ASVs, that is to say unique sequences with errors removed. These sequences must have ;size=
tags in the sequence headers to denote the abundance of each sequence in the dataset.
If you worked through the previous section, these data were produced by the chimera filtering tutorial.
If you didn’t work through the previous section, you can download a zip archive of the data for all of the tutorials in this section here. Unzip this to a convenient location.
Delimitation methods¶
Delimiting OTUs is analagous to grouping individuals or morphotypes into species, but perhaps even harder as we have to apply some sort of standard grouping protocol to all of our ASVs. As our ASVs are completely anonymous at this stage, we can’t necessarily apply different protocols to different taxonomic or phylogenetic subsets of our data (while theoretically possible, there is no known implementation of this…). The only information we have is knowledge about our metabarcoding locus of choice, and the extent to which it diverges within and between species. We want to try and select a method and its parameters to consistently lump together ASVs belonging to the same species, while splitting ASVs belonging to different species. We can never be 100% confident that we have correctly grouped into species, so we don’t call the resulting groups “species”, instead using the term “OTU”.
Due to the challenge of certainty in OTU grouping, many methods have been developed. We will look at three methods that use quite different theoretical underpinnings, and explore the key parameters and the effect of changing these parameters on the output.
OTU delimitation vs species delimitation¶
One thing to remember is that while OTU delimitation methods were built with the broad aim of finding species-like units, they must be suitable for handling large amplicon datasets. In barcoding, researchers often also want to group sequences into species, but usually have smaller datasets and a greater need for high fidelity. As such, analagous “species” delimitation methods have been developed that are based on our understanding of the evolutionary processes and patterns that form species. These methods are usually quite computationally intensive for the size of datasets usually encountered in metabarcoding, hence why they are rarely if ever used for metabarcoding. However, sometimes it may be useful as a sanity check to test a subset of our dataset using these methods.
Next steps¶
We will look at three methods of OTU delimitation commonly used in metabarcoding, and one method of species delimitation commonly used in barcoding studies as an extension. You can work through these tutorials in any order.
- Greedy clustering is by far the most common method for OTU delimitation, generally at the 3% similarity level.
- Linkage delimitation works by building a linkage graph of ASVs and breaking this into OTUs
- Bayesian clustering uses a bayesian similarity approach to group ASVs into OTUs
- Phylogenetic delimitation borrows from species delimitation methods in barcoding and uses a phylogenetics-based approach to group ASVs.
For each step, we will generate OTU sequences and a record of which ASVs were grouped into which OTUs. Once you’ve learned about some different methods, you may want to read about how to Compare OTU delimitation methods. This is largely an exercise in exploring data, and doesn’t have any specific outputs aside from helping you choose which set of OTUs to accept.
Once you have a final set of OTUs, and the associated record of ASVs within each OTU, you can move on to the Mapping reads tutorials.


{% extends '400.html' %} {% block error-message %}
Whoa, this is a hipster URL. We're too old for that. Please click the button below to go visit the homepage.


You can use Darknet to classify images for the 1000-class ImageNet challenge. If you haven't installed Darknet yet, you should do that first.
Here are the commands to install Darknet, download a classification weights file, and run a classifier on an image:
git clone https://github.com/pjreddie/darknet.git
cd darknet
make
wget https://pjreddie.com/media/files/extraction.weights
./darknet classifier predict cfg/imagenet1k.data cfg/extraction.cfg extraction.weights data/dog.jpg
This example uses the Extraction model, you can read more about it below. After running this command you should see the following output:
0: Convolutional Layer: 224 x 224 x 3 image, 64 filters -> 112 x 112 x 64 image
1: Maxpool Layer: 112 x 112 x 64 image, 2 size, 2 stride
...
23: Convolutional Layer: 7 x 7 x 512 image, 1024 filters -> 7 x 7 x 1024 image
24: Convolutional Layer: 7 x 7 x 1024 image, 1000 filters -> 7 x 7 x 1000 image
25: Avgpool Layer: 7 x 7 x 1000 image
26: Softmax Layer: 1000 inputs
27: Cost Layer: 1000 inputs
Loading weights from extraction.weights...Done!
298 224
data/dog.jpg: Predicted in 3.756339 seconds.
malamute: 0.194782
Eskimo dog: 0.155007
Siberian husky: 0.143937
dogsled: 0.020943
miniature schnauzer: 0.020566
Darknet displays information as it loads the config file and weights, then it classifies the image and prints the top-10 classes for the image. Kelp is a mixed breed dog but she has a lot of malamute in her so we'll consider this a success!
You can also try with other images, like the bald eagle image:
./darknet classifier predict cfg/imagenet1k.data cfg/extraction.cfg extraction.weights data/eagle.jpg
Which produces:
...
data/eagle.jpg: Predicted in 4.036698 seconds.
bald eagle: 0.797689
kite: 0.185116
vulture: 0.006402
prairie chicken: 0.001041
hen: 0.000888
Pretty good!
If you don't specify an image file you will be prompted at run-time for an image. This way you can classify multiple in a row without reloading the whole model. Use the command:
./darknet classifier predict cfg/imagenet1k.data cfg/extraction.cfg extraction.weights
Then you will get a prompt that looks like:
....
27: Softmax Layer: 1000 inputs
28: Cost Layer: 1000 inputs
Loading weights from extraction.weights...Done!
Enter Image Path:
Whenever you get bored of classifying images you can use Ctrl-C
to exit the program.
You see these validation set numbers thrown around everywhere. Maybe you want to double check for yourself how well these models actually work. Let's do it!
First you need to download the validation images, and the cls-loc annotations. You can get them here but you'll have to make an account! Once you download everything you should have a directory with ILSVRC2012_bbox_val_v3.tgz
, and ILSVRC2012_img_val.tar
. First we unpack them:
tar -xzf ILSVRC2012_bbox_val_v3.tgz
mkdir -p imgs && tar xf ILSVRC2012_img_val.tar -C imgs
Now we have the images and the annotations but we need to label the images so Darknet can evaluate its predictions. We do that using this bash script. It's already in your scripts/
subdirectory. We can just get it again though and run it:
wget https://pjreddie.com/media/files/imagenet_label.sh
bash imagenet_label.sh
This will generate two things: a directory called labelled/
which contains renamed symbolic links to the images, and a file called inet.val.list
which contains a list of the paths of the labelled images. We need to move this file to the data/
subdirectory in Darknet:
mv inet.val.list <path-to>/darknet/data
Now you are finally ready to validate your model! First re-make
Darknet. Then run the validation routine like so:
./darknet classifier valid cfg/imagenet1k.data cfg/extraction.cfg extraction.weights
Note: if you don't compile Darknet with OpenCV then you won't be able to load all of the ImageNet images since some of them are weird formats not supported by stb_image.h
.
If you don't compile with CUDA you can still validate on ImageNet but it will take like a reallllllly long time. Not recommended.
Here are a variety of pre-trained models for ImageNet classification. Accuracy is measured as single-crop validation accuracy on ImageNet. GPU timing is measured on a Titan X, CPU timing on an Intel i7-4790K (4 GHz).
| Model | Top-1 | Top-5 | Ops | GPU | CPU | Cfg | Weights |
|---|---|---|---|---|---|---|---|
| AlexNet | 57.0 | 80.3 | 2.27 Bn | 1.5 ms | 0.3 s | cfg | 285 MB |
| Darknet Reference | 61.1 | 83.0 | 0.81 Bn | 1.5 ms | 0.16 s | cfg | 28 MB |
| VGG-16 | 70.5 | 90.0 | 30.94 Bn | 10.7 ms | 4.9 s | cfg | 528 MB |
| Extraction | 72.5 | 90.8 | 8.52 Bn | 6.4 ms | 0.95 s | cfg | 90 MB |
| Darknet19 | 72.9 | 91.2 | 5.58 Bn | 6.0 ms | 0.66 s | cfg | 80 MB |
| Darknet19 448x448 | 76.4 | 93.5 | 22.33 Bn | 11.0 ms | 2.8 s | cfg | 80 MB |
| Resnet 50 | 75.8 | 92.9 | 10 Bn | 7.0 ms | ?? s | cfg | 87 MB |
| Resnet 152 | 77.6 | 93.8 | 29.4 Bn | ?? ms | ?? s | cfg | 220 MB |
| Densenet 201 | 77.0 | 93.7 | 10.9 Bn | ?? ms | ?? s | cfg | 66 MB |
The model that started a revolution! The original model was crazy with the split GPU thing so this is the model from some follow-up work.
This model is designed to be small but powerful. It attains the same top-1 and top-5 performance as AlexNet but with 1/10th the parameters. It uses mostly convolutional layers without the large fully connected layers at the end. It is about twice as fast as AlexNet on CPU making it more suitable for some vision applications.
The Visual Geometry Group at Oxford developed the VGG-16 model for the ILSVRC-2014 competition. It is highly accurate and widely used for classification and detection. I adapted this version from the Caffe pre-trained model. It was trained for an additional 6 epochs to adjust to Darknet-specific image preprocessing (instead of mean subtraction Darknet adjusts images to fall between -1 and 1).
I developed this model as an offshoot of the GoogleNet model. It doesn't use the "inception" modules, only 1x1 and 3x3 convolutional layers.
I modified the Extraction network to be faster and more accurate. This network was sort of a merging of ideas from the Darknet Reference network and Extraction as well as numerous publications like Network In Network, Inception, and Batch Normalization.
I trained Darknet19 for 10 more epochs with a larger input image size, 448x448
. This model performs significantly better but is slower since the whole image is larger.
For some reason people love these networks even though they are so sloooooow. Whatever. Paper
For some reason people love these networks even though they are so sloooooow. Whatever. Paper
I love DenseNets! They are just so deep and so crazy and work so well. Like Resnet, still slow since they are sooooo many layers but at least they work really well! Paper


Preparation time
less than 30 mins
Cooking time
10 to 30 mins
Serves
Serves 2
Heat the oil in a wok or deep frying pan over a high heat and add the chicken. Pour over 1 tsp of the honey and brown the chicken quickly. Remove from the pan with a slotted spoon, and set aside.
Add the spring onion to the frying pan and add a little more oil if needed. Pour over the remaining teaspoon of honey and allow to cook for couple of minutes. Add red peppers, mangetout, mushrooms and the white parts of pak choi and toss over high heat.
Slate together the cornflour, soy sauce, and hoi sin sauce in and mix well. Return the chicken to the pan, add the green parts of pak choi, soy mixture and cashew nuts and cook until sauce is bubbling and thick. Serve immediately.


Random variables $X$ and $Y$ are independent if $$ P(X \in A, Y \in B) = P(X \in A)P(Y \in B) $$ for all intervals $A$ and $B$.
Let $X$ have density $f_X$, let $Y$ have density $f_Y$, and suppose $X$ and $Y$ are independent. Then if $f$ is the joint density of $X$ and $Y$,
\begin{align*} f(x, y)dxdy &\sim P(X \in dx, Y \in dy) \\ &= P(X \in dx)P(Y \in dy) ~~~~~ \text{(independence)} \\ &= f_X(x)dx f_Y(y)dy \\ &= f_X(x)f_Y(y)dxdy \end{align*}Thus if $X$ and $Y$ are independent then their joint density is given by
$$ f(x, y) = f_X(x)f_Y(y) $$This is the product rule for densities: the joint density of two independent random variables is the product of their densities.
For example, suppose $X$ and $Y$ are i.i.d. standard normal random variables. Then their joint density is given by
$$ f(x, y) = \frac{1}{\sqrt{2\pi}} e^{-\frac{1}{2}x^2} \cdot \frac{1}{\sqrt{2\pi}} e^{-\frac{1}{2}y^2}, ~~~~ -\infty < x, y < \infty $$Equivalently, $$ f(x, y) = \frac{1}{2\pi} e^{-\frac{1}{2}(x^2 + y^2)}, ~~~~ -\infty < x, y < \infty $$
Here is a graph of the joint density surface.
def indep_standard_normals(x,y):
return 1/(2*math.pi) * np.exp(-0.5*(x**2 + y**2))
Plot_3d((-4, 4), (-4, 4), indep_standard_normals, rstride=4, cstride=4)
Notice the circular symmetry of the surface. This is because the formula for the joint density involves the pair $(x, y)$ through the expression $x^2 + y^2$.
Notice also that $P(X = Y) = 0$, as the probability is the volume over a line. This is true of all pairs of independent random variables with a joint density: $P(X = Y) = 0$. So for example $P(X > Y) = P(X \ge Y)$. You don't have to worry about whether or not to the inequality should be strict.
Let $X$ and $Y$ be independent random variables. Suppose $X$ has the exponential $(\lambda)$ distribution $Y$ has the exponential $(\mu)$ distribution. The goal of this example is to find $P(Y > X)$.
By the product rule, the joint density of $X$ and $Y$ is given by
$$ f(x, y) ~ = ~ \lambda e^{\lambda x} \mu e^{-\mu y}, ~~~~ x > 0, ~ y > 0 $$The graph below shows the joint density surface in the case $\lambda = 0.5$ and $\mu = 0.25$, so that $E(X) = 2$ and $E(Y) = 4$.
def independent_exp(x, y):
return 0.5 * 0.25 * np.e**(-0.5*x - 0.25*y)
Plot_3d((0, 10), (0, 10), independent_exp)
To find $P(Y > X)$ we must integrate the joint density over the upper triangle of the first quadrant, a portion of which is shown below.
The probability is therefore $$ P(Y > X) ~ = ~ \int_0^\infty \int_x^\infty \lambda e^{-\lambda x} \mu e^{-\mu y} dy dx $$
Let's do this in SymPy
and then take another look at the calculation. Notice that SymPy
doesn't want to write the joint density with negative exponents.
declare('x', 'y', 'lamda', 'mu', positive=True)
f_X = lamda * exp(-lamda * x)
f_Y = mu * exp(-mu * y)
jt_density = f_X * f_Y
jt_density
p_Y_greater_than_X = Integral(jt_density, (y, x, oo), (x, 0, oo))
p_Y_greater_than_X
p_Y_greater_than_X.doit()
Easy algebra, or the rearrange_1
algebraic simplification method, provides an alterative form of the answer:
rearrange_1(p_Y_greater_than_X.doit())
Thus $$ P(Y > X) ~ = ~ \frac{\lambda}{\lambda + \mu} $$ Analogously, $$ P(X > Y) ~ = ~ \frac{\mu}{\lambda + \mu} $$
Notice that the two chances are proportional to the parameters. This is consistent with intuition if you think of $X$ and $Y$ as two lifetimes. If $\lambda$ is large, the corresponding lifetime $X$ is likely to be short, and therefore $Y$ is likely to be larger than $X$ as the formula implies.
If $\lambda = \mu$ then $P(Y > X) = 1/2$ which you can see by symmetry since $P(X = Y) = 0$.
It's instructive to do the integral for calculating $P(Y > X)$ without resorting to SymPy
. The calculation shows how you can use probability theory to do calculus.


Suitable Situation
The following two methods are usually used to have a roughly estimate about a recurrence relation question.
A recurrence relation is a sort of recursively defined function.
Suppose that the runtime of a program is T(n), then a recurrence relation will express T(n) in terms of its values at other (smaller) values of n.
Example : T(n) = 2T(n/2) + 3
Master Theorem
It covers many useful cases of recurrence relation of this form
For constant a >= 1, b > 1, T(n) = a T ( n / b ) + f(n), which means we can spend f(n) time to convert a T(n) problem into seven T(n / b) problems:
- if f(n) = O(n ^ c), and c < log b (a), then T(n) should be θ(n ^ (log b (a))).
- for example T(n) = 3T(n / 2) + n => θ(n ^ (log 2 (3))).
- if f(n) = θ(n ^ c * log n ^ k) and k >= 0, c == log b (a), then T(n) should be θ(n^c * log n ^ (k+1)).
- for example merge sort, T(n) = 2T(n / 2) + n => θ(n * log n).
- if f(n) = Ω(n ^ c), and c > log b (a), a * f(n / b) <= k * f(n) for some k < 1, then T(n) should be θ(f(n)).
- for example T(n) = 2T(n / 2) + n^2 => θ(n^2).
Recurrence Tree
This way is much more intuitive, but need a better understanding of the algorithm.
Those some are example cases:
The most representative example should be merge sort, T(n) = 2 T(n / 2) + n
Tried to draw the tree first:
n
n/2 n/2
n/4 n/4 n/4 n/4
...
n leaves with value 1
- Now you can consider the problem's time complexity is the time spend to make
n leaves
back into 1 n
(i.e. the merge time) and the time to solve those leaves.
- It's obviously the size of the algorithm half once go down a level, so it's easy to find out that the tree's height should be log (n).
- And for each level, we merge all leaves need time complexity O(n), and time to solve those leaves is just O(n), which can be ignored directly.
- So it's not hard to get T(n) = θ(n * log2 (n)).
Here is a example which can not use master theorem , T(n) = 2 T (n - 1) + n
n
n-1 n-1
n-2 n-2 n-2 n-2
...
2^n leaves with value 1
- Obviously the tree's height should be n, so there are 2^n leaves in the bottom of the tree, which means we just need 2^n to solve those base case.
- But for every level, from the expression we know we need O(n) extra time (maybe used to split or merge), so in total it is O(n + n - 1 + n - 2 + ... + 1), which can be ignore directly.
- So it's not hard to get T(n) = θ(2 ^ n).
Prove
After we have a estimate, we need to prove it. Usually we will use substitution method, which means we suppose our estimate is correct, then try to prove it.
At most situations the mathematical induction should help.


from abc import ABC, abstractmethod
from mlaut.shared.static_variables import (GRIDSEARCH_CV_NUM_PARALLEL_JOBS,
GRIDSEARCH_NUM_CV_FOLDS,
VERBOSE)
import pickle
from mlaut.shared.static_variables import PICKLE_EXTENTION
import wrapt
from mlaut.shared.files_io import DiskOperations
from sklearn.model_selection import GridSearchCV
from sklearn.pipeline import Pipeline
from sklearn import preprocessing
import logging
[docs]class MlautEstimator(ABC):
"""
Abstact base class that all mlaut estimators should inherit from.
"""
# def __init__(self,
# verbose=VERBOSE,
# n_jobs=GRIDSEARCH_CV_NUM_PARALLEL_JOBS,
# num_cv_folds=GRIDSEARCH_NUM_CV_FOLDS,
# refit=True):
# self._num_cv_folds=num_cv_folds
# self._verbose=verbose
# self._n_jobs=n_jobs
# self._refit=refit
# """
# Args:
# verbose(int): Sets the amount of output in the terminal. Higher numbers mean more output.
# n_jobs(number): number of CPU cores used for training the estimators. If set to -1 all available cores are used.
# num_cv_folds(int): number of cross validation folds used by GridsearchCV.
# refit(Boolean): Refit an estimator using the best found parameters on the whole dataset.
# """
[docs] @abstractmethod
def build(self):
"""
Abstract method that needs to be implemented by all estimators.
It should return an estimator object.
"""
[docs] def save(self, dataset_name):
"""
Saves estimator on disk.
Args:
dataset_name(string): name of the dataset. Estimator will be saved under default folder structure `/data/trained_models/<dataset name>/<model name>`
"""
#set trained model method is implemented in the base class
trained_model = self._trained_model
disk_op = DiskOperations()
disk_op.save_to_pickle(trained_model=trained_model,
model_name=self.properties['name'],
dataset_name=dataset_name)
[docs] def get_params(self):
"""
Gets the hyperparaments of the estimator.
Returns:
dictionary: Dictionary with the hyperparaments of the estimator
"""
return self._hyperparameters
[docs] def set_params(self, hyperparameters):
"""
Set the hyper-parameters of the estimator.
Args:
hyperparameters(dictionary): Dictionary with the hyperarameters of each model.
"""
self._hyperparameters = hyperparameters
[docs] def load(self, path_to_model):
"""
Loads trained estimator from disk.
The default implemented method loads a sklearn estimator from a pickle file.
This method needs to be overwritten in the child estimator class if another
framework/procedure for saving/loading is used.
Args:
path_to_model (str): Location of the trained estimator.
"""
#file name could be passed with .* as extention.
# split_path = path_to_model.split('.')
# path_to_load = split_path[0] + PICKLE_EXTENTION
model = pickle.load(open(path_to_model,'rb'))
self.set_trained_model(model)
[docs] def set_trained_model(self, trained_model):
"""
setter method for storing trained estimator in memory
Args:
trained_model (estimator object): Trained sklearn, keras, etc. estimator object.
"""
self._trained_model = trained_model
[docs] def get_trained_model(self):
"""
Getter method.
Returns:
`sklearn pipline object`: Trained sklearn model
"""
return self._create_pipeline(self._trained_model)
# def properties(self):
# return self._properties
def _create_pipeline(self, estimator):
"""
Creates a pipeline for transforming the features of the dataset and training the selected estimator.
Args:
estimator (sklearn estimator): Reference of sklearn estimator that will be used at the end of the pipeline.
Returns:
`estimator(sklearn pipeline or GridSerachCV)`: `sklearn` pipeline object. If no preprocessing was set
"""
if 'data_preprocessing' in self.properties:
data_preprocessing = self.properties['data_preprocessing']
if data_preprocessing['normalize_labels'] is True:
pipe = Pipeline(
memory=None,
steps=[
('standardscaler', preprocessing.StandardScaler(copy=True, with_mean=True, with_std=True) ),
('estimator', estimator)
]
)
return pipe
else:
return estimator
#decorator for adding properties to estimator classes
# class properties(object):
# """
# Decorator class used for adding properties to mlaut estimator classes. The properties that all mlaut estimator objects must have are: estimator family, task (classification, regression), name of estimator.
# The decorator attached a `properties()` method to the class which invokes it
# """
# def __init__(self,
# estimator_family,
# tasks,
# name,
# data_preprocessing={'normalize_features': False,
# 'normalize_labels': False}):
# """
# Args:
# estimator_family (array of strings): family of machine learning algorithms that the estimator belongs to.
# tasks (array of strings): array of tasks (classification and/or regression) that the estimator can be applied to.
# name (str): name of estimator.
# data_preprocessing (dictionary): dictionary with data preprocessing operations to be performed on datasets before they are used in training.
# """
# self._estimator_family = estimator_family
# self._tasks = tasks
# self._name = name
# self._data_preprocessing = data_preprocessing
# def _properties(self):
# """
# Method attached by the decorator to the mlaut estimator object.
# Returns:
# `dictionary`: Dictionary with the propoperties of the estimator.
# """
# #check whether the inputs are right
# if not isinstance(self._estimator_family, list) or \
# not isinstance(self._tasks, list):
# raise ValueError('Arguments to property_decorator must be provided as an array')
# properties_dict = {
# 'estimator_family': self._estimator_family,
# 'tasks': self._tasks,
# 'name': self._name,
# 'data_preprocessing': self._data_preprocessing
# }
# return properties_dict
# def _set_properties(self,
# estimator_family=None,
# tasks=None,
# name=None,
# data_preprocessing=None):
# """
# Alternative method for setting the properties of the estimator. Used when creating a generic estimator by inehriting from an already created class.
# """
# if estimator_family is not None:
# self._estimator_family = estimator_family
# if tasks is not None:
# self._tasks = tasks
# if name is not None:
# self._name = name
# if data_preprocessing is not None:
# self._data_preprocessing = data_preprocessing
# @wrapt.decorator
# def __call__(self, wrapped, instance, args, kwargs):
# #add/attach properties to class
# wrapped.properties = self._properties
# # wrapped.set_properties = self._set_properties
# return wrapped(*args, **kwargs)


Balance
HELP
LogOut
Buy
⌕
⇧
⇦
⇨
⇩
no data yet
HOW TO
x
Recharge
Open browser
goto
STREETWIFIY.CO.ZA
Click
'CONNECT'
Enter
VOUCHER
Click
BUY
Button to buy recharge voucher
Tips
# Check balance
goto
Streetwifiy.co.za/status
# Login
goto
Streetwifiy.co.za/login
# Logout
goto
Streetwifiy.co.za/logout
Voucher
Help yourself, To be helped
FREE WEBSITES
x
EDUCATION
edu1
edu2
edu3
JOBS
job1
job2
job3
Pass it on, unconditionally help a stranger, a friend, a family member
ANNOUNCEMENTS
x
ANNOUNCE1
edu1
ANNOUNCE2
edu3
If it was easy, no one would care. If it was impossible, no one would dare


Produce publication quality graphics from output of 'GGobi' describe display plugin.
| Version: | 0.2.7 |
| Imports: | reshape2, ggplot2 (≥ 3.0.0), plyr, scales, grid, GGally (≥ 1.4.0) |
| Suggests: | roxygen2 (≥ 6.0.1), testthat |
| Published: | 2018-09-23 |
| Author: | Di Cook [aut, cre], Hadley Wickham [aut], Andreas Buja [aut], Barret Schloerke [aut] |
| Maintainer: | Di Cook <dicook at monash.edu> |
| BugReports: | https://github.com/ggobi/DescribeDisplay/issues |
| License: | MIT + file LICENSE |
| URL: | https://github.com/ggobi/DescribeDisplay |
| NeedsCompilation: | no |
| Materials: | README NEWS |
| CRAN checks: | DescribeDisplay results |
| Reference manual: | DescribeDisplay.pdf |
| Package source: | DescribeDisplay_0.2.7.tar.gz |
| Windows binaries: | r-devel: DescribeDisplay_0.2.7.zip, r-release: DescribeDisplay_0.2.7.zip, r-oldrel: DescribeDisplay_0.2.7.zip |
| OS X binaries: | r-release: DescribeDisplay_0.2.7.tgz, r-oldrel: DescribeDisplay_0.2.7.tgz |
| Old sources: | DescribeDisplay archive |
Please use the canonical form https://CRAN.R-project.org/package=DescribeDisplay to link to this page.


Fehler in Ihrem Code sind:
http://www.google.de
1:
1:
info
http://www.google.de/
warning
Using “windows-1252” instead of the declared encoding “iso-8859-1”.
info
http://www.google.de/
warning
Legacy encoding “windows-1252” used. Documents should use UTF-8.
error
3
1968
1948
The “bgcolor” attribute on the “body” element is obsolete. Use CSS instead.
10
21
error
6
52
47
Element “nobr” not allowed as child of element “div” in this context. (Suppressing further errors from this subtree.)
10
6
error
6
127
“&” did not start a character reference. (“&” probably should have been escaped as “&”.)
15
1
error
6
198
“&” did not start a character reference. (“&” probably should have been escaped as “&”.)
15
1
error
6
265
“&” did not start a character reference. (“&” probably should have been escaped as “&”.)
15
1
error
6
331
“&” did not start a character reference. (“&” probably should have been escaped as “&”.)
15
1
error
6
404
“&” did not start a character reference. (“&” probably should have been escaped as “&”.)
15
1
error
6
699
675
Attribute “width” not allowed on element “div” at this point.
10
25
error
6
705
700
Element “nobr” not allowed as child of element “div” in this context. (Suppressing further errors from this subtree.)
10
6
error
6
1003
“&” did not start a character reference. (“&” probably should have been escaped as “&”.)
15
1
error
6
1157
1150
The “center” element is obsolete. Use CSS instead.
10
8
error
6
1200
1196
Element “div” not allowed as child of element “span” in this context. (Suppressing further errors from this subtree.)
10
5
error
6
3105
3088
The “border” attribute on the “table” element is obsolete. Use CSS instead.
10
18
error
6
3170
“&” did not start a character reference. (“&” probably should have been escaped as “&”.)
15
1
error
6
3347
3301
An “img” element must have an “alt” attribute, except under certain conditions. For details, consult guidance on providing text alternatives for images.
10
47
error
6
3615
“&” did not start a character reference. (“&” probably should have been escaped as “&”.)
15
1
error
7
58
33
The “clear” attribute on the “br” element is obsolete. Use CSS instead.
10
26
error
7
252
“&” did not start a character reference. (“&” probably should have been escaped as “&”.)
15
1
error
7
259
105
The “align” attribute on the “div” element is obsolete. Use CSS instead.
10
155
error
7
363
260
Attribute “nowrap” not allowed on element “div” at this point.
10
104
error
7
473
435
The “cellpadding” attribute on the “table” element is obsolete. Use CSS instead.
10
39
error
7
473
435
The “cellspacing” attribute on the “table” element is obsolete. Use CSS instead.
10
39
error
7
490
474
The “valign” attribute on the “tr” element is obsolete. Use CSS instead.
10
17
error
7
506
491
The “width” attribute on the “td” element is obsolete. Use CSS instead.
10
16
error
7
546
518
The “align” attribute on the “td” element is obsolete. Use CSS instead.
10
29
error
7
546
518
The “nowrap” attribute on the “td” element is obsolete. Use CSS instead.
10
29
error
7
1309
1255
The “align” attribute on the “td” element is obsolete. Use CSS instead.
10
55
error
7
1309
1255
The “nowrap” attribute on the “td” element is obsolete. Use CSS instead.
10
55
error
7
1309
1255
The “width” attribute on the “td” element is obsolete. Use CSS instead.
10
55
error
7
1644
1617
Element “div” not allowed as child of element “span” in this context. (Suppressing further errors from this subtree.)
10
28
error
7
2091
2053
Element “p” not allowed as child of element “span” in this context. (Suppressing further errors from this subtree.)
10
39


Miami University Libraries
Map Collection
MAP COLLECTION (Located in Brill Science Library, 1st floor. Phone: x7208)
HOURS
Monday - Friday 8:00am - 5:00pm
WHAT IS THE MAP COLLECTION?
Brill Science Library owns more than 70,000 maps produced by various
governmental agencies and commercial establishments. Maps produced by
the U.S. Geological Survey (USGS) and Defense Mapping Agency (DMA)
constitute the largest part of the collection and are received as
government depository material. Also Available are cartographic
reference tools, indexes to map series, various atlases and aids in
the use of maps.
MAP USE POLICIES
- The collection is open to the public.
- Maps are for IN-LIBRARY use only. They may be photocopied subject
to Fair Use Guidelines.
Back to Library Information
Back to Main Menu


1. See the top menu bar to find out what you need to find in the page.
2. Scroll through the page and search for "NIKE" letters in the photograph.
3. Click! until there's "Found!" shown below those letters.
4. Once you have found everything, congratulation! You have successfully explored that city!
Explore Cities!


ScoreKeep Pro
Dashboard
(current)
Game
Player
Score
About
Game
Create new game
Player
Add new player


Amsterdam, city and port, western Netherlands, located on the IJsselmeer and connected to the North Sea. It is the capital and the principal commercial and financial centre of the Netherlands. To the scores of tourists who visit each year, Amsterdam is known for its historical attractions, for its collections of great art, and for the distinctive colour and flavour of its old sections, which have been so well preserved. However, visitors to the city also see a crowded metropolis beset by environmental pollution, traffic congestion, and housing shortages. It is easy to describe Amsterdam, which is more than 700 years old, as a living museum of a bygone age and to praise the eternal beauty of the centuries-old canals, the ancient patrician houses, and the atmosphere of freedom and tolerance, but the modern city is still working out solutions to the pressing urban problems that confront it.
There are over 800,000 bicycles in Amsterdam. That’s more bikes than people! Cycling in Amsterdam is a way of life, made easier by the city’s unbeatable network of cycle routes and flat landscape. Amsterdam regularly comes out on top in lists of the world’s most cycle-friendly cities, and there’s no finer way to explore the city’s streets, canals and attractions than by pedal power. Cycling in Amsterdam is safe, enjoyable and invigorating - so join the locals and hop on your bike.
Created in the 17th century to keep the sea at bay, Amsterdam’s UNESCO protected canal belt is the quintessential picture-postcard vision of Amsterdam, and an unbelievably pretty sight by both day and night - when the bridges are lit up by fairy lights and the whole area takes on a magical feel. Floating along the canals by guided boat tour is a great way to get under the fabric of the city, and you’ll learn lots of fascinating facts along the way – such as why the tilting homes along the canals are known as ‘dancing houses’. There are many different canal cruises to choose from, from hop-on-hop-off sightseeing tours to atmospheric candlelit night time cruises with food and wine.
When it comes to nightlife in Amsterdam, there are venues, dance festivals and club nights to suit every taste! DJs keep the crowd going with everything from techno, dub step and trance to hip-hop, funk and deep house.


I'm Gerardo Tapia Vera, a former soccer player at the University of San Francisco and alumni with a degree in Kinesiology and Health Studies. In college, I found myself a lot on the bench, so I've created this website where players can tell their stories for the proper coaches to hear it and enroll in the correct school and soccer program.  That means that they must attend most of your community soccer games before you transfer to a 4 year university soccer program. Please consider the number of professinal soccer players that your university has produced throughout its years, and also cosider the race of the students and coaches at that university. Racism has gotten more complex throughout its history. Please believe that racism and discriminattion still exists on this planet. You can find recent news about racism and descrimination in professional soccer, just search it. Let this be a life lesson that you read about and not personally experience.
I found this beautiful woman in Instagram, and I immediately contacted her to ask for her permission to publish some of her all in black photos to this website. She accepted my request, please contact me and let me know your thoughts on her photos. I'll let her know what each of her photos makes you think. She's the first female I have the pleasure of publishing photos for on my website. If you want your photos on my website, then just contact me. It will be a real honor. Thanks.
Cynthia began following me in Instagram, and I then followed her and began chatting with her. She allowed me to post her photo on this website. She's a beautiful woman too.
mail<EMAIL_ADDRESS>tel: +18313561442
Photography
Web Design
Scripting
Do you want me to photograph you? Do you want a personalized website? I love meeting new people!


The earliest entry of enterprise architects into a project may happen at the time of the project kickoff. It is the time to gain a first-cut understanding of the business requirements and to recommend the technology prerogatives for solution implementation. This involvement is, however, restricted to an advisory role.
A more formal engagement of enterprise architects in the projects usually begins during the design phase, primarily for review of the proposed solution design for conformance against the stipulated architectural principles and standards.  This mechanism enables project teams, in consultation with the enterprise architect, to confirm the alignment of their solution design with the enterprise architecture, its policies, its technology roadmap, and its technology portfolio.
What does an enterprise architect need to review the solution designs for? There is no standard list of parameters on which such a review can be based. Again, it pretty much depends on the priorities and constraints of the enterprise. Nevertheless, the criteria listed in Table 3-11 give an idea of an enterprise architect’s possible architectural concerns during the design reviews.
As shown in Figure 3-17, 27 the architecture conformance review begins with a registration. The project team registers its solution design for architecture review to a governing body. TOGAF (The Open Group, 2011) identifies such a governance body as Architecture Review Board (ARB). The registration is needed to plan ahead the engagement of the project teams with the ARB during the upcoming delivery cycle. It helps them identify the design artifacts they want to put through the review process. It also chalks out the plan as to who, when, how, and on what criteria the reviews will be conducted.
It is expected that all the project teams register their solution designs for review by enterprise architects. It is, however, at the discretion of enterprise architects to determine which solution designs demand a formal review and which ones do not. Usually the enterprise architects need to focus their efforts on architecturally challenging areas in the enterprise.
Wherever practicable, the enterprise architect may recommend that the project architects themselves perform the review of their solution design and claim the self-certification for conformance. The enterprise architect can then determine whether such self-certification is justified, depending on the evidence produced by the project architect plus any other background factors such as the strategic importance of the solution and the track record of the project team. This minimizes the overhead for everyone.
We will explore new and effective ways of achieving this goal using the architecture scrum in Chapter 7, “Building Block 2: Involve All Stakeholders by Interlocking Architecture Scrums.” These scrums enforce strong rules for timeliness and quality and facilitate regular interaction and communication.
In essence there are two routes to certification for architecture conformance: self-assessment or a formal architecture conformance review. In either case, conformance certification must be sought by the project team before the solution design is finalized and the development begins. In some cases, the enterprise architect may grant a conditional certification, requiring the project teams to take corrective action to close the identified nonconformities prior to solution deployment.
After certification, if the project team makes any material change to the solution design, it must pass through the review process again. A material change is any change that invalidates the basis on which earlier conformance certification was granted. The enterprise architect comes back into the picture again during the acceptance testing phase. There the enterprise architect has to revalidate whether the solution being deployed is indeed architecturally conformant at that stage.
This is an idealistic sketch for an architectural governance process. In practice, we find project teams invariably fail to comply in many different ways and request exceptions. The most commonly encountered reasons are:
Some reasons are genuine, whereas some are mere excuses. What do enterprise architects do then?
In the first case, the project team may agree to take all possible corrective actions and the enterprise architect may also take a softer stand. They compromise and make a deal. But later the project team either gets dismantled due to the project closure or it demands additional funds or time for making post facto changes in design and deployment. It is quite unlikely that additional funds will simply be granted for the sake of architectural compliance.
In the second case, the enterprise architect is bound to meet resistance in escalating non-conformance to the steering committee. However, she rarely has a really strong case to make the steering committee act in her favor. This is especially true when the solution has already been implemented by the project team and is working as intended in the production environment.
So, neither compromise nor confrontation works well. It is therefore of utmost importance for an enterprise architect to convincingly negotiate. He needs to create a win-win situation for both parties rather than falling into the trap of argumentative discussions. It is a real test to measure the enterprise architect’s interpersonal skills.
In Bank4Us, the enterprise architects assess solution designs by conducting formal architecture reviews. Oscar Salgado, the chief architect, reports a consolidated architecture conformance report to the steering committee at the end of each 90-day delivery cycle. The report is a dashboard, as shown in Table 3-12, intended to be discussed during the post-implementation review.


Web Applications
Virtual Reality
This section will soon be updated! Please check back later.
3D and Photogrammetry
This section will soon be updated! In the meantime, please see my Sketchfab portfolio to view past projects.
Reference Maps
Auckland, New Zealand
A reference map of the city of Auckland and surrounding region, including major land uses. Data compiled and manipulated in QGIS, designed and formatted in Inkscape and GIMP. (n.b. the linked file weighs about 1MB)
See project →
The Via Alpina, Switzerland
For this project, I wanted to create a poster-style map of the Swiss section of the Via Alpina long-distance hiking trail. Data compiled and manipulated in QGIS, designed and formatted in Inkscape and GIMP. (n.b. the linked file weighs about 1MB)
See project →Skills
| Programming | HTML, CSS, Javascript, jQuery, React |
| Virtual Reality | ReactVR |
| 3D | Blender, 3DF Zephyr, COLMAP |
| SVG and Image manipulation | Inkscape, GIMP |
| GIS and Cartography | QGIS, Leaflet, OpenStreetMap, CartoDB, Tilemill |


--- layout: page title: "About" description: "Code Writer @ Red Hat." header-img: "img/about-bg.jpg" ---
I don't want to get too deep into but I am software developer at Red Hat who often works with OpenShift. From time to time I write something relatively informative about it. For the most part, I am out in the field sharing this product with some of our newest customers.


Bootcamp Title
i.e. http://angel.co/bootcamp
i.e. http://www.coursereport.com/schools/bootcamp
i.e. http://www.facebook.com/bootcamp
i.e. http://www.plus.google.com/bootcamp/about
i.e. http://www.linkedin.com/company/bootcamp
i.e. http://www.quora.com/bootcamp
i.e. http://schools.techendo.com/schools/bootcamp
i.e. http://www.twitter.com/bootcamp
i.e. http://www.yelp.com/biz/bootcamp


Databases
1Properties
| Name | Value |
|---|---|
| Product | Microsoft SQL Server |
| Version Level | RTM |
| Edition | Developer Edition (64-bit) |
| Version | 14.0.1000.169 |
| Language | English (United States) |
| Collation | Cyrillic_General_CI_AS |
| Platform | NT x64 |
| OS Version | 6.3 (9600) |
| Processors | 2 |
| Physical Memory (Mb) | 8191 |
| Clustered | False |
| Root Directory | C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL |
Settings
| Name | Value |
|---|---|
| Default data file path | E:\sql_data\ |
| Default log file path | F:\sql_log\ |
| Default backup file path | E:\BACKUPS |
| Recovery Interval (minutes) | 0 |
| Default index fill factor (%) | 80 |
| Default backup media retention (days) | 0 |
| Compress backup | True |
| Nested triggers enabled | True |
| Allow triggers to fire others | True |
| Default language | us_english |
| Default fulltext language | us_english |
| Default fulltext language LCID | 1033 |
| Network packet size | 4096 |
| Two digit year cutoff | 2049 |
| Max text replication size (bytes) | 65536 |
| Locks | 0 |
| Blocked process threshold | 0 |
| Cursor threshold | -1 |
| Cost threshold for parallelism | 5 |
| Scans and runs startup procedures | False |
| Transform noise words | False |
| Filestream access level | Disabled |
| Optimize for 'ad hoc' workloads | True |
| Remote login timeout (sec) | 10 |