|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Object java.lang.Enum<JSOM.JSOMType> com.habelitz.jsobjectizer.jsom.JSOM.JSOMType
public static enum JSOM.JSOMType
Defines constants for all non-abstract JSOM
types, excepting
those types derived from Expression
(which is the base type
for all kind of expression types) and StatementBlockElement
(which is the base type for all kind of statements).
From a JSOMType
's view all Expression
types and
StatementBlockElement
types are bound to the JSOMType
EXPRESSION
and STATEMENT_BLOCK_ELEMENT
respectively.
The constant names correspond to the appropriate JSOM
subtype class names.
| Enum Constant Summary | |
|---|---|
ANNOTATION
Constant for a JSOM type representing an annotation. |
|
ANNOTATION_DECLARATION
Constant for a JSOM type representing an annotation declaration. |
|
ANNOTATION_ELEMENT_VALUE
Constant for a JSOM type representing an annotation element value. |
|
ANNOTATION_INITIALIZER
Constant for a JSOM type representing an annotation initializer. |
|
ANNOTATION_METHOD_DECLARATION
Constant for a JSOM type representing an annotation method declaration. |
|
ANNOTATION_TOP_LEVEL_SCOPE
Constant for a JSOM type representing an annotation declaration's top level scope, i.e. the body of an annotation declaration. |
|
CLASS_DECLARATION
Constant for a JSOM type representing a class declaration. |
|
CLASS_EXTENDS_CLAUSE
Constant for a JSOM type representing an extends clause
for class declarations. |
|
CLASS_TOP_LEVEL_SCOPE
Constant for a JSOM type representing a class declaration's top level scope, i.e. the body of a class declaration. |
|
COMPLEX_TYPE_IDENTIFIER
Constant for a JSOM type representing the identifier of a complex type, for instance, a class type identifier. |
|
CONSTRUCTOR_DEFINITION
Constant for a JSOM type representing a constructor definition. |
|
ENUM_CONSTANT
Constant for a JSOM type representing an enumeration constant. |
|
ENUM_DECLARATION
Constant for a JSOM type representing an enumeration declaration. |
|
ENUM_TOP_LEVEL_SCOPE
Constant for a JSOM type representing an enumeration declaration's top level scope, i.e. the body of an enumeration declaration. |
|
EXPRESSION
Constant for a JSOM type representing an expression. |
|
FORMAL_PARAMETER_DECLARATION
Constant for a JSOM type representing a formal parameter declaration. |
|
FORMAL_PARAMETER_LIST
Constant for a JSOM type representing a formal parameter list. |
|
GENERIC_TYPE_ARGUMENT
Constant for a JSOM type representing a generic type argument. |
|
GENERIC_TYPE_PARAMETER
Constant for a JSOM type representing a generic type parameter. |
|
IMPLEMENTS_CLAUSE
Constant for a JSOM type representing an implements
clause. |
|
IMPORT_DECLARATION
Constant for a JSOM type representing an import
declaration. |
|
INTERFACE_DECLARATION
Constant for a JSOM type representing an interface declaration. |
|
INTERFACE_EXTENDS_CLAUSE
Constant for a JSOM type representing an extends clause
for interface declarations. |
|
INTERFACE_TOP_LEVEL_SCOPE
Constant for a JSOM type representing an interface declaration's top level scope, i.e. the body of an interface declaration. |
|
JAVA_SOURCE
Constant for a JSOM type representing a Java source. |
|
METHOD_DECLARATION
Constant for a JSOM type representing a method declaration. |
|
METHOD_DEFINITION
Constant for a JSOM type representing a method definition. |
|
MODIFIER_LIST
Constant for a JSOM type representing a modifier list. |
|
PRIMITIVE_TYPE
Constant for a JSOM type representing a primitive type. |
|
QUALIFIED_IDENTIFIER
Constant for a JSOM type representing a qualified identifier. |
|
STATEMENT_BLOCK_ELEMENT
Constant for a JSOM type representing a statement block element. |
|
STATEMENT_BLOCK_ELEMENT_HELPER
Constant for JSOM types that represent more or less closed parts of statements, i.e. statement clauses and so on. |
|
THROWS_CLAUSE
Constant for a JSOM type representing a throws clause. |
|
TYPE
Constant for a JSOM type representing a type. |
|
TYPE_MEMBER_DECLARATION
Constant for a JSOM type representing type member declarations, i.e. |
|
VARIABLE_DECLARATOR
Constant for a JSOM type representing a variable declarator. |
|
VARIABLE_DECLARATOR_IDENTIFIER
Constant for a JSOM type representing a variable declarator identifier which states the variable identifier and the number of array declarators (i.e. the number of [] character
sequences) that follow the identifier. |
|
VARIABLE_INITIALIZER
Constant for a JSOM type representing a variable initializer. |
|
XTRA
This constant is free to use for JSOM implementors for
whatever purposes. |
| Method Summary | |
|---|---|
static JSOM.JSOMType |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. |
static JSOM.JSOMType[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
| Methods inherited from class java.lang.Enum |
|---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Enum Constant Detail |
|---|
public static final JSOM.JSOMType ANNOTATION
Annotation
public static final JSOM.JSOMType ANNOTATION_DECLARATION
AnnotationDeclaration
public static final JSOM.JSOMType ANNOTATION_ELEMENT_VALUE
An annotation element value is the value stated by an annotation initializer.
AnnotationElementValue
public static final JSOM.JSOMType ANNOTATION_INITIALIZER
AnnotationInitializer
public static final JSOM.JSOMType ANNOTATION_METHOD_DECLARATION
AnnotationMethodDeclaration
public static final JSOM.JSOMType ANNOTATION_TOP_LEVEL_SCOPE
AnnotationTopLevelScope
public static final JSOM.JSOMType CLASS_DECLARATION
ClassDeclaration
public static final JSOM.JSOMType CLASS_EXTENDS_CLAUSE
extends
clause
for class declarations.
ClassExtendsClause
public static final JSOM.JSOMType CLASS_TOP_LEVEL_SCOPE
ClassTopLevelScope
public static final JSOM.JSOMType COMPLEX_TYPE_IDENTIFIER
ComplexTypeIdentifier
public static final JSOM.JSOMType CONSTRUCTOR_DEFINITION
ConstructorDefinition
public static final JSOM.JSOMType ENUM_CONSTANT
EnumConstant
public static final JSOM.JSOMType ENUM_DECLARATION
EnumDeclaration
public static final JSOM.JSOMType ENUM_TOP_LEVEL_SCOPE
EnumTopLevelScope
public static final JSOM.JSOMType EXPRESSION
Note that this constant will be used for all JSOM types representing
an expression. There are various subtypes of the type
Expression
and it's up to the Expression
base
type to define appropriate constants for the various expression
types.
Expression
public static final JSOM.JSOMType FORMAL_PARAMETER_DECLARATION
FormalParameterDeclaration
public static final JSOM.JSOMType FORMAL_PARAMETER_LIST
FormalParameterList
public static final JSOM.JSOMType GENERIC_TYPE_ARGUMENT
GenericTypeArgument
public static final JSOM.JSOMType GENERIC_TYPE_PARAMETER
GenericTypeParameter
public static final JSOM.JSOMType IMPLEMENTS_CLAUSE
implements
clause.
ImplementsClause
public static final JSOM.JSOMType IMPORT_DECLARATION
import
declaration.
ImportDeclaration
public static final JSOM.JSOMType INTERFACE_DECLARATION
InterfaceDeclaration
public static final JSOM.JSOMType INTERFACE_EXTENDS_CLAUSE
extends
clause
for interface declarations.
InterfaceExtendsClause
public static final JSOM.JSOMType INTERFACE_TOP_LEVEL_SCOPE
EnumTopLevelScope
public static final JSOM.JSOMType JAVA_SOURCE
JavaSource
public static final JSOM.JSOMType METHOD_DECLARATION
Note that for a JSOM type representing non-abstract methods the
constant METHOD_DEFINITION
instead of this constant.
MethodDeclaration
,
MethodDefinition
public static final JSOM.JSOMType METHOD_DEFINITION
Note that for a JSOM type representing abstract methods the constant
METHOD_DECLARATION
instead of this constant.
MethodDefinition
,
MethodDeclaration
public static final JSOM.JSOMType MODIFIER_LIST
Note that a modifier list may also contain annotations. This is because annotations can be stated everywhere modifiers can occur.
ModifierList
public static final JSOM.JSOMType PRIMITIVE_TYPE
This constant will be used for type representations that can only be
primitive type. If a type respresentation may be a primitive type but
also a complex type the constant TYPE
must be used.
PrimitiveType
,
Type
public static final JSOM.JSOMType QUALIFIED_IDENTIFIER
Qualified identifier means that a certain identifier may be a qualified identifier. It is not obligatory that the identifier is acutally a qualified identifier, i.e. it may also be a single identifier.
QualifiedIdentifier
public static final JSOM.JSOMType STATEMENT_BLOCK_ELEMENT
A statement block element can be a local variable declaration, a local type declaration or any statement type. A more formal description of a statement block element is that such elements are direct children of a statement block scope (method or constructor bodies, compound statements, etc).
Note that this constant will be used for all JSOM types representing
a statement block element. There are various subtypes of the type
StatementBlockElement
and it's up to the
StatementBlockElement
base type to define appropriate
constants for the various statement block element types.
StatementBlockElement
public static final JSOM.JSOMType STATEMENT_BLOCK_ELEMENT_HELPER
For some examples ...
SwitchStatement.SwitchLabel
,
TryStatement.Catch
public static final JSOM.JSOMType THROWS_CLAUSE
throws
clause.
ThrowsClause
public static final JSOM.JSOMType TYPE
This constant must be used for types that may be primitive types but also complex types.
Type
,
PrimitiveType
public static final JSOM.JSOMType TYPE_MEMBER_DECLARATION
TypeMemberDeclaration
public static final JSOM.JSOMType VARIABLE_DECLARATOR
A variable declarator is the part of a variable declaration that contains the variable identifier and the initializer.
VariableDeclarator
public static final JSOM.JSOMType VARIABLE_DECLARATOR_IDENTIFIER
[]
character
sequences) that follow the identifier.
VariableDeclaratorIdentifier
public static final JSOM.JSOMType VARIABLE_INITIALIZER
VariableInitializer
public static final JSOM.JSOMType XTRA
JSOM
implementors for
whatever purposes. It isn't referenced nowhere by the JSOM
interfaces.
| Method Detail |
|---|
public static JSOM.JSOMType[] values()
for (JSOM.JSOMType c : JSOM.JSOMType.values()) System.out.println(c);
public static JSOM.JSOMType valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.
java.lang.IllegalArgumentException
- if this enum type has no constant
with the specified name
java.lang.NullPointerException
- if the argument is null
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |


CreateFunction
Creates a Lambda function. To create a function, you need a deployment package and an execution role. The deployment package is a .zip file archive or container image that contains your function code. The execution role grants the function permission to use AWS services, such as Amazon CloudWatch Logs for log streaming and AWS X-Ray for request tracing.
When you create a function, Lambda provisions an instance of the function and its
supporting resources. If
your function connects to a VPC, this process can take a minute or so. During this
time, you can't invoke or
modify the function. The State
, StateReason
, and StateReasonCode
fields in
the response from GetFunctionConfiguration indicate when the function is ready to invoke. For
more information, see Function
States.
A function has an unpublished version, and can have published versions and aliases.
The unpublished version
changes when you update your function's code and configuration. A published version
is a snapshot of your function
code and configuration that can't be changed. An alias is a named resource that maps
to a version, and can be
changed to map to a different version. Use the Publish
parameter to create version 1
of
your function from its initial configuration.
The other parameters let you configure version-specific and function-level settings. You can modify version-specific settings later with UpdateFunctionConfiguration. Function-level settings apply to both the unpublished and published versions of the function, and include tags (TagResource) and per-function concurrency limits (PutFunctionConcurrency).
You can use code signing if your deployment package is a .zip file archive. To enable code signing for this function, specify the ARN of a code-signing configuration. When a user attempts to deploy a code package with UpdateFunctionCode, Lambda checks that the code package has a valid signature from a trusted publisher. The code-signing configuration includes set set of signing profiles, which define the trusted publishers for this function.
If another account or an AWS service invokes your function, use AddPermission to grant permission by creating a resource-based IAM policy. You can grant permissions at the function level, on a version, or on an alias.
To invoke your function directly, use Invoke. To invoke your function in response to events in other AWS services, create an event source mapping (CreateEventSourceMapping), or configure a function trigger in the other service. For more information, see Invoking Functions.
Request Syntax
POST /2015-03-31/functions HTTP/1.1
Content-type: application/json
{
"Code": {
"ImageUri": "string
",
"S3Bucket": "string
",
"S3Key": "string
",
"S3ObjectVersion": "string
",
"ZipFile": blob
},
"CodeSigningConfigArn": "string
",
"DeadLetterConfig": {
"TargetArn": "string
"
},
"Description": "string
",
"Environment": {
"Variables": {
"string
" : "string
"
}
},
"FileSystemConfigs": [
{
"Arn": "string
",
"LocalMountPath": "string
"
}
],
"FunctionName": "string
",
"Handler": "string
",
"ImageConfig": {
"Command": [ "string
" ],
"EntryPoint": [ "string
" ],
"WorkingDirectory": "string
"
},
"KMSKeyArn": "string
",
"Layers": [ "string
" ],
"MemorySize": number
,
"PackageType": "string
",
"Publish": boolean
,
"Role": "string
",
"Runtime": "string
",
"Tags": {
"string
" : "string
"
},
"Timeout": number
,
"TracingConfig": {
"Mode": "string
"
},
"VpcConfig": {
"SecurityGroupIds": [ "string
" ],
"SubnetIds": [ "string
" ]
}
}
URI Request Parameters
The request does not use any URI parameters.
Request Body
The request accepts the following data in JSON format.
- Code
-
The code for the function.
Type: FunctionCode object
Required: Yes
- CodeSigningConfigArn
-
To enable code signing for this function, specify the ARN of a code-signing configuration. A code-signing configuration includes a set of signing profiles, which define the trusted publishers for this function.
Type: String
Length Constraints: Maximum length of 200.
Pattern:
arn:(aws[a-zA-Z-]*)?:lambda:[a-z]{2}((-gov)|(-iso(b?)))?-[a-z]+-\d{1}:\d{12}:code-signing-config:csc-[a-z0-9]{17}
Required: No
- DeadLetterConfig
-
A dead letter queue configuration that specifies the queue or topic where Lambda sends asynchronous events when they fail processing. For more information, see Dead Letter Queues.
Type: DeadLetterConfig object
Required: No
- Description
-
A description of the function.
Type: String
Length Constraints: Minimum length of 0. Maximum length of 256.
Required: No
- Environment
-
Environment variables that are accessible from function code during execution.
Type: Environment object
Required: No
- FileSystemConfigs
-
Connection settings for an Amazon EFS file system.
Type: Array of FileSystemConfig objects
Array Members: Maximum number of 1 item.
Required: No
- FunctionName
-
The name of the Lambda function.
Name formats
-
Function name -
my-function
. -
Function ARN -
arn:aws:lambda:us-west-2:123456789012:function:my-function
. -
Partial ARN -
123456789012:function:my-function
.
The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 140.
Pattern:
(arn:(aws[a-zA-Z-]*)?:lambda:)?([a-z]{2}(-gov)?-[a-z]+-\d{1}:)?(\d{12}:)?(function:)?([a-zA-Z0-9-_]+)(:(\$LATEST|[a-zA-Z0-9-_]+))?
Required: Yes
-
- Handler
-
The name of the method within your code that Lambda calls to execute your function. The format includes the file name. It can also include namespaces and other qualifiers, depending on the runtime. For more information, see Programming Model.
Type: String
Length Constraints: Maximum length of 128.
Pattern:
[^\s]+
Required: No
- ImageConfig
-
Container image configuration values that override the values in the container image Dockerfile.
Type: ImageConfig object
Required: No
- KMSKeyArn
-
The ARN of the AWS Key Management Service (AWS KMS) key that's used to encrypt your function's environment variables. If it's not provided, AWS Lambda uses a default service key.
Type: String
Pattern:
(arn:(aws[a-zA-Z-]*)?:[a-z0-9-.]+:.*)|()
Required: No
- Layers
-
A list of function layers to add to the function's execution environment. Specify each layer by its ARN, including the version.
Type: Array of strings
Length Constraints: Minimum length of 1. Maximum length of 140.
Pattern:
arn:[a-zA-Z0-9-]+:lambda:[a-zA-Z0-9-]+:\d{12}:layer:[a-zA-Z0-9-_]+:[0-9]+
Required: No
- MemorySize
-
The amount of memory available to the function at runtime. Increasing the function's memory also increases its CPU allocation. The default value is 128 MB. The value can be any multiple of 1 MB.
Type: Integer
Valid Range: Minimum value of 128. Maximum value of 10240.
Required: No
- PackageType
-
The type of deployment package. Set to
Image
for container image and setZip
for ZIP archive.Type: String
Valid Values:
Zip | Image
Required: No
- Publish
-
Set to true to publish the first version of the function during creation.
Type: Boolean
Required: No
- Role
-
The Amazon Resource Name (ARN) of the function's execution role.
Type: String
Pattern:
arn:(aws[a-zA-Z-]*)?:iam::\d{12}:role/?[a-zA-Z_0-9+=,.@\-_/]+
Required: Yes
- Runtime
-
The identifier of the function's runtime.
Type: String
Valid Values:
nodejs | nodejs4.3 | nodejs6.10 | nodejs8.10 | nodejs10.x | nodejs12.x | nodejs14.x | java8 | java8.al2 | java11 | python2.7 | python3.6 | python3.7 | python3.8 | dotnetcore1.0 | dotnetcore2.0 | dotnetcore2.1 | dotnetcore3.1 | nodejs4.3-edge | go1.x | ruby2.5 | ruby2.7 | provided | provided.al2
Required: No
- Tags
-
A list of tags to apply to the function.
Type: String to string map
Required: No
- Timeout
-
The amount of time that Lambda allows a function to run before stopping it. The default is 3 seconds. The maximum allowed value is 900 seconds.
Type: Integer
Valid Range: Minimum value of 1.
Required: No
- TracingConfig
-
Set
Mode
toActive
to sample and trace a subset of incoming requests with AWS X-Ray.Type: TracingConfig object
Required: No
- VpcConfig
-
For network connectivity to AWS resources in a VPC, specify a list of security groups and subnets in the VPC. When you connect a function to a VPC, it can only access resources and the internet through that VPC. For more information, see VPC Settings.
Type: VpcConfig object
Required: No
Response Syntax
HTTP/1.1 201
Content-type: application/json
{
"CodeSha256": "string",
"CodeSize": number,
"DeadLetterConfig": {
"TargetArn": "string"
},
"Description": "string",
"Environment": {
"Error": {
"ErrorCode": "string",
"Message": "string"
},
"Variables": {
"string" : "string"
}
},
"FileSystemConfigs": [
{
"Arn": "string",
"LocalMountPath": "string"
}
],
"FunctionArn": "string",
"FunctionName": "string",
"Handler": "string",
"ImageConfigResponse": {
"Error": {
"ErrorCode": "string",
"Message": "string"
},
"ImageConfig": {
"Command": [ "string" ],
"EntryPoint": [ "string" ],
"WorkingDirectory": "string"
}
},
"KMSKeyArn": "string",
"LastModified": "string",
"LastUpdateStatus": "string",
"LastUpdateStatusReason": "string",
"LastUpdateStatusReasonCode": "string",
"Layers": [
{
"Arn": "string",
"CodeSize": number,
"SigningJobArn": "string",
"SigningProfileVersionArn": "string"
}
],
"MasterArn": "string",
"MemorySize": number,
"PackageType": "string",
"RevisionId": "string",
"Role": "string",
"Runtime": "string",
"SigningJobArn": "string",
"SigningProfileVersionArn": "string",
"State": "string",
"StateReason": "string",
"StateReasonCode": "string",
"Timeout": number,
"TracingConfig": {
"Mode": "string"
},
"Version": "string",
"VpcConfig": {
"SecurityGroupIds": [ "string" ],
"SubnetIds": [ "string" ],
"VpcId": "string"
}
}
Response Elements
If the action is successful, the service sends back an HTTP 201 response.
The following data is returned in JSON format by the service.
- CodeSha256
-
The SHA256 hash of the function's deployment package.
Type: String
- CodeSize
-
The size of the function's deployment package, in bytes.
Type: Long
- DeadLetterConfig
-
The function's dead letter queue.
Type: DeadLetterConfig object
- Description
-
The function's description.
Type: String
Length Constraints: Minimum length of 0. Maximum length of 256.
- Environment
-
The function's environment variables.
Type: EnvironmentResponse object
- FileSystemConfigs
-
Connection settings for an Amazon EFS file system.
Type: Array of FileSystemConfig objects
Array Members: Maximum number of 1 item.
- FunctionArn
-
The function's Amazon Resource Name (ARN).
Type: String
Pattern:
arn:(aws[a-zA-Z-]*)?:lambda:[a-z]{2}(-gov)?-[a-z]+-\d{1}:\d{12}:function:[a-zA-Z0-9-_\.]+(:(\$LATEST|[a-zA-Z0-9-_]+))?
- FunctionName
-
The name of the function.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 170.
Pattern:
(arn:(aws[a-zA-Z-]*)?:lambda:)?([a-z]{2}(-gov)?-[a-z]+-\d{1}:)?(\d{12}:)?(function:)?([a-zA-Z0-9-_\.]+)(:(\$LATEST|[a-zA-Z0-9-_]+))?
- Handler
-
The function that Lambda calls to begin executing your function.
Type: String
Length Constraints: Maximum length of 128.
Pattern:
[^\s]+
- ImageConfigResponse
-
The function's image configuration values.
Type: ImageConfigResponse object
- KMSKeyArn
-
The KMS key that's used to encrypt the function's environment variables. This key is only returned if you've configured a customer managed CMK.
Type: String
Pattern:
(arn:(aws[a-zA-Z-]*)?:[a-z0-9-.]+:.*)|()
- LastModified
-
The date and time that the function was last updated, in ISO-8601 format
(YYYY-MM-DDThh:mm:ss.sTZD). Type: String
- LastUpdateStatus
-
The status of the last update that was performed on the function. This is first set to
Successful
after function creation completes.Type: String
Valid Values:
Successful | Failed | InProgress
- LastUpdateStatusReason
-
The reason for the last update that was performed on the function.
Type: String
- LastUpdateStatusReasonCode
-
The reason code for the last update that was performed on the function.
Type: String
Valid Values:
EniLimitExceeded | InsufficientRolePermissions | InvalidConfiguration | InternalError | SubnetOutOfIPAddresses | InvalidSubnet | InvalidSecurityGroup | ImageDeleted | ImageAccessDenied | InvalidImage
- Layers
-
The function's layers.
Type: Array of Layer objects
- MasterArn
-
For Lambda@Edge functions, the ARN of the master function.
Type: String
Pattern:
arn:(aws[a-zA-Z-]*)?:lambda:[a-z]{2}(-gov)?-[a-z]+-\d{1}:\d{12}:function:[a-zA-Z0-9-_]+(:(\$LATEST|[a-zA-Z0-9-_]+))?
- MemorySize
-
The amount of memory available to the function at runtime.
Type: Integer
Valid Range: Minimum value of 128. Maximum value of 10240.
- PackageType
-
The type of deployment package. Set to
Image
for container image and setZip
for .zip file archive.Type: String
Valid Values:
Zip | Image
- RevisionId
-
The latest updated revision of the function or alias.
Type: String
- Role
-
The function's execution role.
Type: String
Pattern:
arn:(aws[a-zA-Z-]*)?:iam::\d{12}:role/?[a-zA-Z_0-9+=,.@\-_/]+
- Runtime
-
The runtime environment for the Lambda function.
Type: String
Valid Values:
nodejs | nodejs4.3 | nodejs6.10 | nodejs8.10 | nodejs10.x | nodejs12.x | nodejs14.x | java8 | java8.al2 | java11 | python2.7 | python3.6 | python3.7 | python3.8 | dotnetcore1.0 | dotnetcore2.0 | dotnetcore2.1 | dotnetcore3.1 | nodejs4.3-edge | go1.x | ruby2.5 | ruby2.7 | provided | provided.al2
- SigningJobArn
-
The ARN of the signing job.
Type: String
Pattern:
arn:(aws[a-zA-Z0-9-]*):([a-zA-Z0-9\-])+:([a-z]{2}(-gov)?-[a-z]+-\d{1})?:(\d{12})?:(.*)
- SigningProfileVersionArn
-
The ARN of the signing profile version.
Type: String
Pattern:
arn:(aws[a-zA-Z0-9-]*):([a-zA-Z0-9\-])+:([a-z]{2}(-gov)?-[a-z]+-\d{1})?:(\d{12})?:(.*)
- State
-
The current state of the function. When the state is
Inactive
, you can reactivate the function by invoking it.Type: String
Valid Values:
Pending | Active | Inactive | Failed
- StateReason
-
The reason for the function's current state.
Type: String
- StateReasonCode
-
The reason code for the function's current state. When the code is
Creating
, you can't invoke or modify the function.Type: String
Valid Values:
Idle | Creating | Restoring | EniLimitExceeded | InsufficientRolePermissions | InvalidConfiguration | InternalError | SubnetOutOfIPAddresses | InvalidSubnet | InvalidSecurityGroup | ImageDeleted | ImageAccessDenied | InvalidImage
- Timeout
-
The amount of time in seconds that Lambda allows a function to run before stopping it.
Type: Integer
Valid Range: Minimum value of 1.
- TracingConfig
-
The function's AWS X-Ray tracing configuration.
Type: TracingConfigResponse object
- Version
-
The version of the Lambda function.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 1024.
Pattern:
(\$LATEST|[0-9]+)
- VpcConfig
-
The function's networking configuration.
Type: VpcConfigResponse object
Errors
- CodeSigningConfigNotFoundException
-
The specified code signing configuration does not exist.
HTTP Status Code: 404
- CodeStorageExceededException
-
You have exceeded your maximum total code size per account. Learn more
HTTP Status Code: 400
- CodeVerificationFailedException
-
The code signature failed one or more of the validation checks for signature mismatch or expiry, and the code signing policy is set to ENFORCE. Lambda blocks the deployment.
HTTP Status Code: 400
- InvalidCodeSignatureException
-
The code signature failed the integrity check. Lambda always blocks deployment if the integrity check fails, even if code signing policy is set to WARN.
HTTP Status Code: 400
- InvalidParameterValueException
-
One of the parameters in the request is invalid.
HTTP Status Code: 400
- ResourceConflictException
-
The resource already exists, or another operation is in progress.
HTTP Status Code: 409
- ResourceNotFoundException
-
The resource specified in the request does not exist.
HTTP Status Code: 404
- ServiceException
-
The AWS Lambda service encountered an internal error.
HTTP Status Code: 500
- TooManyRequestsException
-
The request throughput limit was exceeded.
HTTP Status Code: 429
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:


---
layout: page
title: Research
subtitle:
use-site-title: true
---
I am an applied mathematician with a deep interest in interdisciplinary applications and data science using topological and geometric techniques. My thesis work focused on constructions and comparisons of weighted directed graphs for representing multidimensional time series data. These constructions use tools from Topological Data Analysis (TDA) and have applications in biological network analysis. Additionally, I have been involved in projects concerning inverse problems in TDA and directed topology. I am interested in expanding my research expertise to include more techniques from machine learning and network science.
Publications
- Extremal Event Graphs: A (Stable) Tool for Analyzing Noisy Time Series. Published in the Journal of Foundations of Data Science. 2023. This work is joint with Bree Cummins, Brittany Terese Fasy, and Tomas Gedeon.
- Combinatorial Conditions for Directed Collapsing. Published in Research in Computational Topology 2. 2022. This work is joint with Robyn Brooks, Stefania Ebli, Lisbeth Fajstrup, Brittany Terese Fasy, Nicole Sanderson, and Elizabeth Vidaurre.
- Reconstructing Embedded Graphs from Persistence Diagrams. Published in Computational Geometry Theory and Applications (CGTA). 2020. Joint with Brittany Terese Fasy, Rostik Mertz, Samuel Micka, David L. Millman, Daniel Salinas, Anna Schenfisch, Jordan Schupbach, and Lucia Williams.
- Towards Directed Collapsibility. Published in Advances in Mathematical Sciences: AWM Research Symposium. 2020. Joint with Robyn Brooks, Stefania Ebli, Lisbeth Fajstrup, Brittany Terese Fasy, Catherine Ray, Nicole Sanderson, and Elizabeth Vidaurre.
- Learning Simplicial Complexes from Persistence Diagrams. Published in the 2018 proceedings on the Canadian Conference in Computational Geometry (CCCG). Joint with Brittany Terese Fasy, Rostik Mertz, Samuel Micka, David L. Millman, Daniel Salinas, Anna Schenfisch, Jordan Schupbach, and Lucia Williams.
- Loss of TXNIP enhances peritoneal metastasis and can be abrogated by dual TORC1/2 inhibition. Published in Oncotarget. 2018. Joint with Douglas Spaeth-Cook, Mark Burch, Bryce Demoret, Nicholas Grosenbacher, Jason David, Colin Stets, David Cohen, Reena Shakya, John L. Hays, and James L. Chen.
- A shape-context model for matching placental chorionic surface vascular networks. Published in Image Analysis and Stereology. 2018. Joint with Elin Farnell, Shawn Farnell, Jen-Mei Chang, Madison Hoffman, Kathryn Keaty, Sanford Lederman, Carolyn Salafia.
Code


|
The rrdFlotAsync Javascript module implements a class used to represents a RDD archive as a Flot plot. Tooltips are provided by the tooltip plugin. |
This module provide three classes:
Given one or more URLs, these classes asynchronously load the files, and when all are loaded, create an interactive Flot plot.
In order to use this module, you also need to include (along with their dependencies):
This class creates a graph out of single file.
The rrdFlotAsync constructor has two to nine arguments:
|
Argument |
Description |
|---|---|
|
html_id |
ID of a HTML element, possibly a DIV. |
|
url |
A string pointing to the file to load. |
|
file_options (optional) |
See RRDFile constructor for details. |
|
graph_options (optional) |
See rrdFlot constructor for details. |
|
ds_graph_options (optional) |
|
|
rrdflot_defaults (optional) |
|
|
ds_op_list (optional) |
If present, will wrap the data in RRDFilterOp |
|
rrd_op_list (optional) |
If present, will wrap the data in RRDRRAFilterAvg |
|
customization_callback (optional) |
If present, will be called after the data has been loaded and before the graph is drawn |
Once instantiated, the object will automatically draw the plot and handle user interaction.
This class creates a graph out of a set of files, using RRDFileSum to glue them together.
The rrdFlotSumAsync constructor has two to ten arguments:
|
Argument |
Description |
|---|---|
|
html_id |
ID of a HTML element, possibly a DIV. |
|
url_list |
A list of strings pointing to the files to load. |
|
file_options (optional) |
See RRDFile constructor for details. |
|
sumfile_options (optional) |
See RRDFileSum constructor for details. |
|
graph_options (optional) |
See rrdFlot constructor for details. |
|
ds_graph_options (optional) |
|
|
rrdflot_defaults (optional) |
|
|
ds_op_list (optional) |
If present, will wrap the data in RRDFilterOp |
|
rrd_op_list (optional) |
If present, will wrap the data in RRDRRAFilterAvg |
|
customization_callback (optional) |
If present, will be called after the data has been loaded and before the graph is drawn |
Once instantiated, the object will automatically draw the plot and handle user interaction.
This class creates a graph out of a set of files, using rrdFlotMatrix to glue them together.
The rrdFlotMatrixAsync constructor has two to ten arguments:
|
Argument |
Description |
|---|---|
|
html_id |
ID of a HTML element, possibly a DIV. |
|
url_list |
A list of tuples pointing to the files to load. Each tuple must be [file_id, file_url]. |
|
file_options (optional) |
See RRDFile constructor for details. |
|
ds_list (optional) |
See rrdFlotMatrix constructor for details. |
|
graph_options (optional) |
See rrdFlotMatrix constructor for details. |
|
ds_graph_options (optional) |
|
|
rrdflot_defaults (optional) |
|
|
ds_op_list (optional) |
If present, will wrap the data in RRDFilterOp |
|
rrd_op_list (optional) |
If present, will wrap the data in RRDRRAFilterAvg |
|
customization_callback (optional) |
If present, will be called after the data has been loaded and before the graph is drawn |
Once instantiated, the object will automatically draw the plot and handle user interaction.
|
This module is part of the javascriptRRD
package hosted at http://javascriptrrd.sourceforge.net.
|


Whole articles? Ain’t nobody got time for that! That’s why Y’all need Meme the News. Memes are salty. Think before you scroll.
This one actually makes me wonder-
I think I like Trump, but he’s not the hero republicans hope he is or the villain democrats think he is (he is busing pedos, so he is the threat that the pedos fear).
This page is synchronized from the post: ‘Meme the News 3/10/17’


Azure Monitoring
Context & Problem
Terminology
Used definition: A monitoring solution helps the monitoring consumer achieve the satisfactory level of control of a defined service. [1]
This definition already includes the following:
-
Defined service: The resources you want to monitor aka monitored resources.
-
Level of control: That is your bandwidth in which your defined service operates normally aka known as baseline
-
Measuring: A measurement is a single act that quantifies an attribute of a part, equipment, service or process (CPU load, available memory etc.). Data measured is emitted by the monitored resources and aka telemetry.
-
Monitoring consumer: The user trying to keep the service within its baseline boundaries. A single control plane is usually preferred to simplify the operations for the consumer aka monitoring plane. Depending on its perspective the area of cous might differ such as performance, costs, security etc. Independent from the underlying platform.
Actions might be triggered by the system or the consumer to achieve that. This might include:
-
Visualize current state
-
Detect Deviations from baseline
-
Root cause analysis
-
Forward externally
Monitoring should be implemented as feedback loop where lessons learnt are the starting point for further improvements on the defined service side. E.g. by adaptive scaling depending on monitored traffic.
-
The use case defines what is the defined service and the perspectives and control level to be achieved. It also defines external dependencies/ preconditions that have to be considered. Deployment of monitored resources might also be part of it. The platform provides the technical capabilities on which the sue case is implemented. The picture below illustrates this:
Standard Problems
A general solution for all potential problems is not possible due to the multitude of different requirements. The idea is therefore to address certain standard features which are as follows:
-
Visualizations
-
Measuring
-
Improving Feedback Loop
-
Optimization of alerts
-
Correlation of telemetry entries
-
Archiving Telemetry Data
Azure as Platform
The possibilities depend heavily on the perspective and the resources you want to monitor. A major tool to implement the monitoring plane is Azure Monitor with its features Application Insights and Log Analytics. The subsequent chapters focus on these major services. However, other services depending on your perspective might be relevant too. The following services relevant by category:
-
Performance: Azure Monitor (Network Monitor)
-
Availability: Azure Service Health, Azure Resource Health
-
Security: Azure Service Health, Azure Sentinel, Azure AD
-
Costs: Cost Management
The following conventions apply regarding the measurement for monitored resources:
-
Push to monitoring plane
In that case telemetry is forwarded to the monitoring plane. This can be necessary if the telemetry is not available in Azure monitor out of the box or pulling from the monitored resources is not possible. Examples of forwarding that requires explicit activation:
-
Diagnostic setting (differs per resource): requires a diagnostic setting to be activated.
-
App Insights Instrumentation/ Linking: Linked App Insights must be specified for the monitored resource
-
Manual forwarding: e.g. by scheduled process using API provided by Azure Monitor if the exporting options are not granular enough
This approach requires additional data sources on in the monitoring plane which might be inside Azure monitor (Log Analytics Workspace/ App Insights) or external.
-
-
Pull from monitored resource
In that case the telemetry data is read directly from the monitoring plane such as metrics. Logs cannot be read directly and require pushing. Compared to pushing this method is also faster.
Azure Monitor as monitoring plane covers the following major features:
-
Telemetry Analytics
Kusto is addressing that need and allows you to access external data sources such as blobs and internal data sources inside Azure Monitor. Graphical representation is also possible.
-
Visualization (Workbooks, Dashboards, other services)
-
Alerts
To react automatically if outside operational boundaries. Results from Kusto queries can be used as trigger.
-
Root Cause analysis (TODO)
-
Application Map ⇒ application dependencies in other services such as backend APIs or databases
-
Smart Detection ⇒ warn you when anomalies in performance or utilization patterns
-
Usage Analysis ⇒ features of your application are most frequently used
-
Release annotations ⇒ visual indicators in your Application Insights charts of new builds and other events. Possible to correlate changes in application performance to code releases.
-
Cross-component transaction diagnostics ⇒ shows you broken piece in the entire transaction
-
Snapshot Debugger ⇒ collect a snapshot of a live application in case of an exception, to analyze it at a later stage.
-
-
Integration
Azure Monitor has also extensive integration features. This includes:
-
Integrating telemetry from other Azure services (e.g. Azure Security Center also forwards to Azure Monitor)
-
Integrating external data sources (e.g. Blobs by using Kusto external operator)
-
Integrating third party tools such as Prometheus for Azure Kuberenetes
-
Exposing for data sources for external third party (e.g. Log Analytics Workspaces for Grafana)
-
Azure Monitor pricing comes with the following:
-
Ingestion: Applies for additional data pushed to Azure monitor
-
Storage: Data stored within Azure Monitor costs ⇒ Long term Archiving solution must be therefore found
-
Alerts: Are charged as well ⇒ strategy for minimizing them is required
Solution
Overview
The solution is to use Azure Monitor and its features. The subsequent detail variations that can be used for solving the problems outlined above.
Variations
Visualization
Visualization requires the following points:
-
Providing a canvas
Canvas refers to the area on which you place carious components. The following options exist:
Azure Third party Workbooks
Dashboards
Power BI
Grafana
Auto refresh in 5 Min Intervall
X
X
???
Full screen
X
???
???
Tabs
X
???
???
Fixed Parameter lists
X
???
X
Drill down
X
X
Additional hosting required
X
Terraform Support
X
X
X
Regarding components for logs/ metrics:
-
Metrics: Pull (Metrics explorer) or push (Kusto query targeting data source) possible
-
Logs: Push to monitoring plane only
-
Grafana can be used for visualization via using a connector for log analytics workspace
-
-
Data source
Can be inside Azure Monitor or external. External stores can avoid high Azure Monitor costs for ingestion/ storage.
NOTE Referencing an external data source requires authentication e.g. by using a shared access signature for a blob. Updating a saved query is only possible for log analytics.
Measuring
The table below shows possible options:
| Diagnostic Settings | App Insights | Push via resource API | Metrics Explorer | |
|---|---|---|---|---|
Possible per resource |
(X) |
(X) |
X |
(X) |
Telemetry Customization |
Limited |
High |
Limited-High |
Limited |
Custom Logging in executed code |
X |
|||
Telemetry always captured |
X |
(X) |
X |
X |
Latency |
Medium |
Medium |
Medium |
Low |
Direction |
Push |
Push |
Push |
Pull |
Comments:
-
Option “Push via resource API” ⇒ A scheduled script that reads periodically telemetry and pushes it to monitoring plane using the Rest API
-
„Telemetry always captured“ ⇒ Some resources allow multiple ways to run something e.g. via UI or programmatically. If the telemetry is always captured the way does not matter.
Archiving
A good archiving store is blob storage. Lifecycle policies can be used to drop the blob after a predefined amount of time.
When to use
This solution assumes that your control plane is in Azure and that your monitored resources are located in Azure.


The VR Files
Menu
Home
About
Articles
All
Healthcare
Training
Education
Branding
Portal
POST EDITOR
Save and return to portal [currently does not save!]
Discard and return to portal
Title:
Author:
Snippet:
Body:
Citation:
Tags:
Link:
PDF:
Likes:
0
Publish


Consider the following situation,
You are looking for a hospital for the treatment of someone elderly in your family. There are two prominent choices available, Hospital A and Hospital B. For the last 1000 patients those which got treated from Hospital A had a survival rate of 90% whereas those which got treated from Hospital B had survival rate of 80%. So, Hospital A seems to be a clear winner right? Well it may not be the case.
One shouldn’t ignore the fact that all the patients which arrive at the hospital do not have same health level. For example we can classify the patients having good health and bad health repectively. Let the number of survival rates of the patients considering the above classification scheme be as follows:
- Hospital A - 900 in good health out of which 830 survived, 100 in poor health out of which 30 survived
- Hospital B - 600 in good health out of which 590 survived, 400 in poor health out of which 210 survived
Interestingly, the survival rates of the patients having poor health is 52.5% in B and 30% in A. Amazingly, the survival rates of the patients having good health for Hospital A is 92.22 % whereas the same for Hospital B is 98.33%. Turns out that Hospital B is a clear winner and that too convincingly.
The above is an example of Simpson’s paradox which occurs when the aggregated data hides a conditional variable, which is hidden additional factor that significantly influences results.
Statistics are persuasive. So much so that people, organizations, and whole countries base some of their most important decisions on organized data. But any set of statistics might have something lurking inside it that can turn the results completely upside down.
Simpson’s paradox isn’t hypothetical. You can look at Mark Liddel’s video for more examples.
The above is one of the many things about statistics which I found very fascinating.


Hedwig had no trouble making her presence known whenever she was in the room. Whether it was soaring magnificently through the air or incessantly pecking Ron and Hermione until she got answers, our favourite snowy owl knew how to command respect and attention like the queen she was.
04.03.2018 17:15The Battle of Hogwarts showed us different sides of many characters that we’d known for years. Here are the ones that shone when their beloved home was under threat.
10.04.2018 09:35Whether it’s piling dozens of tiny knitted hats on his head at once, or painting Harry the world’s most hideous portrait
24.05.2018 21:10To celebrate the 20th anniversary of Harry Potter and the Prisoner of Azkaban in the UK, Bloomsbury are creating a huge mosaic of Harry casting his stag Patronus – created out of your happy memories.
25.12.2018 13:18When you can summon any book, instrument or animal with a wave of the wand and the word Accio!
04.01.2018 23:55Maybe it’s not surprising that the wizard who earned the epithet He Who Must Not Be Named had such a complicated relationship with his own title…
24.03.2019 17:20Harry Potter and Fantastic Beasts have both treated us to many shocking moments over the course of the storie
5.05.2019 11:14


The <DuxProgressDialog>
component displays a progress dialog for potentially long operations.
A progress bar and abort button are optional. Furthermore, the dialog can delay opening for operations that are
sometimes, but not always long such as web service calls.
| Property | Default Value | Description |
|---|---|---|
| min | 0 | The minimum value of the progress bar |
| max | 0 | The maximum value of the progress bar |
| value | 0 | The current value of the progress bar. It is rendered as a percentage between min and max. |
| allowAbort | false | If true, an abort button is rendered in the dialog. The onAbort property is required if true. |
| onAbort | (none) | This function is called if the user clicks the abort button. |
| showAfter | 0 | For operations which are not always long, but can potentially take a while (such as web service calls), the dialog can delay showing with this property. A timer is started when the show property transitions from false to true. Once the timer elapses, the dialog is displayed if show is still true. This property is the number of milliseconds to delay. If this property is 0, the dialog is displayed immediately when show becomes true. |
| abortButtonClassName | (none) | The CSS class(es) to apply to the abort <button> |
| progressComponent | (none) |
This is a React component to render the progress bar. If not present, no progress bar is rendered. For
web sites using Twitter Bootstrap 4, <ProgressBarBS4> is supplied. See below for an
example of use. The supplied component is passed the min, max, and
value properties.
|


Mars Weather Station
If you wanted warmer weather you should move to a planet with a full atmosphere.
Current Season:
Current Temp:


Updates
Keyboard Shortcuts
Bug Fixes
Text get cut off in Reminder
Known Issues:
Drag to reorder multiple selected reminders
Checklist not ticking the right checkbox when the list is long


Dear shenmiweiyi:
First of all, for you can in spite of being very busy toglance take time to read my profile, I said thank you sincerely.As you can see, my resume do very simple, because I know, you can read my profile of time is not too much, so, you have to make a long story short.
I am a graduating graduate, as well as all the graduates, in the face of graduation we are assigned to Garrett group to practice, practice have now ended.So we need to officially set foot on society in search of work.I have some planning organization and coordination ability.And honest, a strong sense of responsibility, optimistic and positive, can bear hardships and stand hard work, learning to understand and adaptability are good.These are my strengths.Just budding, need through the baptism of the society, withstand the test of life, need an opportunity to exercise more.
May 5th,2015


MessageFlow example 1
Click on any message to display its details.
Simple MessageFlow diagram
Copyright © 2013 Daniel McCabe


My wife is a fake prophetess, adulteress, divorce seeking man tells court
A Mapo Customary Court on Monday, in Ibadan, dissolved a marriage of 22 years; and advised married couples to fear God and uphold the sanctity of matrimony.
President of the court, Chief Ademola Odunade, gave the admonition while delivering his verdict in a case instituted by a commercial driver, Abiodun Ganiyu, for the dissolution of his marriage to Mojisola, whom he accused of infidelity and alcoholism.
In his judgment, Odunade lamented the high level of immorality in the society, calling on wives and husbands to fear God and respect relationships.
He dissolved the union and granted custody of the six children to Ganiyu.
The Arbitrator directed the petitioner to pay N5, 000 to Mojisola to enable her pack out of his home.
During the proceedings, the petitioner stated that he was fed up with his wife’s adulterous lifestyle, which had subjected him to ridicule in their neighbourhood.
The petitioner, who lives at Agege area in Lagos state, said that life had not been the same for the past 13 years since his wife started living “a wanton lifestyle’’.
“Firstly, Mojisola informed me that she had become born again and had been ordained a prophetess in her Church.
“My lord, Mojisola sometimes told me that she had been in a trance for 10 days and therefore could not come home; but she would return home mostly heavily drunk.
“When I could no longer bear the agony, I reported her to her parents to caution her, but it was all to no avail.
“When I saw that her waywardness was becoming something else, I advised her to buy her beer to drink at home; instead, Mojisola took offence by my advice and would leave home for three to five weeks.
“Though, we both agreed to do family planning for birth control, she however, she saw it as an opportunity to sleep about with other men.
READ ALSO: ‘My wife denies me sex, disrespects me,’ husband tells court
“Worst still, she introduced some of her lovers to me, I am frustrated, please, separate us,” Ganiyu pleaded with the court.
The respondent, who now lives at Apata area in Ibadan, did not deny any of the allegations leveled against her.
However, Mojisola, who earns a living as a food vendor, said that life would be meaningless to her if the court dissolved her union.
“I admit to all the allegations against me, but there is no where I can go at this stage, after six children.
“I take beer everyday because I do not want to kill myself; and I frequently leave home for a month or more.
“Also, I wooed a man to sleep with me so as to stimulate my sexual urge; and Abiodun himself knows the man, because I introduced them.

(NAN)


Quick
Learner
I am capable of understanding new information and new things at a rapid pace.
These are some skills that I have
I am capable of understanding new information and new things at a rapid pace.
I know basic about HTML,CSS and JavaScript.I am also familiar with PHP language.
I balance talking and listening, both individually and within my team.I am also very friendly.


|
|
|
|
|
|
|
|
|
|
|
| makeBranch(self,
plane,
trueTree,
falseTree) |
source code
|
|
|
|
|
|
bool
|
|
|
|
|
|
|
collapseProbabilistic(self)
Utility method that combines any consecutive probabilistic branches
at this node into a single distribution |
source code
|
|
|
|
|
|
KeyedTree
|
desymbolize(self,
table)
Returns:
a new tree with any symbolic references replaced with numeric values
according to the table of element lists |
source code
|
|
|
|
floor(self,
key,
lo)
Modify this tree to make sure the new computed value never goes lower
than the given floor |
source code
|
|
|
|
ceil(self,
key,
hi)
Modify this tree to make sure the new computed value never goes
higher than the given ceiling |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
KeyedTree
|
|
|
KeyedTree
|
compose(self,
other,
leafOp=None,
planeOp=None)
Compose two trees into a single tree |
source code
|
|
|
|
replace(self,
old,
new)
Returns:
a new tree with the given substitution applied to all leaf nodes |
source code
|
|
|
|
|
|
KeyedTree
|
map(self,
leafOp=None,
planeOp=None,
distOp=None)
Generates a new tree applying a function to all planes and leaves |
source code
|
|
|
|
|
|
|
|
|
|
minimizePlanes(self)
Modifies tree in place so that there are no constant factors in
branch weights |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
|


Ordinal Numbers |
Ordinal numbers tell the position of things or people in a series or list. Look at the picture. Listen to your teacher read each ordinal number word. Repeat after him or her.
| 1. | third | |
| 2. | sixth | |
| 3. | eighth | |
| 4. | second | |
| 5. | tenth | |
| 6. | first | |
| 7. | fourth | |
| 8. | ninth |
| 1. | |
| 2. | |
| 3. | |
| 4. | |
| 5. | |
| 6. |


Anonymization Wizard
Restart
Source
Manage
Load From Local
Load From Zenodo
Anonymized
Manage
Hierarchy
Manage
Load from Local
Auto Generate
Algorithms
Solution Graph
Results
Zenodo Wizard
Zenodo Load File
User Token
User Token
Zenodo Datasets
Zenodo Datasets
fileName
title
keywords
created
modified
filesize


Validator
public class Validator
Class that makes Validator
objects. Should be added as a parameter to ViewController that will display
validation fields.
-
Dictionary to hold all fields (and accompanying rules) that will undergo validation.
Declaration
Swift
public var validations = [UITextField:ValidationRule]()
-
Dictionary to hold fields (and accompanying errors) that were unsuccessfully validated.
Declaration
Swift
public var errors = [UITextField:ValidationError]()
-
Declaration
Swift
public init(){}
Return Value
An initialized object, or nil if an object could not be created for some reason that would not result in an exception.
-
This method is used to validate a single field registered to Validator. If validation is unsuccessful, field gets added to errors dictionary.
Declaration
Swift
public func validateField(textField: UITextField, callback: (error:ValidationError?) -> Void)
Parameters
textField
Holds validator field data.
Return Value
No return value.
-
This method is used to style fields that have undergone validation checks. Success callback should be used to show common success styling and error callback should be used to show common error styling.
Declaration
Swift
public func styleTransformers(success success:((validationRule:ValidationRule)->Void)?, error:((validationError:ValidationError)->Void)?)
Parameters
success
A closure which is called with validationRule, an object that holds validation data
error
A closure which is called with validationError, an object that holds validation error data
Return Value
No return value
-
This method is used to add a field to validator.
Declaration
Swift
public func registerField(textField:UITextField, rules:[Rule])
Parameters
textField
field that is to be validated.
Rule
An array which holds different rules to validate against textField.
Return Value
No return value
-
This method is used to add a field to validator.
Declaration
Swift
public func registerField(textField:UITextField, errorLabel:UILabel, rules:[Rule])
Parameters
textfield
field that is to be validated.
errorLabel
A UILabel that holds error label data
rules
A Rule array that holds different rules that apply to said textField.
Return Value
No return value
-
This method is for removing a field validator.
Declaration
Swift
public func unregisterField(textField:UITextField)
Parameters
textField
field used to locate and remove textField from validator.
Return Value
No return value
-
This method checks to see if all fields in validator are valid.
Declaration
Swift
public func validate(delegate:ValidationDelegate)
Return Value
No return value.
-
This method validates all fields in validator and sets any errors to errors parameter of callback.
Declaration
Swift
public func validate(callback:(errors:[UITextField:ValidationError])->Void) -> Void
Parameters
callback
A closure which is called with errors, a dictionary of type UITextField:ValidationError.
Return Value
No return value.


We finalize our discussion on Support Vector Machines with an emphasis on kernel transformations and applications to regression. The following video attempts at giving an overview on this part. See also the follow-up video.
Friday's lecture is split in two parts. It starts with a summary of what we have done this semester and continues with perspectives for future studies and modern research projects in machine learning.
As discussed last week, a Support Vector Machine (SVM) is a very powerful and versatile Machine Learning method, capable of performing linear or nonlinear classification, regression, and even outlier detection. It is one of the most popular models in Machine Learning, and anyone interested in Machine Learning should have it in their toolbox. SVMs are particularly well suited for classification of complex but small-sized or medium-sized datasets.
The case with two well-separated classes only can be understood in an intuitive way in terms of lines in a two-dimensional space separating the two classes.
The basic mathematics behind the SVM is however less familiar to most of us. It relies on the definition of hyperplanes and the definition of a margin which separates classes (in case of classification problems) of variables. It is also used for regression problems. I recommend you take a look at the lectures from last week on the binary classification problem.
The cases we studied last week were all characterized by two classes with a close to linear separability. The classifiers we have described so far find linear boundaries in our input feature space. It is possible to make our procedure more flexible by exploring the feature space using other basis expansions such as higher-order polynomials, wavelets, splines etc.
If our feature space is not easy to separate, as shown in the figure generated by the code below, we can achieve a better separation by introducing a more complex basis functions. The ideal would be, as shown by the code example below, to, via a specific transformation to obtain a separation between the classes that is almost linear. See also Figures 12.2 and 12.3 of Hastie et al..
We can achieve a better separation by introducing more complex basis functions. The ideal would be (see Figures 12.2 and 12.3) to, via a specific transformation to obtain a separation between the classes which is almost linear.
The change of basis, from \( x\rightarrow z=\phi(x) \) leads to the same type of equations to be solved, except that we need to introduce, for example, a polynomial transformation to a two-dimensional training set.
import numpy as np
import os
np.random.seed(42)
# To plot pretty figures
import matplotlib
import matplotlib.pyplot as plt
plt.rcParams['axes.labelsize'] = 14
plt.rcParams['xtick.labelsize'] = 12
plt.rcParams['ytick.labelsize'] = 12
from sklearn.svm import SVC
from sklearn import datasets
X1D = np.linspace(-4, 4, 9).reshape(-1, 1)
X2D = np.c_[X1D, X1D**2]
y = np.array([0, 0, 1, 1, 1, 1, 1, 0, 0])
plt.figure(figsize=(11, 4))
plt.subplot(121)
plt.grid(True, which='both')
plt.axhline(y=0, color='k')
plt.plot(X1D[:, 0][y==0], np.zeros(4), "bs")
plt.plot(X1D[:, 0][y==1], np.zeros(5), "g^")
plt.gca().get_yaxis().set_ticks([])
plt.xlabel(r"$x_1$", fontsize=20)
plt.axis([-4.5, 4.5, -0.2, 0.2])
plt.subplot(122)
plt.grid(True, which='both')
plt.axhline(y=0, color='k')
plt.axvline(x=0, color='k')
plt.plot(X2D[:, 0][y==0], X2D[:, 1][y==0], "bs")
plt.plot(X2D[:, 0][y==1], X2D[:, 1][y==1], "g^")
plt.xlabel(r"$x_1$", fontsize=20)
plt.ylabel(r"$x_2$", fontsize=20, rotation=0)
plt.gca().get_yaxis().set_ticks([0, 4, 8, 12, 16])
plt.plot([-4.5, 4.5], [6.5, 6.5], "r--", linewidth=3)
plt.axis([-4.5, 4.5, -1, 17])
plt.subplots_adjust(right=1)
plt.show()
Suppose we define a polynomial transformation of degree two only. We define a vector \( \boldsymbol{x}_i=[x_i,y_i] \) and have $$ \boldsymbol{z}_i^T = \phi(\boldsymbol{x}_i)^T =\left[1, \sqrt{2}x_i, \sqrt{2}y_i, x_i^2, y_i^2, \sqrt{2}x_iy_i\right]. $$
With our new basis, the equations we solved earlier are basically the same, that is we have now (without the slack option for simplicity) $$ {\cal L}=\sum_i\lambda_i-\frac{1}{2}\sum_{ij}^n\lambda_i\lambda_jy_iy_j\boldsymbol{z}_i^T\boldsymbol{z}_j, $$ subject to the constraints \( \lambda_i\geq 0 \), \( \sum_i\lambda_iy_i=0 \), and for the support vectors $$ y_i(\boldsymbol{z}_i^T\boldsymbol{w}+b)= 1 \hspace{0.1cm}\forall i, $$ from which we also find \( b \). To compute \( \boldsymbol{z}_i^T\boldsymbol{z}_j \) we define the kernel \( K(\boldsymbol{x}_i,\boldsymbol{x}_j) \) as $$ K(\boldsymbol{x}_i,\boldsymbol{x}_j)=\boldsymbol{z}_i^T\boldsymbol{z}_j= \phi(\boldsymbol{x}_i)^T\phi(\boldsymbol{x}_j). $$ For the above example, the kernel reads $$ K(\boldsymbol{x}_i,\boldsymbol{x}_j)=[1, \sqrt{2}x_i, \sqrt{2}y_i, x_i^2, y_i^2, \sqrt{2}x_iy_i]\begin{bmatrix} 1\\ \sqrt{2}x_j \\ \sqrt{2}y_j \\ x_j^2\\ y_i^2\\ \sqrt{2}x_jy_j \end{bmatrix}=1+2x_ix_j+2y_iy_j+(x_ix_j)^2+(y_iy_j)^2+2x_ix_jy_iy_j. $$
We note that this dot product can be rewritten as $$ K(\boldsymbol{x}_i,\boldsymbol{x}_j)=[1+\boldsymbol{x}_i^T\boldsymbol{x}_j]^d, $$ where \( d=2 \) in our case and \( \boldsymbol{x}_i=[x_i,y_i] \) and \( \boldsymbol{x}_j=[x_j,y_j] \). To compute the last equation is however inefficient from a computational stand. Instead of computing the last equation for the kernel, we simply compute the dot product \( (\boldsymbol{x}_i^T\boldsymbol{x}_j)^2 \). This leads to the so-called kernel trick.
Using our definition of the kernel, we can rewrite again the Lagrangian $$ {\cal L}=\sum_i\lambda_i-\frac{1}{2}\sum_{ij}^n\lambda_i\lambda_jy_iy_j\boldsymbol{z}_i^T\boldsymbol{z}_j, $$ subject to the constraints \( \lambda_i\geq 0 \), \( \sum_i\lambda_iy_i=0 \) in terms of a convex optimization problem $$ \frac{1}{2} \boldsymbol{\lambda}^T\begin{bmatrix} y_1y_1K(\boldsymbol{x}_1,\boldsymbol{x}_1) & y_1y_2K(\boldsymbol{x}_1,\boldsymbol{x}_2) & \dots & \dots & y_1y_nK(\boldsymbol{x}_1,\boldsymbol{x}_n) \\ y_2y_1K(\boldsymbol{x}_2,\boldsymbol{x}_1) & y_2y_2(\boldsymbol{x}_2,\boldsymbol{x}_2) & \dots & \dots & y_1y_nK(\boldsymbol{x}_2,\boldsymbol{x}_n) \\ \dots & \dots & \dots & \dots & \dots \\ \dots & \dots & \dots & \dots & \dots \\ y_ny_1K(\boldsymbol{x}_n,\boldsymbol{x}_1) & y_ny_2K(\boldsymbol{x}_n\boldsymbol{x}_2) & \dots & \dots & y_ny_nK(\boldsymbol{x}_n,\boldsymbol{x}_n) \\ \end{bmatrix}\boldsymbol{\lambda}-\mathbb{1}\boldsymbol{\lambda}, $$ subject to \( \boldsymbol{y}^T\boldsymbol{\lambda}=0 \). Here we defined the vectors \( \boldsymbol{\lambda} =[\lambda_1,\lambda_2,\dots,\lambda_n] \) and \( \boldsymbol{y}=[y_1,y_2,\dots,y_n] \). If we add the slack constants this leads to the additional constraint \( 0\leq \lambda_i \leq C \).
We can rewrite this (see the solutions below) in terms of a convex optimization problem of the type $$ \begin{align*} &\mathrm{min}_{\lambda}\hspace{0.2cm} \frac{1}{2}\boldsymbol{\lambda}^T\boldsymbol{P}\boldsymbol{\lambda}+\boldsymbol{q}^T\boldsymbol{\lambda},\\ \nonumber &\mathrm{s.t} \hspace{0.2cm} \boldsymbol{G}\boldsymbol{\lambda} \preceq \boldsymbol{h} \hspace{0.2cm} \wedge \boldsymbol{A}\boldsymbol{\lambda}=f. \end{align*} $$ Below we discuss how to solve these equations. Here we note that the matrix \( \boldsymbol{P} \) has matrix elements \( p_{ij}=y_iy_jK(\boldsymbol{x}_i,\boldsymbol{x}_j) \). Given a kernel \( K \) and the targets \( y_i \) this matrix is easy to set up. The constraint \( \boldsymbol{y}^T\boldsymbol{\lambda}=0 \) leads to \( f=0 \) and \( \boldsymbol{A}=\boldsymbol{y} \). How to set up the matrix \( \boldsymbol{G} \) is discussed later. Here note that the inequalities \( 0\leq \lambda_i \leq C \) can be split up into \( 0\leq \lambda_i \) and \( \lambda_i \leq C \). These two inequalities define then the matrix \( \boldsymbol{G} \) and the vector \( \boldsymbol{h} \).
There are several popular kernels being used. These are
An important theorem for us is Mercer's theorem. The theorem states that if a kernel function \( K \) is symmetric, continuous and leads to a positive semi-definite matrix \( \boldsymbol{P} \) then there exists a function \( \phi \) that maps \( \boldsymbol{x}_i \) and \( \boldsymbol{x}_j \) into another space (possibly with much higher dimensions) such that $$ K(\boldsymbol{x}_i,\boldsymbol{x}_j)=\phi(\boldsymbol{x}_i)^T\phi(\boldsymbol{x}_j). $$
So you can use \( K \) as a kernel since you know \( \phi \) exists, even if you don’t know what \( \phi \) is.
Note that some frequently used kernels (such as the Sigmoid kernel) don’t respect all of Mercer’s conditions, yet they generally work well in practice.
from __future__ import division, print_function, unicode_literals
import numpy as np
np.random.seed(42)
import matplotlib
import matplotlib.pyplot as plt
plt.rcParams['axes.labelsize'] = 14
plt.rcParams['xtick.labelsize'] = 12
plt.rcParams['ytick.labelsize'] = 12
from sklearn.svm import SVC
from sklearn import datasets
from sklearn.pipeline import Pipeline
from sklearn.preprocessing import StandardScaler
from sklearn.svm import LinearSVC
from sklearn.datasets import make_moons
X, y = make_moons(n_samples=100, noise=0.15, random_state=42)
def plot_dataset(X, y, axes):
plt.plot(X[:, 0][y==0], X[:, 1][y==0], "bs")
plt.plot(X[:, 0][y==1], X[:, 1][y==1], "g^")
plt.axis(axes)
plt.grid(True, which='both')
plt.xlabel(r"$x_1$", fontsize=20)
plt.ylabel(r"$x_2$", fontsize=20, rotation=0)
plot_dataset(X, y, [-1.5, 2.5, -1, 1.5])
plt.show()
from sklearn.datasets import make_moons
from sklearn.pipeline import Pipeline
from sklearn.preprocessing import PolynomialFeatures
polynomial_svm_clf = Pipeline([
("poly_features", PolynomialFeatures(degree=3)),
("scaler", StandardScaler()),
("svm_clf", LinearSVC(C=10, loss="hinge", random_state=42))
])
polynomial_svm_clf.fit(X, y)
def plot_predictions(clf, axes):
x0s = np.linspace(axes[0], axes[1], 100)
x1s = np.linspace(axes[2], axes[3], 100)
x0, x1 = np.meshgrid(x0s, x1s)
X = np.c_[x0.ravel(), x1.ravel()]
y_pred = clf.predict(X).reshape(x0.shape)
y_decision = clf.decision_function(X).reshape(x0.shape)
plt.contourf(x0, x1, y_pred, cmap=plt.cm.brg, alpha=0.2)
plt.contourf(x0, x1, y_decision, cmap=plt.cm.brg, alpha=0.1)
plot_predictions(polynomial_svm_clf, [-1.5, 2.5, -1, 1.5])
plot_dataset(X, y, [-1.5, 2.5, -1, 1.5])
plt.show()
from sklearn.svm import SVC
poly_kernel_svm_clf = Pipeline([
("scaler", StandardScaler()),
("svm_clf", SVC(kernel="poly", degree=3, coef0=1, C=5))
])
poly_kernel_svm_clf.fit(X, y)
poly100_kernel_svm_clf = Pipeline([
("scaler", StandardScaler()),
("svm_clf", SVC(kernel="poly", degree=10, coef0=100, C=5))
])
poly100_kernel_svm_clf.fit(X, y)
plt.figure(figsize=(11, 4))
plt.subplot(121)
plot_predictions(poly_kernel_svm_clf, [-1.5, 2.5, -1, 1.5])
plot_dataset(X, y, [-1.5, 2.5, -1, 1.5])
plt.title(r"$d=3, r=1, C=5$", fontsize=18)
plt.subplot(122)
plot_predictions(poly100_kernel_svm_clf, [-1.5, 2.5, -1, 1.5])
plot_dataset(X, y, [-1.5, 2.5, -1, 1.5])
plt.title(r"$d=10, r=100, C=5$", fontsize=18)
plt.show()
def gaussian_rbf(x, landmark, gamma):
return np.exp(-gamma * np.linalg.norm(x - landmark, axis=1)**2)
gamma = 0.3
x1s = np.linspace(-4.5, 4.5, 200).reshape(-1, 1)
x2s = gaussian_rbf(x1s, -2, gamma)
x3s = gaussian_rbf(x1s, 1, gamma)
XK = np.c_[gaussian_rbf(X1D, -2, gamma), gaussian_rbf(X1D, 1, gamma)]
yk = np.array([0, 0, 1, 1, 1, 1, 1, 0, 0])
plt.figure(figsize=(11, 4))
plt.subplot(121)
plt.grid(True, which='both')
plt.axhline(y=0, color='k')
plt.scatter(x=[-2, 1], y=[0, 0], s=150, alpha=0.5, c="red")
plt.plot(X1D[:, 0][yk==0], np.zeros(4), "bs")
plt.plot(X1D[:, 0][yk==1], np.zeros(5), "g^")
plt.plot(x1s, x2s, "g--")
plt.plot(x1s, x3s, "b:")
plt.gca().get_yaxis().set_ticks([0, 0.25, 0.5, 0.75, 1])
plt.xlabel(r"$x_1$", fontsize=20)
plt.ylabel(r"Similarity", fontsize=14)
plt.annotate(r'$\mathbf{x}$',
xy=(X1D[3, 0], 0),
xytext=(-0.5, 0.20),
ha="center",
arrowprops=dict(facecolor='black', shrink=0.1),
fontsize=18,
)
plt.text(-2, 0.9, "$x_2$", ha="center", fontsize=20)
plt.text(1, 0.9, "$x_3$", ha="center", fontsize=20)
plt.axis([-4.5, 4.5, -0.1, 1.1])
plt.subplot(122)
plt.grid(True, which='both')
plt.axhline(y=0, color='k')
plt.axvline(x=0, color='k')
plt.plot(XK[:, 0][yk==0], XK[:, 1][yk==0], "bs")
plt.plot(XK[:, 0][yk==1], XK[:, 1][yk==1], "g^")
plt.xlabel(r"$x_2$", fontsize=20)
plt.ylabel(r"$x_3$ ", fontsize=20, rotation=0)
plt.annotate(r'$\phi\left(\mathbf{x}\right)$',
xy=(XK[3, 0], XK[3, 1]),
xytext=(0.65, 0.50),
ha="center",
arrowprops=dict(facecolor='black', shrink=0.1),
fontsize=18,
)
plt.plot([-0.1, 1.1], [0.57, -0.1], "r--", linewidth=3)
plt.axis([-0.1, 1.1, -0.1, 1.1])
plt.subplots_adjust(right=1)
plt.show()
x1_example = X1D[3, 0]
for landmark in (-2, 1):
k = gaussian_rbf(np.array([[x1_example]]), np.array([[landmark]]), gamma)
print("Phi({}, {}) = {}".format(x1_example, landmark, k))
rbf_kernel_svm_clf = Pipeline([
("scaler", StandardScaler()),
("svm_clf", SVC(kernel="rbf", gamma=5, C=0.001))
])
rbf_kernel_svm_clf.fit(X, y)
from sklearn.svm import SVC
gamma1, gamma2 = 0.1, 5
C1, C2 = 0.001, 1000
hyperparams = (gamma1, C1), (gamma1, C2), (gamma2, C1), (gamma2, C2)
svm_clfs = []
for gamma, C in hyperparams:
rbf_kernel_svm_clf = Pipeline([
("scaler", StandardScaler()),
("svm_clf", SVC(kernel="rbf", gamma=gamma, C=C))
])
rbf_kernel_svm_clf.fit(X, y)
svm_clfs.append(rbf_kernel_svm_clf)
plt.figure(figsize=(11, 7))
for i, svm_clf in enumerate(svm_clfs):
plt.subplot(221 + i)
plot_predictions(svm_clf, [-1.5, 2.5, -1, 1.5])
plot_dataset(X, y, [-1.5, 2.5, -1, 1.5])
gamma, C = hyperparams[i]
plt.title(r"$\gamma = {}, C = {}$".format(gamma, C), fontsize=16)
plt.show()
A mathematical (quadratic) optimization problem, or just optimization problem, has the form $$ \begin{align*} &\mathrm{min}_{\lambda}\hspace{0.2cm} \frac{1}{2}\boldsymbol{\lambda}^T\boldsymbol{P}\boldsymbol{\lambda}+\boldsymbol{q}^T\boldsymbol{\lambda},\\ \nonumber &\mathrm{subject\hspace{0.1cm}to} \hspace{0.2cm} \boldsymbol{G}\boldsymbol{\lambda} \preceq \boldsymbol{h} \wedge \boldsymbol{A}\boldsymbol{\lambda}=f. \end{align*} $$ subject to some constraints for say a selected set \( i=1,2,\dots, n \). In our case we are optimizing with respect to the Lagrangian multipliers \( \lambda_i \), and the vector \( \boldsymbol{\lambda}=[\lambda_1, \lambda_2,\dots, \lambda_n] \) is the optimization variable we are dealing with.
In our case we are particularly interested in a class of optimization problems called convex optmization problems. In our discussion on gradient descent methods we discussed at length the definition of a convex function.
Convex optimization problems play a central role in applied mathematics and we recommend strongly Boyd and Vandenberghe's text on the topics.
If we use Python as programming language and wish to venture beyond scikit-learn, tensorflow and similar software which makes our lives so much easier, we need to dive into the wonderful world of quadratic programming. We can, if we wish, solve the minimization problem using standard gradient methods or conjugate gradient methods. However, these methods tend to exhibit a rather slow converge. So, welcome to the promised land of quadratic programming.
The functions we need are contained in the quadratic programming package CVXOPT and we need to import it together with numpy as
import numpy
import cvxopt
This will make our life much easier. You don't need to write your own optimizer.
We remind ourselves about the general problem we want to solve $$ \begin{align*} &\mathrm{min}_{x}\hspace{0.2cm} \frac{1}{2}\boldsymbol{x}^T\boldsymbol{P}\boldsymbol{x}+\boldsymbol{q}^T\boldsymbol{x},\\ \nonumber &\mathrm{s.t.} \hspace{0.2cm} \boldsymbol{G}\boldsymbol{x} \preceq \boldsymbol{h} \wedge \boldsymbol{A}\boldsymbol{x}=f. \end{align*} $$ Note: we use s.t. for subject to.
Let us show how to perform the optmization using a simple case. Assume we want to optimize the following problem $$ \begin{align*} &\mathrm{min}_{x}\hspace{0.2cm} \frac{1}{2}x^2+5x+3y \\ \nonumber &\mathrm{s.t.} \\ \nonumber &x, y \geq 0 \\ \nonumber &x+3y \geq 15 \\ \nonumber &2x+5y \leq 100 \\ \nonumber &3x+4y \leq 80. \\ \nonumber \end{align*} $$ The minimization problem can be rewritten in terms of vectors and matrices as (with \( x \) and \( y \) being the unknowns) $$ \frac{1}{2}\begin{bmatrix} x\\ y \end{bmatrix}^T \begin{bmatrix} 1 & 0\\ 0 & 0 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} + \begin{bmatrix}5\\ 3 \end{bmatrix}^T \begin{bmatrix}x \\ y \end{bmatrix}. $$ Similarly, we can now set up the inequalities (we need to change \( \geq \) to \( \leq \) by multiplying with \( -1 \) on bot sides) as the following matrix-vector equation $$ \begin{bmatrix} -1 & 0 \\ 0 & -1 \\ -1 & -3 \\ 2 & 5 \\ 3 & 4\end{bmatrix}\begin{bmatrix} x \\ y\end{bmatrix} \preceq \begin{bmatrix}0 \\ 0\\ -15 \\ 100 \\ 80\end{bmatrix}. $$ We have collapsed all the inequalities into a single matrix \( \boldsymbol{G} \). We see also that our matrix $$ \boldsymbol{P} =\begin{bmatrix} 1 & 0\\ 0 & 0 \end{bmatrix} $$ is clearly positive semi-definite (all eigenvalues larger or equal zero). Finally, the vector \( \boldsymbol{h} \) is defined as $$ \boldsymbol{h} = \begin{bmatrix}0 \\ 0\\ -15 \\ 100 \\ 80\end{bmatrix}. $$
Since we don't have any equalities the matrix \( \boldsymbol{A} \) is set to zero The following code solves the equations for us
# Import the necessary packages
import numpy
from cvxopt import matrix
from cvxopt import solvers
P = matrix(numpy.diag([1,0]), tc='d')
q = matrix(numpy.array([3,4]), tc='d')
G = matrix(numpy.array([[-1,0],[0,-1],[-1,-3],[2,5],[3,4]]), tc='d')
h = matrix(numpy.array([0,0,-15,100,80]), tc='d')
# Construct the QP, invoke solver
sol = solvers.qp(P,q,G,h)
# Extract optimal value and solution
sol['x']
sol['primal objective']
We are now ready to return to our setup of the optmization problem for a more realistic case. Introducing the slack parameter \( C \) we have $$ \frac{1}{2} \boldsymbol{\lambda}^T\begin{bmatrix} y_1y_1K(\boldsymbol{x}_1,\boldsymbol{x}_1) & y_1y_2K(\boldsymbol{x}_1,\boldsymbol{x}_2) & \dots & \dots & y_1y_nK(\boldsymbol{x}_1,\boldsymbol{x}_n) \\ y_2y_1K(\boldsymbol{x}_2,\boldsymbol{x}_1) & y_2y_2K(\boldsymbol{x}_2,\boldsymbol{x}_2) & \dots & \dots & y_1y_nK(\boldsymbol{x}_2,\boldsymbol{x}_n) \\ \dots & \dots & \dots & \dots & \dots \\ \dots & \dots & \dots & \dots & \dots \\ y_ny_1K(\boldsymbol{x}_n,\boldsymbol{x}_1) & y_ny_2K(\boldsymbol{x}_n\boldsymbol{x}_2) & \dots & \dots & y_ny_nK(\boldsymbol{x}_n,\boldsymbol{x}_n) \\ \end{bmatrix}\boldsymbol{\lambda}-\mathbb{I}\boldsymbol{\lambda}, $$ subject to \( \boldsymbol{y}^T\boldsymbol{\lambda}=0 \). Here we defined the vectors \( \boldsymbol{\lambda} =[\lambda_1,\lambda_2,\dots,\lambda_n] \) and \( \boldsymbol{y}=[y_1,y_2,\dots,y_n] \). With the slack constants this leads to the additional constraint \( 0\leq \lambda_i \leq C \).
We have the general problem $$ \begin{align*} &\mathrm{min}_{\lambda}\hspace{0.2cm} \frac{1}{2}\boldsymbol{\lambda}^T\boldsymbol{P}\boldsymbol{\lambda}+\boldsymbol{q}^T\boldsymbol{\lambda},\\ \nonumber &\mathrm{s.t.} \hspace{0.2cm} \boldsymbol{G}\boldsymbol{\lambda} \preceq \boldsymbol{h} \wedge \boldsymbol{A}\boldsymbol{\lambda}=f. \end{align*} $$
We have two constraints, \( 0\le \lambda_i \) and \( \lambda_i \le C \). To do this we multiply the ones with the constraint \( \ge \) with \( -1 \) in order to get \( \le \). It means that the problem \( \boldsymbol{G}\boldsymbol{\lambda} \preceq \boldsymbol{h} \) can be written as $$ \begin{bmatrix} -1& 0 & 0 & \dots & 0 \\ 0& -1 & 0 & \dots & 0 \\ 0& 0 & -1 & \dots & 0 \\ \dots& \dots & \dots & \dots & \dots \\ 0& 0 & 0 & \dots & -1 \\ 1 & 0 & 0 & \dots & 0 \\ 0& 1 & 0 & \dots & 0 \\ 0& 0 & 1 & \dots & 0 \\ \dots& \dots & \dots & \dots & \dots \\ 0& 0 & 0 & \dots & 1 \\ \end{bmatrix} \begin{bmatrix} \lambda_1 \\ \lambda_2 \\ \lambda_3 \\ \dots \\ \lambda_n \\ \end{bmatrix} \preceq \begin{bmatrix} 0 \\ 0 \\ 0 \\ \dots \\ 0 \\ C \\ C \\ C \\ \dots \\ C \\ \end{bmatrix}. $$
And then we are ready to go.
More text will be added here. See also Hastie et al. section 12.3.
The course has two central parts
The following topics have been discussed:
The following topics will be covered
The course introduces a variety of central algorithms and methods essential for studies of data analysis and machine learning. The course is project based and through the various projects, normally three, you will be exposed to fundamental research problems in these fields, with the aim to reproduce state of the art scientific results. The students will learn to develop and structure large codes for studying these systems, get acquainted with computing facilities and learn to handle large scientific projects. A good scientific and ethical conduct is emphasized throughout the course.
Where to find recent results:
When do we resample?
The link here https://www.mn.uio.no/english/research/about/centre-focus/innovation/data-science/studies/ gives an excellent overview of courses on Machine learning at UiO.
Based on multi-layer nonlinear neural networks, deep learning can learn directly from raw data, automatically extract and abstract features from layer to layer, and then achieve the goal of regression, classification, or ranking. Deep learning has made breakthroughs in computer vision, speech processing and natural language, and reached or even surpassed human level. The success of deep learning is mainly due to the three factors: big data, big model, and big computing.
In the past few decades, many different architectures of deep neural networks have been proposed, such as
The approaches to machine learning are many, but are often split into two main categories. In supervised learning we know the answer to a problem, and let the computer deduce the logic behind it. On the other hand, unsupervised learning is a method for finding patterns and relationship in data sets without any prior knowledge of the system. Some authours also operate with a third category, namely reinforcement learning. This is a paradigm of learning inspired by behavioural psychology, where learning is achieved by trial-and-error, solely from rewards and punishment.
Another way to categorize machine learning tasks is to consider the desired output of a system. Some of the most common tasks are:
What is known as restricted Boltzmann Machines (RMB) have received a lot of attention lately. One of the major reasons is that they can be stacked layer-wise to build deep neural networks that capture complicated statistics.
The original RBMs had just one visible layer and a hidden layer, but recently so-called Gaussian-binary RBMs have gained quite some popularity in imaging since they are capable of modeling continuous data that are common to natural images.
Furthermore, they have been used to solve complicated quantum mechanical many-particle problems or classical statistical physics problems like the Ising and Potts classes of models.
Why use a generative model rather than the more well known discriminative deep neural networks (DNN)?
A BM is what we would call an undirected probabilistic graphical model with stochastic continuous or discrete units.
It is interpreted as a stochastic recurrent neural network where the state of each unit(neurons/nodes) depends on the units it is connected to. The weights in the network represent thus the strength of the interaction between various units/nodes.
It turns into a Hopfield network if we choose deterministic rather than stochastic units. In contrast to a Hopfield network, a BM is a so-called generative model. It allows us to generate new samples from the learned distribution.
A standard BM network is divided into a set of observable and visible units \( \hat{x} \) and a set of unknown hidden units/nodes \( \hat{h} \).
Additionally there can be bias nodes for the hidden and visible layers. These biases are normally set to \( 1 \).
BMs are stackable, meaning they cwe can train a BM which serves as input to another BM. We can construct deep networks for learning complex PDFs. The layers can be trained one after another, a feature which makes them popular in deep learning
However, they are often hard to train. This leads to the introduction of so-called restricted BMs, or RBMS. Here we take away all lateral connections between nodes in the visible layer as well as connections between nodes in the hidden layer. The network is illustrated in the figure below.
The network layers:
The goal of the hidden layer is to increase the model's expressive power. We encode complex interactions between visible variables by introducing additional, hidden variables that interact with visible degrees of freedom in a simple manner, yet still reproduce the complex correlations between visible degrees in the data once marginalized over (integrated out).
The network parameters, to be optimized/learned:
The restricted Boltzmann machine is described by a Boltzmann distribution $$ \begin{align} P_{rbm}(\mathbf{x},\mathbf{h}) = \frac{1}{Z} e^{-\frac{1}{T_0}E(\mathbf{x},\mathbf{h})}, \label{_auto1} \end{align} $$ where \( Z \) is the normalization constant or partition function, defined as $$ \begin{align} Z = \int \int e^{-\frac{1}{T_0}E(\mathbf{x},\mathbf{h})} d\mathbf{x} d\mathbf{h}. \label{_auto2} \end{align} $$ It is common to ignore \( T_0 \) by setting it to one.
The function \( E(\mathbf{x},\mathbf{h}) \) gives the energy of a configuration (pair of vectors) \( (\mathbf{x}, \mathbf{h}) \). The lower the energy of a configuration, the higher the probability of it. This function also depends on the parameters \( \mathbf{a} \), \( \mathbf{b} \) and \( W \). Thus, when we adjust them during the learning procedure, we are adjusting the energy function to best fit our problem.
An expression for the energy function is $$ E(\hat{x},\hat{h}) = -\sum_{ia}^{NA}b_i^a \alpha_i^a(x_i)-\sum_{jd}^{MD}c_j^d \beta_j^d(h_j)-\sum_{ijad}^{NAMD}b_i^a \alpha_i^a(x_i)c_j^d \beta_j^d(h_j)w_{ij}^{ad}. $$
Here \( \beta_j^d(h_j) \) and \( \alpha_i^a(x_j) \) are so-called transfer functions that map a given input value to a desired feature value. The labels \( a \) and \( d \) denote that there can be multiple transfer functions per variable. The first sum depends only on the visible units. The second on the hidden ones. Note that there is no connection between nodes in a layer.
The quantities \( b \) and \( c \) can be interpreted as the visible and hidden biases, respectively.
The connection between the nodes in the two layers is given by the weights \( w_{ij} \).
RBMs were first developed using binary units in both the visible and hidden layer. The corresponding energy function is defined as follows: $$ \begin{align} E(\mathbf{x}, \mathbf{h}) = - \sum_i^M x_i a_i- \sum_j^N b_j h_j - \sum_{i,j}^{M,N} x_i w_{ij} h_j, \label{_auto3} \end{align} $$ where the binary values taken on by the nodes are most commonly 0 and 1.
Another varient is the RBM where the visible units are Gaussian while the hidden units remain binary: $$ \begin{align} E(\mathbf{x}, \mathbf{h}) = \sum_i^M \frac{(x_i - a_i)^2}{2\sigma_i^2} - \sum_j^N b_j h_j - \sum_{i,j}^{M,N} \frac{x_i w_{ij} h_j}{\sigma_i^2}. \label{_auto4} \end{align} $$
Autoencoders are artificial neural networks capable of learning efficient representations of the input data (these representations are called codings) without any supervision (i.e., the training set is unlabeled). These codings typically have a much lower dimensionality than the input data, making autoencoders useful for dimensionality reduction.
More importantly, autoencoders act as powerful feature detectors, and they can be used for unsupervised pretraining of deep neural networks.
Lastly, they are capable of randomly generating new data that looks very similar to the training data; this is called a generative model. For example, you could train an autoencoder on pictures of faces, and it would then be able to generate new faces. Surprisingly, autoencoders work by simply learning to copy their inputs to their outputs. This may sound like a trivial task, but we will see that constraining the network in various ways can make it rather difficult. For example, you can limit the size of the internal representation, or you can add noise to the inputs and train the network to recover the original inputs. These constraints prevent the autoencoder from trivially copying the inputs directly to the outputs, which forces it to learn efficient ways of representing the data. In short, the codings are byproducts of the autoencoder’s attempt to learn the identity function under some constraints.
See also A. Geron's textbook, chapter 15.
This is an important topic if we aim at extracting a probability distribution. This gives us also a confidence interval and error estimates.
Bayesian machine learning allows us to encode our prior beliefs about what those models should look like, independent of what the data tells us. This is especially useful when we don’t have a ton of data to confidently learn our model.
Video on Bayesian deep learning
See also the slides here.
Reinforcement Learning (RL) is one of the most exciting fields of Machine Learning today, and also one of the oldest. It has been around since the 1950s, producing many interesting applications over the years.
It studies how agents take actions based on trial and error, so as to maximize some notion of cumulative reward in a dynamic system or environment. Due to its generality, the problem has also been studied in many other disciplines, such as game theory, control theory, operations research, information theory, multi-agent systems, swarm intelligence, statistics, and genetic algorithms.
In March 2016, AlphaGo, a computer program that plays the board game Go, beat Lee Sedol in a five-game match. This was the first time a computer Go program had beaten a 9-dan (highest rank) professional without handicaps. AlphaGo is based on deep convolutional neural networks and reinforcement learning. AlphaGo’s victory was a major milestone in artificial intelligence and it has also made reinforcement learning a hot research area in the field of machine learning.
Lecture on Reinforcement Learning.
See also A. Geron's textbook, chapter 16.
The goal of transfer learning is to transfer the model or knowledge obtained from a source task to the target task, in order to resolve the issues of insufficient training data in the target task. The rationality of doing so lies in that usually the source and target tasks have inter-correlations, and therefore either the features, samples, or models in the source task might provide useful information for us to better solve the target task. Transfer learning is a hot research topic in recent years, with many problems still waiting to be studied.
The conventional deep generative model has a potential problem: the model tends to generate extreme instances to maximize the probabilistic likelihood, which will hurt its performance. Adversarial learning utilizes the adversarial behaviors (e.g., generating adversarial instances or training an adversarial model) to enhance the robustness of the model and improve the quality of the generated data. In recent years, one of the most promising unsupervised learning technologies, generative adversarial networks (GAN), has already been successfully applied to image, speech, and text.
Lecture on adversial learning.
Dual learning is a new learning paradigm, the basic idea of which is to use the primal-dual structure between machine learning tasks to obtain effective feedback/regularization, and guide and strengthen the learning process, thus reducing the requirement of large-scale labeled data for deep learning. The idea of dual learning has been applied to many problems in machine learning, including machine translation, image style conversion, question answering and generation, image classification and generation, text classification and generation, image-to-text, and text-to-image.
Distributed computation will speed up machine learning algorithms, significantly improve their efficiency, and thus enlarge their application. When distributed meets machine learning, more than just implementing the machine learning algorithms in parallel is required.
Meta learning is an emerging research direction in machine learning. Roughly speaking, meta learning concerns learning how to learn, and focuses on the understanding and adaptation of the learning itself, instead of just completing a specific learning task. That is, a meta learner needs to be able to evaluate its own learning methods and adjust its own learning methods according to specific learning tasks.
While there has been much progress in machine learning, there are also challenges.
For example, the mainstream machine learning technologies are black-box approaches, making us concerned about their potential risks. To tackle this challenge, we may want to make machine learning more explainable and controllable. As another example, the computational complexity of machine learning algorithms is usually very high and we may want to invent lightweight algorithms or implementations. Furthermore, in many domains such as physics, chemistry, biology, and social sciences, people usually seek elegantly simple equations (e.g., the Schrödinger equation) to uncover the underlying laws behind various phenomena. In the field of machine learning, can we reveal simple laws instead of designing more complex models for data fitting? Although there are many challenges, we are still very optimistic about the future of machine learning. As we look forward to the future, here are what we think the research hotspots in the next ten years will be.
See the article on Discovery of Physics From Data: Universal Laws and Discrepancies
Machine learning, especially deep learning, evolves rapidly. The ability gap between machine and human on many complex cognitive tasks becomes narrower and narrower. However, we are still in the very early stage in terms of explaining why those effective models work and how they work.
What is missing: the gap between correlation and causation. Standard Machine Learning is based on what e have called a frequentist approach.
Most machine learning techniques, especially the statistical ones, depend highly on correlations in data sets to make predictions and analyses. In contrast, rational humans tend to reply on clear and trustworthy causality relations obtained via logical reasoning on real and clear facts. It is one of the core goals of explainable machine learning to transition from solving problems by data correlation to solving problems by logical reasoning.
Bayesian Machine Learning is one of the exciting research directions in this field.
Quantum machine learning is an emerging interdisciplinary research area at the intersection of quantum computing and machine learning.
Quantum computers use effects such as quantum coherence and quantum entanglement to process information, which is fundamentally different from classical computers. Quantum algorithms have surpassed the best classical algorithms in several problems (e.g., searching for an unsorted database, inverting a sparse matrix), which we call quantum acceleration.
When quantum computing meets machine learning, it can be a mutually beneficial and reinforcing process, as it allows us to take advantage of quantum computing to improve the performance of classical machine learning algorithms. In addition, we can also use the machine learning algorithms (on classic computers) to analyze and improve quantum computing systems.
Read interview with Maria Schuld on her work on Quantum Machine Learning. See also her recent textbook.
Many quantum machine learning algorithms are based on variants of quantum algorithms for solving linear equations, which can efficiently solve N-variable linear equations with complexity of O(log2 N) under certain conditions. The quantum matrix inversion algorithm can accelerate many machine learning methods, such as least square linear regression, least square version of support vector machine, Gaussian process, and more. The training of these algorithms can be simplified to solve linear equations. The key bottleneck of this type of quantum machine learning algorithms is data input—that is, how to initialize the quantum system with the entire data set. Although efficient data-input algorithms exist for certain situations, how to efficiently input data into a quantum system is as yet unknown for most cases.
In quantum reinforcement learning, a quantum agent interacts with the classical environment to obtain rewards from the environment, so as to adjust and improve its behavioral strategies. In some cases, it achieves quantum acceleration by the quantum processing capabilities of the agent or the possibility of exploring the environment through quantum superposition. Such algorithms have been proposed in superconducting circuits and systems of trapped ions.
Dedicated quantum information processors, such as quantum annealers and programmable photonic circuits, are well suited for building deep quantum networks. The simplest deep quantum network is the Boltzmann machine. The classical Boltzmann machine consists of bits with tunable interactions and is trained by adjusting the interaction of these bits so that the distribution of its expression conforms to the statistics of the data. To quantize the Boltzmann machine, the neural network can simply be represented as a set of interacting quantum spins that correspond to an adjustable Ising model. Then, by initializing the input neurons in the Boltzmann machine to a fixed state and allowing the system to heat up, we can read out the output qubits to get the result.
Machine learning aims to imitate how humans learn. While we have developed successful machine learning algorithms, until now we have ignored one important fact: humans are social. Each of us is one part of the total society and it is difficult for us to live, learn, and improve ourselves, alone and isolated. Therefore, we should design machines with social properties. Can we let machines evolve by imitating human society so as to achieve more effective, intelligent, interpretable “social machine learning”?
And much more.
Early computer scientist Alan Kay said, The best way to predict the future is to create it. Therefore, all machine learning practitioners, whether scholars or engineers, professors or students, need to work together to advance these important research topics. Together, we will not just predict the future, but create it.


Varsity Blues *** Starring James Van Der Beek, Jon Voight Directed by Brian Robbins A Review by Frankie Paiva
Many a film have been showing us the different aspect's of what high schools are in all different parts of the U.S. Whether is be four guys trying to loose their virginity, the ugly duckling turning into a swan, or the longtime love of Dawson and Joey, filmmakers are finding more ways to showcase this four year portion of our lives.
But this is West Canaan, Texas.   He permanently damages his leg during the middle of the game.
The replacement is Johnathan Moxon (Van Der Beek) he's more interested in reading Slaughterhouse Five than he is looking through the football plays. He has a couple of plays of his own and he decides to try them out, besides he's not going to play football ever again anyway. Kilmer doesn't like the fact that he's not listening to him and tries to jeopardize his scholarship to Brown. It all leads up to the big game, will they win, will they lose? (Yawn..).
The movie starts out as if it could be a well-drawn out thoughtful look at high school sports, however this couldn't happen because MTV Productions is on the label and the director is the co-creator of Kenan & Kel and All That. So they fill in the cracks with countless scenes of uneeded nudity and profanity. While the first half provides incredible insight, the second is a predictable sports movie. So for that I give it *** stars.
A Review by Frankie Paiva The 12 Year-Old Movie Reviewer E-Mail me at<EMAIL_ADDRESS>The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Overview
This product enables multiple images to be displayed within a single area. The transition between images is a very smooth fading effect, the speed of which can be varied by changing the parameter values.
Any number of images may be added and each image can be set to link to a unique URL.
Implementation and Set Up
Adding Fading Images 2 to a web page is achieved by the following steps:-
| Add the following code to your web page:- |
|
(The "WIDTH" and "HEIGHT" parameters should be adjusted for the size required)
|
| Set Parameters |
The parameters (PARAM tags) dictate the content, colors, fonts and operation of the Fading Images 2. The VALUE of the parameters (added in the previous step) should be adjusted to provide the desired result.
For the meaning and effect of each parameter see the Parameter Reference here
|
| Copy Files |
From the ./AppletFiles/ directory of this package copy the following files and place them in the same directory as your web page:-
- SIRfade2PRO.jar
- jpapplet.js
|
Demos and Examples
This package contains several demos and examples to provide a quick overview of some of the capabilities of the software.
View Examples here
Customisation Service
If you require a feature or function beyond what is currently offered by this package then we may be able to produce a special version for you tailored to your requirements.
View Customisation Service Details here
Usage and Licensing
The trial version is fully functional however a registration message is displayed.
Licensed - Upon purchasing a license you will be provided with the licensed version. The licensed version does not contain any reference or links to JPowered.com.
View pricing and licensing information here »
Help and Support
If at any stage you require assistance, help or advice then please feel free contact us via our support pages at:-
JPowered Support »


[React] access DOM in reactjs
When I just switched from vanilla js to reactjs, I felt very it very
different when I wanted to do something which needs access to DOM.
Like when I want to change the class of one element to another class, I
used to write:
document.getElementById('bid').className = 'show-more';
But in reactjs I can't get the node by getElementById function or
anything like that. In reactjs, it need to use another way to achieve
this by making the class or inner HTML or anything I want to change the
state. Instead of picking the node and change it, I make it variable
inside state and when I want to change it, I change the value of the
variable.
I also saw there is another way, using the useRef hook. But I haven't
explored that one. I will add more once I get more information about
that.


Looking to Build a PC?
You've come to the right place! My name is Logan, and this website will teach you how to put together a PC from scratch!
There are detailed steps with pictures to demonstrate. This is a long process, but it can be very rewarding for those that want to learn!
You do not need to have any prior knowledge to begin building. The guide on this site will provide you each required step, and if you already
know how to do something, you can easily move to the next part installation!
If you do not yet have parts, you can also find a cheap buying guide to build a functioning PC for web browsing and media (not gaming). There is also guide for a cheap gaming PC, if that is what you want to build!
Please visit the "Start Building!" page to begin, or visit the "About Me" page for more information on myself. Send any comments through the "Contact Me" page.
Good luck!
Below is a calculator for determining whether or not you can afford a mid-range gaming PC, using the budget you think will be enough.