5.1 Introduction
5.1.1 Table of contents
5.1.2 Description
5.2 SFBool
5.3 SFColor and MFColor
5.4 SFFloat and MFFloat
5.5 SFImage
5.6 SFInt32 and MFInt32
5.7 SFNode and MFNode
5.8 SFRotation and MFRotation
5.9 SFString and MFString
5.10 SFTime and MFTime
5.11 SFVec2f and MFVec2f
5.12 SFVec3f and MFVec3f
This clause describes the syntax and general semantics of fields and events, the elemental data types used by VRML nodes to define objects (see 6, Node reference). Nodes are composed of fields and events (see 4, Concepts). The types defined in this annex are used by both fields and events.
There are two general classes of fields and events: fields and events that contain a single value (where a value may be a single number, a vector, or even an image), and fields and events that contain an ordered list of multiple values. Single-valued fields and events have names that begin with SF.Multiple-valued fields and events have names that begin with MF.
Multiple-valued fields/events are written as an ordered list of values enclosed in square brackets and separated by whitespace. If the field or event has zero values, only the square brackets ("[ ]") are written. The last value may optionally be followed by whitespace. If the field has exactly one value, the brackets may be omitted. For example, all of the following are valid for a multiple-valued MFInt32 field named foo containing the single integer value 1:
foo 1 foo [1,] foo [ 1 ]
The SFBool field or event specifies a single boolean value. SFBools are written as TRUE or FALSE. For example,
fooBool FALSE
is an SFBool field, fooBool, defining a FALSE value.
The initial value of an SFBool eventOut is FALSE.
The SFColor field or event specifies one RGB (red-green-blue) colour triple. MFColor specifies zero or more RGB triples. Each colour is written to the VRML file as an RGB triple of floating point numbers in ISO C floating point format (see 2.[ISOC]) in the range 0.0 to 1.0. For example:
fooColor [ 1.0 0. 0.0, 0 1 0, 0 0 1 ]
is an MFColor field, fooColor, containing the three primary colours red, green, and blue.
The initial value of an SFColor eventOut is (0 0 0). The initial value of an MFColor eventOut is [ ].
The SFFloat field or event specifies one single-precision floating point number. MFFloat specifies zero or more single-precision floating point numbers. SFFloats and MFFloats are written to the VRML file in ISO C floating point format (see 2.[ISOC]). For example:
fooFloat [ 3.1415926, 12.5e-3, .0001 ]
is an MFFloat field, fooFloat, containing three floating point values.
The initial value of an SFFloat eventOut is 0.0. The initial value of an MFFloat eventOut is [ ].
The SFImage field or event specifies a single uncompressed 2-dimensional pixel image. SFImage fields and events are written to the VRML file as three integers representing the width, height and number of components in the image, followed by width*height hexadecimal or integer values representing the pixels in the image, separated by whitespace:
fooImage <width> <height> <num components> <pixels values>
Pixel values are limited to 256 levels of intensity (i.e., 0-255 decimal or 0x00-0xFF hexadecimal). A one-component image specifies one-byte hexadecimal or integer values representing the intensity of the image. For example, 0xFF is full intensity in hexadecimal (255 in decimal), 0x00 is no intensity (0 in decimal). A two-component image specifies the intensity in the first (high) byte and the alpha opacity in the second (low) byte. Pixels in a three-component image specify the red component in the first (high) byte, followed by the green and blue components (e.g., 0xFF0000 is red, 0x00FF00 is green, 0x0000FF is blue). Four-component images specify the alpha opacity byte after red/green/blue (e.g., 0x0000FF80 is semi-transparent blue). A value of 0x00 is completely transparent, 0xFF is completely opaque. Note that alpha equals (1.0 - transparency), if alpha and transparency range from 0.0 to 1.0.
Each pixel is read as a single unsigned number. For example, a 3-component pixel with value 0x0000FF may also be written as 0xFF (hexadecimal) or 255 (decimal). Pixels are specified from left to right, bottom to top. The first hexadecimal value is the lower left pixel and the last value is the upper right pixel.
For example,
fooImage 1 2 1 0xFF 0x00
is a 1 pixel wide by 2 pixel high one-component (i.e., greyscale) image, with the bottom pixel white and the top pixel black. As another example,
fooImage 2 4 3 0xFF0000 0xFF00 0 0 0 0 0xFFFFFF 0xFFFF00 # red green black.. white yellow
is a 2 pixel wide by 4 pixel high RGB image, with the bottom left pixel red, the bottom right pixel green, the two middle rows of pixels black, the top left pixel white, and the top right pixel yellow.
The initial value of an SFImage eventOut is (0 0 0).
The SFInt32 field and event specifies one 32-bit integer. The MFInt32 field and event specifies zero or more 32-bit integers. SFInt32 and MFInt32 fields and events are written to the VRML file as an integer in decimal or hexadecimal (beginning with '0x') format. For example:
fooInt32 [ 17, -0xE20, -518820 ]
is an MFInt32 field containing three values.
The initial value of an SFInt32 eventOut is 0. The initial value of an MFInt32 eventOut is [ ].
The SFNode field and event specifies a VRML node. The MFNode field and event specifies zero or more nodes. The following example illustrates valid syntax for an MFNode field, fooNode, defining four nodes:
fooNode [ Transform { translation 1 0 0 } DEF CUBE Box { } USE CUBE USE SOME_OTHER_NODE ]
The SFNode field and event may contain the keyword NULL to indicate that it is empty.
The initial value of an SFNode eventOut is NULL. The initial value of an MFNode eventOut is [ ].
The SFRotation field and event specifies one arbitrary rotation. The MFRotation field and event specifies zero or more arbitrary rotations. An SFRotation is written to the VRML file as four ISO C floating point values (see 2.[ISOC]) separated by whitespace. The first three values specify a normalized rotation axis vector about which the rotation takes place. The fourth value specifies the amount of right-handed rotation about that axis in radians. For example, an SFRotation containing a PI radians rotation about the Y axis is:
fooRot 0.0 1.0 0.0 3.14159265
The 3x3 matrix representation of a rotation (x y z a) is
[ tx2+c txy+sz txz-sy txy-sz ty2+c tyz+sx txz+sy tyz-sx tz2+c ] where c = cos(a), s = sin(a), and t = 1-c
The initial value of an SFRotation eventOut is (0 0 1 0). The initial value of an MFRotation eventOut is [ ].
The SFString and MFString fields and events contain strings formatted with the UTF-8 universal character set (see 2.[UTF8]). SFString specifies a single string. The MFString specifies zero or more strings. Strings are written to the VRML file as a sequence of UTF-8 octets enclosed in double quotes (e.g., "string").
Any characters (including linefeeds and '#') may appear within the quotes. A double quote character within the string is preceded with a backslash. A backslash character within the string is also preceded with a backslash forming two backslashes. For example:
fooString [ "One, Two, Three", "He said, \"Immel did it!\"" ]
is an MFString field, fooString, with two valid strings.
The initial value of an SFString eventOut is "" (the empty string). The initial value of an MFString eventOut is [ ].
The SFTime field or event specifies a single time value. The MFTime field or event specifies zero or more time values. Time values are written to the VRML file as a double-precision floating point number in ISO C floating point format (see 2.[ISOC]). Time values are specified as the number of seconds from a specific time origin. Typically, SFTime fields and events represent the number of seconds since Jan 1, 1970, 00:00:00 GMT. For example:
fooTime 0.0
is an SFTime field, fooTime, representing a time of 0.0 seconds.
The initial value of an SFTime eventOut is -1. The initial value of an MFTime eventOut is [ ].
The SFVec2f field or event specifies a two-dimensional (2D) vector. An MFVec2f field or event specifies zero or more 2D vectors. SFVec2f's and MFVec2f's are written to the VRML file as a pair of ISO C floating point values (see 2.[ISOC]) separated by whitespace. For example:
fooVec2f [ 42 666, 7 94 ]
is an MFVec2f field, fooVec2f, with two valid vectors.
The initial value of an SFVec2f eventOut is (0 0). The initial value of an MFVec2f eventOut is [ ].
The SFVec3f field or event specifies a three-dimensional (3D) vector. An MFVec3f field or event specifies zero or more 3D vectors. SFVec3f's and MFVec3f's are written to the VRML file as three ISO C floating point values (see 2.[ISOC]) separated by whitespace. For example:
fooVec3f [ 1 42 666, 7 94 0 ]
is an MFVec3f field, fooVec3f, with two valid vectors.
The initial value of an SFVec3f eventOut is (0 0 0). The initial value of an MFVec3f eventOut is [ ].
Questions
or comments.
Copyright © 1997 The
VRML Consortium Incorporated.
http://www.vrml.org/Specifications/VRML97/part1/fieldsRef.html


Rotate, Translate, scale study
Hello! Rotate, transrate, and scale are very important factors in graphics.
In webgl, Rotate, Translate, and Scale are treated as matrices.
This method is very advantageous when calculating vertex coordinates using the associative law of a matrix.
matrix (AB)C == A(BC)
However, since the matrix is notcommutative, you need to pay attention to the order.
matrix AB != BA
Therefore, we would like to learn about the calculation results according to the order.
So, we will practice basic Rotate, Translator, and Scale, and study special cases.
Before we get started, let's take a look at the features of handling tools.
First, you can zoom in and out the screen by using the FOV function.
Second, X,Y,Z-VIEW is a function to change the viewpoint using viewmetrics. Use it when observing
movement of a
Finally, there are function such as toggle animation, rotate speed up and down, and drawarray mode
select.
X-axis = RED, Y-axis = GREEN, Z-axis = BLUE,
Toggle Animation
+
-
Lines
Triangles
Points
FOV :
X-VIEW :
Y-VIEW :
Z-VIEW :
The length of the side of the figure on the screen is 1. and The length of each cell of the figure on
the screen is 1.
Select the desired function, and observe the movement of the figure with functions such as fov, view,
and toggle
animation.
Coordinate display may vary depending on the function you select. First, let's study the basic functions
such as x-axisrotation, y-axis rotation, and k-axis rotation.
X-axis Rotate:
------- SELECT -------
0. rotateX
------Translate + Rotate------
1. translate[2,0,0] -> rotateX
2. rotateX -> translate[2,0,0]
3. translate[0,2,0] -> rotateX
4. rotateX -> translate[0,2,0]
5. translate[0,0,2] -> rotateX
6. rotateX -> translate[0,0,2]
7. translate[2,2,0] -> rotateX
8. rotateX -> translate[2,2,0]
9. translate[2,0,2] -> rotateX
10. rotateX -> translate[2,0,2]
11. translate[0,2,2] -> rotateX
12. rotateX -> translate[0,2,2]
13. translate[2,2,2] -> rotateX
14. rotateX -> translate[2,2,2]
15. translate[2,1,5] -> rotateX
16. rotateX -> translate[2,1,5]
------- Translate + Scale -------
17. scale[1.5,1.5,1] -> translate[2,2,2]
18. translate[2,2,2] -> scale[1.5,1.5,1]
19. scale[1.5,1,1] -> translate[2,2,2]
20. translate[2,2,2] -> scale[1.5,1,1]
21. scale[1.5,1.5,1] -> translate[2,2,0]
22. translate[2,2,0] -> scale[1.5,1.5,1]
23. scale[1.5,1,1] -> translate[2,2,0]
24. translate[2,2,0] -> scale[1.5,1,1]
25. scale[1.5,1.5,1] -> translate[2,0,0] -> rotateX
26. translate[2,0,0] -> scale[1.5,1.5,1]
27. scale[1.5,1,1] -> translate[2,0,0] -> rotateX
28. translate[2,0,0] -> scale[1.5,1,1]rotateX
------- Rotate + Scale -------
29. rotateX - > scale[1.5,1,1]
30. scale[1.5,1,1] -> rotateX
31. rotateX - > scale[1,1.5,1]
32. scale[1,1.5,1] -> rotateX
33. rotateX - > scale[1,1,1.5]
34. scale[1,1,1.5] -> rotateX
Y-axis Rotate:
------- SELECT -------
0. rotateY
------Translate + Rotate------
1. translate[2,0,0] -> rotateY
2. rotateY -> translate[2,0,0]
3. translate[0,2,0] -> rotateY
4. rotateY -> translate[0,2,0]
5. translate[0,0,2] -> rotateY
6. rotateY -> translate[0,0,2]
7. translate[2,2,0] -> rotateY
8. rotateY -> translate[2,2,0]
9. translate[2,0,2] -> rotateY
10. rotateY -> translate[2,0,2]
11. translate[0,2,2] -> rotateY
12. rotateY -> translate[0,2,2]
13. translate[2,2,2] -> rotateY
14. rotateY -> translate[2,2,2]
15. translate[2,1,5] -> rotateY
16. rotateY -> translate[2,1,5]
------- Translate + Scale -------
17. scale[1.5,1.5,1] -> translate[2,2,2]
18. translate[2,2,2] -> scale[1.5,1.5,1]
19. scale[1.5,1,1] -> translate[2,2,2]
20. translate[2,2,2] -> scale[1.5,1,1]
21. scale[1.5,1.5,1] -> translate[2,2,0]
22. translate[2,2,0] -> scale[1.5,1.5,1]
23. scale[1.5,1,1] -> translate[2,2,0]
24. translate[2,2,0] -> scale[1.5,1,1]
25. scale[1.5,1.5,1] -> translate[2,0,0] -> rotateX
26. translate[2,0,0] -> scale[1.5,1.5,1]
27. scale[1.5,1,1] -> translate[2,0,0] -> rotateX
28. translate[2,0,0] -> scale[1.5,1,1]rotateX
------- Rotate + Scale -------
29. rotateY - > scale[1.5,1,1]
30. scale[1.5,1,1] -> rotateY
31. rotateY - > scale[1,1.5,1]
32. scale[1,1.5,1] -> rotateY
33. rotateY - > scale[1,1,1.5]
34. scale[1,1,1.5] -> rotateY
Z-axis Rotate:
------- SELECT -------
0. rotateZ
------Translate + Rotate------
1. translate[2,0,0] -> rotateZ
2. rotateZ -> translate[2,0,0]
3. translate[0,2,0] -> rotateZ
4. rotateZ -> translate[0,2,0]
5. translate[0,0,2] -> rotateZ
6. rotateZ -> translate[0,0,2]
7. translate[2,2,0] -> rotateZ
8. rotateZ -> translate[2,2,0]
9. translate[2,0,2] -> rotateZ
10. rotateZ -> translate[2,0,2]
11. translate[0,2,2] -> rotateZ
12. rotateZ -> translate[0,2,2]
13. translate[2,2,2] -> rotateZ
14. rotateZ -> translate[2,2,2]
15. translate[2,1,5] -> rotateZ
16. rotateZ -> translate[2,1,5]
------- Translate + Scale -------
17. scale[1.5,1.5,1] -> translate[2,2,2]
18. translate[2,2,2] -> scale[1.5,1.5,1]
19. scale[1.5,1,1] -> translate[2,2,2]
20. translate[2,2,2] -> scale[1.5,1,1]
21. scale[1.5,1.5,1] -> translate[2,2,0]
22. translate[2,2,0] -> scale[1.5,1.5,1]
23. scale[1.5,1,1] -> translate[2,2,0]
24. translate[2,2,0] -> scale[1.5,1,1]
25. scale[1.5,1.5,1] -> translate[2,0,0] -> rotateX
26. translate[2,0,0] -> scale[1.5,1.5,1]
27. scale[1.5,1,1] -> translate[2,0,0] -> rotateX
28. translate[2,0,0] -> scale[1.5,1,1]rotateX
------- Rotate + Scale -------
29. rotateZ - > scale[1.5,1,1]
30. scale[1.5,1,1] -> rotateZ
31. rotateZ - > scale[1,1.5,1]
32. scale[1,1.5,1] -> rotateZ
33. rotateZ - > scale[1,1,1.5]
34. scale[1,1,1.5] -> rotateZ
really good! We have completed the Basic Course.
Now let's study the special course!
Choose the features you want! Before we get started, let's take a look at the features of handling tools.
Special Case 1:
------- SELECT -------
0. rotateX + rotateY + rotateZ -> translate[2,2,2]
1. translate[2,2,2] - > rotateX + rotateY + rotateZ
2. rotateX + rotateY -> translate[2,2,2]
3. translate[2,2,2] -> rotateX + rotateY
4. rotateX + rotateZ -> translate[2,2,2]
5. translate[2,2,2] -> rotateX + rotateZ
6. rotateY + rotateZ -> translate[2,2,2]
7. translate[2,2,2] -> rotateY + rotateZ
8. rotateZ -> translate[2,2,0]
9. translate[2,0,2] -> rotateZ
10. rotateZ -> translate[2,0,2]
11. translate[0,2,2] -> rotateZ
12. rotateZ -> translate[0,2,2]
13. translate[2,2,2] -> rotateZ
Special Case 2:
------- SELECT -------
0. fromRotation[0.2,0.2,0.2]
1. translate[2,0,0] -> fromRotation[0.2,0.2,0.2]
2. translate[0,2,0] -> fromRotation[0.2,0.2,0.2]
3. translate[0,0,2] -> fromRotation[0.2,0.2,0.2]
4. fromRotation[0.2,0.2,0.2]
5. translate[2,0,0] -> fromRotation[0.2,0.2,0]
6. translate[0,2,0] -> fromRotation[0.2,0.2,0]
7. translate[0,0,2] -> fromRotation[0.2,0.2,0]
8. fromRotation[0.2,0,0.2]
9. translate[2,0,0] -> fromRotation[0.2,0,0.2]
10. translate[0,2,0] -> fromRotation[0.2,0,0.2]
11. translate[0,0,2] -> fromRotation[0.2,0,0.2]
12. fromRotation[0,0.2,0.2]
13. translate[2,0,0] -> fromRotation[0,0.2,0.2]
13. translate[0,2,0] -> fromRotation[0,0.2,0.2]
13. translate[0,0,2] -> fromRotation[0,0.2,0.2]
Special Case 3:
------- SELECT -------
0. translate[-0.5,-0.5,-0.5] -> rotateX + rotateY + rotateZ -> translate[0.5,0.5,0.5]
1. translate[-0.5,-0.5,-0.5] -> rotateX + rotateY -> translate[0.5,0.5,0.5]
2. translate[-0.5,-0.5,-0.5] -> rotateX + rotateZ -> translate[0.5,0.5,0.5]
3. translate[-0.5,-0.5,-0.5] -> rotateY + rotateZ -> translate[0.5,0.5,0.5]
4. translate[-0.5,0,0] -> rotateX + rotateY + rotateZ -> translate[0.5,0,0]
5. translate[-0,-0.5,0] -> rotateX + rotateY + rotateZ -> translate[0,0.5,0]
6. translate[-0,-0,-0.5] -> rotateX + rotateY + rotateZ -> translate[0,0,0.5]
really good! Now let's start practicing!
Study various cases and special cases through various combinations.
And predict the shape's position!


S T R O O P!
Can you process your thoughts quickly while keeping your subconcious under control?
View Project
N A V A L T A C T I C S: O P T I M U S
The new way of playing a war and card game mash up.
View Project
T I M E T R O O P E R
How long can you last in this run against all odds?
View Project
C O N C E P T A R T
A collection of various concepts I have illustrated
View Project


Functions | |
| FX_EXPORT int | fx_send_sms (const long who, const char *message, EventListener func, void *args) |
| send sms. | |
| FX_EXPORT int | fx_send_sms_to_self (const char *message, EventListener func, void *args) |
| send sms to self. | |
| FX_EXPORT int | fx_send_sms_by_mobile_no (const char *mobile_no, const char *message, EventListener func, void *args) |
| send sms by mobile numbers. | |
| FX_EXPORT void | fx_set_longsms (BOOL bl) |
| set the send sms mode, it maybe longsms or sms normally. |
| int fx_send_sms | ( | const long | who, | |
| const char * | message, | |||
| EventListener | func, | |||
| void * | args | |||
| ) |
send sms.
| who | The user uid which you want to send. | |
| message | The content which you want to send. | |
| func | The send sms operate's callback function's address, and the operate result will pass to this function. |
| args | The send_sms operate's callback function's args. |
| int fx_send_sms_by_mobile_no | ( | const char * | mobile_no, | |
| const char * | message, | |||
| EventListener | func, | |||
| void * | args | |||
| ) |
send sms by mobile numbers.
| mobile_no | The mobile number which you want to send. | |
| message | The content which you want to send. | |
| func | The send sms operate's callback function's address, and the operate result will pass to this function. |
| args | The send_sms operate's callback function's args. |
| int fx_send_sms_to_self | ( | const char * | message, | |
| EventListener | func, | |||
| void * | args | |||
| ) |
send sms to self.
| message | The content which you want to send. | |
| func | The send sms operate's callback function's address, and the operate result will pass to this function. |
| args | The send_sms operate's callback function's args. |
| void fx_set_longsms | ( | BOOL | bl | ) |
set the send sms mode, it maybe longsms or sms normally.
longsms mode: it will send 180 characters in one short message, sms normally mode: it will send 70 characters in one short message,
| bl | The TRUE is set longsms mode, FALSE set normally mode . |


Call Us +777 (100) 1234
Welcome visitor you can
login
or
create an account
.
$
€
£
EN
FR
GM
Online Store Theme
Cart
$0.00
Recently added item(s)
Caldrea Linen and Room Spray
1 x $399.00
Caldrea Linen and Room Spray
1 x $399.00
View shopping cart
Procced to Checkout
My Account
|
My Wishlist
|
Log In
|
Sign Up
Home
Solids
Liquids
Spray
For home
For Garden
For Car
Other spray
Electric
For cars
All pages
Home
Typography and basic styles
Catalog (grid view)
Catalog (list type view)
Product view
Shoping cart
Proceed to checkout
Products comparison
Login
Contact us
404
Blog posts
Blog post view
Home
›
Category
›
This page
Product List
img
img
Show
1
2
3
4
5
6
7
8
9
10
11
12
per page
Sort By
Position
Price
Rating
Name
↑
Febreze Air Effects New Zealand Springs
$550.00
$725.00
Febreze Air Effects New Zealand Springs
$550.00
$725.00
Febreze Air Effects New Zealand Springs
$550.00
$725.00
Febreze Air Effects New Zealand Springs
$550.00
$725.00
Febreze Air Effects New Zealand Springs
$550.00
$725.00
Febreze Air Effects New Zealand Springs
$550.00
$725.00
Febreze Air Effects New Zealand Springs
$550.00
$725.00
Febreze Air Effects New Zealand Springs
$550.00
$725.00
Febreze Air Effects New Zealand Springs
$550.00
$725.00
Febreze Air Effects New Zealand Springs
$550.00
$725.00
Febreze Air Effects New Zealand Springs
$550.00
$725.00
Febreze Air Effects New Zealand Springs
$550.00
$725.00
←
1
2
3
4
5
...
100
→
Displaying 1 to 12 (of 100 products)


Times in seconds
Start
Reset
Send feedback to
<EMAIL_ADDRESS>Get the code at
github.com/diogoko/multitimer


To use this page, specify the server:port in the URL fragment (the part after the #). Here are some examples:
| Name | Kills | Deaths | Current KD | Historic KD | Historic WL | Historic Wins | Historic Losses | ID |
|---|
| Name | Kills | Deaths | Current KD | Historic KD | Historic WL | Historic Wins | Historic Losses | ID |
|---|


Next:
get_vars/data_server
Up:
Constructing an experiment
Previous:
Making movies
Contents
Index
Auxilliary Commands
Subsections
get_vars/data_server
checkpoint/restart
Trapping signals
Russell Standish 2014-09-10


FOREWORD : this is all based and cloned to a few details to the excellent solution you can find here. All credits for the author, I'm just making small variation based on his work : http://www.obdev.at/products/vusb/powerswitch.html
Purpose
Same project as
noardPowerSwitch except
with an Arduino.
Have a windows interface to controll on/off different things plugged around your pc. Ie, turn on/off that DVD reader that you use once a while and that has that annoying switch behind the case under the pc itself under the tv (see what I mean ?). It's a smart version of
Auto USB power box, using 5Amp relays to drive power-hog DVD reader, sound system, ...
This project is a good pretext for:
- Playing with relays
- More chance to burn down my place (do NOT play with AC power if you don't know what you're doing)
- Continue the fun after the Clapclap that turns light on in my room
History
Circuit
Schema
Todo
Links


John Deere User Experience Standards are available as a single download named UXFrame. This framework contains all of the necessary code to begin writing a web application that follows internal standards. New applications can be easily created by following provided examples and documentation, and existing applications can be updated progressively.
UXFrame is our canonical implementation of the John Deere visual standards. Although, it is certainly possible to achieve the same aesthetic using different tools or code, and using our implementation is in no way required. If using a custom implementation fits team need better, that approach should be preferred, and our implementation should serve as a style guide.
However, by using our framework, developers can spend less time recreating UI elements and layouts and more time working on an application. Additionally, components built using the framework can be used across applications and reintegrated into the standards for other teams to use.
UXFrame is currently under active development by a small team of developers on the IT UX team. We are always using, debugging, and improving our code. As with any project, it is always important to include proper front-end testing when using our code. We hope you will engage with our team to improve this framework.
We've also included several open source libraries that can be used along side our code. Basic documentation and examples for these libraries are included.
For questions, comments, thoughts, ideas, and contributions please contact Ben Seefeldt or Craig Newkirk.
The standard download for UXFrame includes everything a standard developer will need to get started using the framework. It includes a single CSS and JavaScript file to import into a project, as well as the John Deere Sans font file and necessary images. In addition to these necessary resources it also includes open source libraries, developer documentation and a handful of coded examples. If you're new to this tool, start here.
UXFrame is built using less and grunt. The source files to rebuild the standards are included in the advanced download. If your project uses these technologies, or if you are interested in extending the current standards, this distribution may be helpful. This also includes examples of features that are currently in developer preview.
.ie-fix
class.select
element to be our chevron icon..black-yellow
fixes..col-1-6
.img.fill
class for images to fill parent div horizontally. (Typicaly a
column or a panel.)
ThemeSwitcher
for toggling colorschemes..small-text
class.Object
and not $UXF
.
loginlong.html
example temporarily.console.log
function that was breaking IE.form-horizontal
..simple-mobile
to .jd-dev
..jd-dev-*
classes which will cover custom dev classes that could
be helpful but shouldn't be used in production code.
.jd-dev-altmin
modifies the min-width of the screen to 880px, which
allows a whole page to fit on a halved 1920x1080 screen.
.jd-dev-debug-color
sets debuggable colors to different divs. This will
be expanded as needed. Currently covers some basic elements.
.jd-dev
for toggling visibility of dev features in documentation.
.invis
class for buttons to allow for dropdown button with
user-info look.


janus.qmmm.SAP¶
-
class
janus.qmmm.
SAP
(hl_wrapper, ll_wrapper, sys_info, sys_info_format='pdb', modified_variant=False, qm_center=[0], partition_scheme='distance', Rmin=3.8, Rmax=4.5, qmmm_param={}, **kwargs)¶ Class for the SAP adaptive QM/MM method. Inherits from AQMMM class
Parameters: - hl_wrapper (
MMWrapper
subclass orQMWrapper
subclass) – Wrapper for performing the high-level computation. Traditionally QM but user can define MM. - ll_wrapper (
MMWrapper
subclass) – Wrapper for performing the low-level computation - sys_info (str) – A string with the filename or a list with multiple filenames that contain position and topology information.
- sys_info_format (str) – Describes what kind of input is contained in sys_info. Default is pdb.
- modified_variant (bool) – Whether to use the modified version mPAP, which disregards gradient terms that come from the switching function. Default is False.
- qm_center (list) – Atoms that define the qm center, default is [0]. If more than one index is given, COM is used as qm_center
- partition_scheme (str) – Scheme to use to define buffer groups, default is distance (only scheme available as of now)
- Rmin (float) – Inner radius for distance partition in angstroms, default is 3.8
- Rmax (float) – Outer radius for distance partition in angstroms, default is 4.5
- qmmm_param (dict) – A dictionary with any parameters to pass into the QMMM class. See QMMM class for specifics
-
__init__
(hl_wrapper, ll_wrapper, sys_info, sys_info_format='pdb', modified_variant=False, qm_center=[0], partition_scheme='distance', Rmin=3.8, Rmax=4.5, qmmm_param={}, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
Methods
__init__
(hl_wrapper, ll_wrapper, sys_info[, …])Initialize self. compute_COM
(atoms)Computes the center of mass of a specified group compute_gradients
(system)Computes the QM/MM gradients compute_lamda_i
(r_i)Computes the switching function and the derivative of the switching function defined as a 5th order spline: compute_sf_gradient
()Computes forces due to the gradient of the switching function compute_zero_energy
()Compute the energy of the isolated groups at their minimum geometry convert_input
(fil, form)Converts a set of input files into a MD trajectory define_buffer_zone
(qm_center)Determines buffer group atoms. SAP.edit_qm_atoms
electrostatic
(system, main_info)Gets energies of needed components and computes a QM/MM energy with a subtractive electrostatic embedding scheme find_boundary_bonds
([qm_atoms])Identified any covalent bonds that the QM/MM boundary cuts across find_buffer_atoms
(qm_center)Find the buffer groups whose COM falls in between Rmin and Rmax get_Rmax
()Function to return self.Rmin get_Rmin
()Function to return self.Rmin SAP.get_buffer_info
get_combos
([items, buffer_distance])A given list of indices is sorted by distance and the combinations is found based on distance order. get_external_charges
(system)Gets the point charges of atoms from secondary subsystem for electrostatic embedding get_forces
([run_ID])Function to return qmmm forces get_redistributed_positions
(positions, bonds, mm)Gets the positions for the redistributed point charges in the RC and RCD schemes get_switching_functions
()Computes switching function for SAP computations and saves to each buffer group object get_zero_energy
()Incorporates the zero energy of groups to the total qmmm energy make_primary_subsys_trajectory
([qm_atoms])Creates a MDtraj trajectory object with just the primary subsystem, and adds in any link atoms make_second_subsys_trajectory
([qm_atoms])Creates a MDtraj trajectory object with just the secondary subsystem mechanical
(system, main_info)Gets energies of needed components and computes a QM/MM energy with a subtractive mechanical embedding scheme using the formula partition
([qm_center])Finds the partitions as required by the SAP method and saves each partition as a system object. prepare_link_atom
()Identifies where to put link atom. run_aqmmm
()Interpolates the energy and gradients from each partition according to the SAP method run_qmmm
(main_info, wrapper_type)Drives QM/MM computation. set_Rmax
(Rmax)Function to set self.Rmax set_Rmin
(Rmin)Function to set self.Rmin update_traj
(position, topology, wrapper_type)Updates the positions and topology of self.traj, a MDtraj trajectory object Attributes
nm_to_angstrom
- hl_wrapper (


General discussion about Komodo. For useful links and more info click the pinned messages to the right. DON'T DM @jl777
100 messages
Before 05-Dec-19 12:00 AM
Yassin11-Dec-18 02:21 PM
Youtubeur french speak to Komodo platform!!
cascrypto11-Dec-18 02:24 PM
who knows what we will be comunicated on the 15th just rebranding KMD or more? my guess is the wallet up date is their more I can tease investers with?
Daniel CP11-Dec-18 04:27 PM
@cascrypto There will be a huge update to the Komodo code base on December 15th so everyone who uses Agama wallet or runs the Komodo daemon will beed to update before Dec 15. Here is some more info: https://komodoplatform.com/upgrade-guide-dec-15/
Komodo is preparing to activate a major update to the Komodo code base. Learn more about all the new tech features coming to Komodo on December 15, 2018.
The rebrand is a separate matter. We're in the process of creating a new logo with new colors and typeface, a new website, and a new GUI for the wallet. You can learn more about the rebrand here: https://komodoplatform.com/komodo-rebranding-update/
Komodo began a full rebrand with Ideas By Nature in August 2018. This post provides an update on the rebranding process and explains what's to come.
ChekaZ11-Dec-18 04:32 PM
Hey there
2
1
1
1
Cryptoon11-Dec-18 04:44 PM
Exile1311-Dec-18 05:31 PM
coingirl8711-Dec-18 05:34 PM
Hey, someone of you has experience with tax? The situation in germany is following one: cryptocurrencie are taxfree if you hodl 1 year. But when you get revenue than you have to hodl 10 years. I activate my interest after one year...now my accountant say that deadline is 10 years and i have to pay taxes...is that correct?
jorian11-Dec-18 05:37 PM
#german
so you have to pay taxes after 10 years>
chagidel11-Dec-18 05:40 PM
are al exchanges in maintanence mode for kmd ?
jorian11-Dec-18 05:43 PM
until the 15th
or maybe later, who knows
barterdex works
Acura11-Dec-18 05:47 PM
@coingirl87 There is still nothing judicially unequivocally decided.
I'd wait and see.
coingirl8711-Dec-18 05:48 PM
Wait and see?
Acura11-Dec-18 05:48 PM
yes
Nothing's been decided yet.
coingirl8711-Dec-18 05:52 PM
Please come to german channel
Cryptoon11-Dec-18 06:08 PM
There is a donate pubkey command or something along those lines @coingirl87
If you 'claim' rewards these are automatically moved to that given adress
I would suggest you tell taxman those are 'extra kmd' and not interest rewards
plazma11-Dec-18 06:33 PM
@SHossain i install agama3.1 its showing new version popup at top....
whats going on....
SHossain11-Dec-18 06:34 PM
3..1 version is not officially released
Acura11-Dec-18 06:34 PM
@plazma why you install a Testversion?
SHossain11-Dec-18 06:35 PM
don't use. if you want to use it, use it at your own risk
plazma11-Dec-18 06:36 PM
@Acura was too excited....sorry....(edited)
@SHossain when official
SHossain11-Dec-18 06:37 PM
when we announce
plazma11-Dec-18 06:37 PM
thanks
SHossain11-Dec-18 06:37 PM
did you have issues with 3.0?
plazma11-Dec-18 06:38 PM
@SHossain is 3.0 stable
SHossain11-Dec-18 06:38 PM
then, keep using it. when we have new version tested and ready, we will announce it.
We’re sorry to announce that we must wind up our official development activities due to insurmountable funding issues. Last week we read in Messari Crypto about two interesting categories for
SHossain11-Dec-18 06:41 PM
@plazma use what Komodo website says. that's official release
2
plazma11-Dec-18 06:41 PM
ok thanks....
Acura11-Dec-18 06:42 PM
I will never understand why people want to download unofficial test versions and then have support for them.
plazma11-Dec-18 06:44 PM
i guess every one of them r tooo excited
plazma11-Dec-18 06:58 PM
oh now i see it..i was so excited i missed it....it written TESTVERSION - DO NOT USE!
Komodo's industry-leading blockchain security service can protect any UTXO-based blockchain with the power of the Bitcoin network. Learn more here.
Daniel CP12-Dec-18 08:13 AM
@Seko we have plans to do exactly that. We are focusing on creating the new website now but this will be something included
1
We will also create a little logo or badge to give to dPoW-integrated projects to put on their websites ("Komodo Security Alliance" or something like that)
And then we'll have all those projects listed on the Komodo page too
Seko12-Dec-18 08:52 AM
That sounds good, especially about the badge...
jl777c12-Dec-18 11:08 AM
it is unfortunate that bitboost is closing down. that now makes the NXTventure asset on NXT not having any future value, so it can be retired
This kind of initiative gives a beautiful image to cryptocurrency
2
Lumbi12-Dec-18 04:16 PM
Ukraine can use crypto too. Sounds like the model can be applied to most countries in need.
1
sφldat12-Dec-18 04:23 PM
Italy and Greece also
FabØ12-Dec-18 06:24 PM
First milestone of the crowdfunding as been achieve. Thank you, we are glad, grateful & excited to be a part of komodo & its community . We will do our best to develop & drive financial innovation using the Komodo platform including user friendly and affordable financial & insurance services. Thank you & stay tuned... Fabien Nb: KSB, stable coin be design will have his own asset chain on @KomodoPlatform in the coming days!!
ocryptounion.io/komodo-campaig…
ksb.money
Merci @Yassin@Ludom@metaphilibert for your early support
and to all the participants (anonymity) and community members that contributed in KMD by their time and advices(edited)
Good luck with your presentation @Deleted User
Komodo in Belgium at Liège
2
2
Deleted User12-Dec-18 06:34 PM
Damn train... more than 5 hours late ... am trying to be here asap... but didn t expect this travel to effectively last 10+ hours lol
Really sorry about this... am on my way !
Cryptoon12-Dec-18 07:01 PM
ow had I known, might have tried to attend, good luck!
FabØ12-Dec-18 08:21 PM
airdropvenezuela.org the crypto Community & its values in motion, among which the #Komodo community.
The Venezuela shows that the need for stable mcurrencies is not about hype on bear market but a necessity for billions of people that need to simply be able to pay for food&c
with a reliable and valuable money
The monetary system is the core of every society and its economy(edited)
We need to build payment, saving, borrowing and insurance platform and solutions that can be use anywhere by anyone regardless of its country or beliefs
@Cryptoon hey ...thx for your answer...but extra kmd for what? Dont understand the part with donate given adress
ComputerGenie 👴👴👴12-Dec-18 10:21 PM
@coingirl87 I'd suggest looking about the airdropvenezuela site and doing your due diligence
coingirl8712-Dec-18 10:50 PM
Ok...can you explain me the differences?
PTYX12-Dec-18 11:04 PM
The donation is related to donating funds to random people in Venezuela via airdropvenezuela.org.
The Komodo rewards are a function of the blockchain that rewards users with a certain amount of KMD. It's 5% annually for the Komodo you hold in your address (10 KMD and above)
you should claim rewards every month. If you don't it will stop accruing.
Thx but for me its important which impact has reward for speculative period in germany. In germany the situation is, that if you get interest from cryptocurrencie the soeculative period will extend from 1 year to 10 years...so i have to wait 10 years to sell without taxes.
So maybe someone of you has experience with taxman how to explain that reward has no impact to speculative period
stock99913-Dec-18 01:49 AM
What does mean the hardfork at the Dec, 15th as for as KMD holders?
Can anyone explain this in simple words, without deep technical details?


Sign Up
That email is taken, please try another...
Terms and Conditions
Sign up
Something has gone wrong...
Congratulations! Your account has been registered successfully.


Income content goes here!
Info Gryphon 1 goes here!
Info for Gryphon 2 goes here!
Shop content goes here!
Library content goes here!
Mage Tower content goes here!
Training content goes here!
Building content goes here!


The File ‚TestConfig.txt‚
This file contains all lines of Fabric7.ini. The file is used during start of the program to check whether Fabric7.ini is complete, and the lines are in the right order. Never touch this file!


Clustering Mixed Data Types in R
June 22, 2016Clustering allows us to better understand how a sample might be comprised of distinct subgroups given a set of variables. While many introductions to cluster analysis typically review a simple application using continuous variables, clustering data of mixed types (e.g., continuous, ordinal, and nominal) is often of interest. The following is an overview of one approach to clustering data of mixed types using Gower distance, partitioning around medoids, and silhouette width.
In total, there are three related decisions that need to be taken for this approach:
For illustration, the publicly available “College” dataset found in the ISLR package will be used, which has various statistics of US Colleges from 1995 (N = 777). To highlight the challenge of handling mixed data types, variables that are both categorical and continuous will be used and are listed below:
- Continuous
- Acceptance rate
- Out of school tuition
- Number of new students enrolled
- Categorical
- Whether a college is public/private
- Whether a college is elite, defined as having more than 50% of new students who graduated in the top 10% of their high school class
The code was run using R version 3.2.2 with the following packages:
set.seed(1680) # for reproducibility
library(dplyr) # for data cleaning
library(ISLR) # for college dataset
library(cluster) # for gower similarity and pam
library(Rtsne) # for t-SNE plot
library(ggplot2) # for visualization
Before clustering can begin, some data cleaning must be done:
- Acceptance rate is created by diving the number of acceptances by the number of applications
- isElite is created by labeling colleges with more than 50% of their new students who were in the top 10% of their high school class as elite
college_clean <- College %>%
mutate(name = row.names(.),
accept_rate = Accept/Apps,
isElite = cut(Top10perc,
breaks = c(0, 50, 100),
labels = c("Not Elite", "Elite"),
include.lowest = TRUE)) %>%
mutate(isElite = factor(isElite)) %>%
select(name, accept_rate, Outstate, Enroll,
Grad.Rate, Private, isElite)
glimpse(college_clean)
## Observations: 777
## Variables: 7
## $ name (chr) "Abilene Christian University", "Ad...
## $ accept_rate (dbl) 0.7421687, 0.8801464, 0.7682073, 0....
## $ Outstate (dbl) 7440, 12280, 11250, 12960, 7560, 13...
## $ Enroll (dbl) 721, 512, 336, 137, 55, 158, 103, 4...
## $ Grad.Rate (dbl) 60, 56, 54, 59, 15, 55, 63, 73, 80,...
## $ Private (fctr) Yes, Yes, Yes, Yes, Yes, Yes, Yes,...
## $ isElite (fctr) Not Elite, Not Elite, Not Elite, E...
Calculating Distance
In order for a yet-to-be-chosen algorithm to group observations together, we first need to define some notion of (dis)similarity between observations. A popular choice for clustering is Euclidean distance. However, Euclidean distance is only valid for continuous variables, and thus is not applicable here. In order for a clustering algorithm to yield sensible results, we have to use a distance metric that can handle mixed data types. In this case, we will use something called Gower distance.
Gower distance
The concept of Gower distance is actually quite simple. For each variable type, a particular distance metric that works well for that type is used and scaled to fall between 0 and 1. Then, a linear combination using user-specified weights (most simply an average) is calculated to create the final distance matrix. The metrics used for each data type are described below:
- quantitative (interval): range-normalized Manhattan distance
- ordinal: variable is first ranked, then Manhattan distance is used with a special adjustment for ties
-
nominal: variables of k categories are first converted into k binary columns and then the Dice coefficient is used
- pros: Intuitive to understand and straightforward to calculate
- cons: Sensitive to non-normality and outliers present in continuous variables, so transformations as a pre-processing step might be necessary. Also requires an NxN distance matrix to be calculated, which is computationally intensive to keep in-memory for large samples
Below, we see that Gower distance can be calculated in one line using the daisy function. Note that due to positive skew in the Enroll variable, a log transformation is conducted internally via the type argument. Instructions to perform additional transformations, like for factors that could be considered as asymmetric binary (such as rare events), can be seen in ?daisy.
# Remove college name before clustering
gower_dist <- daisy(college_clean[, -1],
metric = "gower",
type = list(logratio = 3))
# Check attributes to ensure the correct methods are being used
# (I = interval, N = nominal)
# Note that despite logratio being called,
# the type remains coded as "I"
summary(gower_dist)
## 301476 dissimilarities, summarized :
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 0.0018601 0.1034400 0.2358700 0.2314500 0.3271400 0.7773500
## Metric : mixed ; Types = I, I, I, I, N, N
## Number of objects : 777
As a sanity check, we can print out the most similar and dissimilar pair in the data to see if it makes sense. In this case, University of St. Thomas and John Carroll University are rated to be the most similar given the seven features used in the distance calculation, while University of Science and Arts of Oklahoma and Harvard are rated to be the most dissimilar.
gower_mat <- as.matrix(gower_dist)
# Output most similar pair
college_clean[
which(gower_mat == min(gower_mat[gower_mat != min(gower_mat)]),
arr.ind = TRUE)[1, ], ]
## name accept_rate Outstate Enroll
## 682 University of St. Thomas MN 0.8784638 11712 828
## 284 John Carroll University 0.8711276 11700 820
## Grad.Rate Private isElite
## 682 89 Yes Not Elite
## 284 89 Yes Not Elite
# Output most dissimilar pair
college_clean[
which(gower_mat == max(gower_mat[gower_mat != max(gower_mat)]),
arr.ind = TRUE)[1, ], ]
## name accept_rate
## 673 University of Sci. and Arts of Oklahoma 0.9824561
## 251 Harvard University 0.1561486
## Outstate Enroll Grad.Rate Private isElite
## 673 3687 208 43 No Not Elite
## 251 18485 1606 100 Yes Elite
Choosing a clustering algorithm
Now that the distance matrix has been calculated, it is time to select an algorithm for clustering. While many algorithms that can handle a custom distance matrix exist, partitioning around medoids (PAM) will be used here.
Partitioning around medoids is an iterative clustering procedure with the following steps:
- Choose k random entities to become the medoids
- Assign every entity to its closest medoid (using our custom distance matrix in this case)
- For each cluster, identify the observation that would yield the lowest average distance if it were to be re-assigned as the medoid. If so, make this observation the new medoid.
- If at least one medoid has changed, return to step 2. Otherwise, end the algorithm.
If you know the k-means algorithm, this might look very familiar. In fact, both approaches are identical, except k-means has cluster centers defined by Euclidean distance (i.e., centroids), while cluster centers for PAM are restricted to be the observations themselves (i.e., medoids).
- pros: Easy to understand, more robust to noise and outliers when compared to k-means, and has the added benefit of having an observation serve as the exemplar for each cluster
- cons: Both run time and memory are quadratic (i.e., $O(n^2)$)
Selecting the number of clusters
A variety of metrics exist to help choose the number of clusters to be extracted in a cluster analysis. We will use silhouette width, an internal validation metric which is an aggregated measure of how similar an observation is to its own cluster compared its closest neighboring cluster. The metric can range from -1 to 1, where higher values are better. After calculating silhouette width for clusters ranging from 2 to 10 for the PAM algorithm, we see that 3 clusters yields the highest value.
# Calculate silhouette width for many k using PAM
sil_width <- c(NA)
for(i in 2:10){
pam_fit <- pam(gower_dist,
diss = TRUE,
k = i)
sil_width[i] <- pam_fit$silinfo$avg.width
}
# Plot sihouette width (higher is better)
plot(1:10, sil_width,
xlab = "Number of clusters",
ylab = "Silhouette Width")
lines(1:10, sil_width)
Cluster Interpretation
Via Descriptive Statistics
After running the algorithm and selecting three clusters, we can interpret the clusters by running summary on each cluster. Based on these results, it seems as though Cluster 1 is mainly Private/Not Elite with medium levels of out of state tuition and smaller levels of enrollment. Cluster 2, on the other hand, is mainly Private/Elite with lower levels of acceptance rates, high levels of out of state tuition, and high graduation rates. Finally, cluster 3 is mainly Public/Not Elite with the lowest levels of tuition, largest levels of enrollment, and lowest graduation rate.
pam_fit <- pam(gower_dist, diss = TRUE, k = 3)
pam_results <- college_clean %>%
dplyr::select(-name) %>%
mutate(cluster = pam_fit$clustering) %>%
group_by(cluster) %>%
do(the_summary = summary(.))
pam_results$the_summary
## [[1]]
## accept_rate Outstate Enroll
## Min. :0.3283 Min. : 2340 Min. : 35.0
## 1st Qu.:0.7225 1st Qu.: 8842 1st Qu.: 194.8
## Median :0.8004 Median :10905 Median : 308.0
## Mean :0.7820 Mean :11200 Mean : 418.6
## 3rd Qu.:0.8581 3rd Qu.:13240 3rd Qu.: 484.8
## Max. :1.0000 Max. :21700 Max. :4615.0
## Grad.Rate Private isElite cluster
## Min. : 15.00 No : 0 Not Elite:500 Min. :1
## 1st Qu.: 56.00 Yes:500 Elite : 0 1st Qu.:1
## Median : 67.50 Median :1
## Mean : 66.97 Mean :1
## 3rd Qu.: 78.25 3rd Qu.:1
## Max. :118.00 Max. :1
##
## [[2]]
## accept_rate Outstate Enroll
## Min. :0.1545 Min. : 5224 Min. : 137.0
## 1st Qu.:0.4135 1st Qu.:13850 1st Qu.: 391.0
## Median :0.5329 Median :17238 Median : 601.0
## Mean :0.5392 Mean :16225 Mean : 882.5
## 3rd Qu.:0.6988 3rd Qu.:18590 3rd Qu.:1191.0
## Max. :0.9605 Max. :20100 Max. :4893.0
## Grad.Rate Private isElite cluster
## Min. : 54.00 No : 4 Not Elite: 0 Min. :2
## 1st Qu.: 77.00 Yes:65 Elite :69 1st Qu.:2
## Median : 89.00 Median :2
## Mean : 84.78 Mean :2
## 3rd Qu.: 94.00 3rd Qu.:2
## Max. :100.00 Max. :2
##
## [[3]]
## accept_rate Outstate Enroll
## Min. :0.3746 Min. : 2580 Min. : 153
## 1st Qu.:0.6423 1st Qu.: 5295 1st Qu.: 694
## Median :0.7458 Median : 6598 Median :1302
## Mean :0.7315 Mean : 6698 Mean :1615
## 3rd Qu.:0.8368 3rd Qu.: 7748 3rd Qu.:2184
## Max. :1.0000 Max. :15516 Max. :6392
## Grad.Rate Private isElite cluster
## Min. : 10.00 No :208 Not Elite:199 Min. :3
## 1st Qu.: 46.00 Yes: 0 Elite : 9 1st Qu.:3
## Median : 54.50 Median :3
## Mean : 55.42 Mean :3
## 3rd Qu.: 65.00 3rd Qu.:3
## Max. :100.00 Max. :3
Another benefit of the PAM algorithm with respect to interpretation is that the medoids serve as exemplars of each cluster. From this, we see that Saint Francis University is the medoid of the Private/Not Elite cluster, Barnard College is the medoid for the Private/Elite cluster, and Grand Valley State University is the medoid for the Public/Not Elite cluster.
college_clean[pam_fit$medoids, ]
## name accept_rate Outstate
## 492 Saint Francis College 0.7877629 10880
## 38 Barnard College 0.5616987 17926
## 234 Grand Valley State University 0.7525653 6108
## Enroll Grad.Rate Private isElite
## 492 284 69 Yes Not Elite
## 38 531 91 Yes Elite
## 234 1561 57 No Not Elite
Via Visualization
One way to visualize many variables in a lower dimensional space is with t-distributed stochastic neighborhood embedding, or t-SNE. This method is a dimension reduction technique that tries to preserve local structure so as to make clusters visible in a 2D or 3D visualization. While it typically utilizes Euclidean distance, it has the ability to handle a custom distance metric like the one we created above. In this case, the plot shows the three well-separated clusters that PAM was able to detect. One curious thing to note is that there is a small group that is split between the Private/Elite cluster and the Public/Not Elite cluster.
tsne_obj <- Rtsne(gower_dist, is_distance = TRUE)
tsne_data <- tsne_obj$Y %>%
data.frame() %>%
setNames(c("X", "Y")) %>%
mutate(cluster = factor(pam_fit$clustering),
name = college_clean$name)
ggplot(aes(x = X, y = Y), data = tsne_data) +
geom_point(aes(color = cluster))
By investigating further, it looks like this group is made up of the larger, more competitive public schools, like the University of Virginia or the University of California at Berkeley. While not large enough to warrant an additional cluster according to silhouette width, these 13 schools certainly have characteristics distinct from the other three clusters.
tsne_data %>%
filter(X > 15 & X < 25,
Y > -15 & Y < -10) %>%
left_join(college_clean, by = "name") %>%
collect %>%
.[["name"]]
## [1] "College of William and Mary"
## [2] "Georgia Institute of Technology"
## [3] "SUNY at Binghamton"
## [4] "SUNY College at Geneseo"
## [5] "Trenton State College"
## [6] "University of California at Berkeley"
## [7] "University of California at Irvine"
## [8] "University of Florida"
## [9] "University of Illinois - Urbana"
## [10] "University of Michigan at Ann Arbor"
## [11] "University of Minnesota at Morris"
## [12] "University of North Carolina at Chapel Hill"
## [13] "University of Virginia"
A Final Note: Dealing with Larger Samples and One-Hot Encoding
Because using a custom distance metric requires keeping an NxN matrix in memory, it starts to become noticeable for larger sample sizes (> 10,000 or so on my machine). For clustering larger samples, I have found two options:
- Two-step clustering in SPSS: This model-based clustering approach can handle categorical and continuous variables and utilizes silhouette width (using rule-of-thumb cutoffs) to find the optimal number of clusters.
- Using Euclidean distance on data that has been one-hot encoded: While much quicker computationally, note that this is not optimal as you run into the curse of dimensionality fairly fast since all categoricals are recoded to become sparse matrices. Note that this approach is actually fairly similar to the dice coefficient found in calculation of Gower distance, except it incorrectly labels 0-0 as a match. More on this can be seen in this discussion.


Our Archive
April, 2012
March, 2012
February, 2012
January, 2012
December, 2011
November, 2011
October, 2011
September, 2011
August, 2011
July, 2011
June, 2011
May, 2011
Our Gallery
Jennifer, 10 years
Sebastian, 14 years
Peter, 9 years
Samuel, 15 years
Martin, 13 years
Fiona, 8 years
Full Gallery


${{product.price}} ${{product.discounted_price | number : '1.2-2'}}
Sizes : {{size}}, ADD TO BAG {{wishlist[index]}}
We couldn't find any matches!
Please check the spelling or try searching something else


{% extends 'layouts/layout-manage-v10.html' %} {% block pageTitle %} Verify a phone number {% endblock %} {% block content %}
We need an up to date phone number in case we need to contact you.
We'll send a security code by text message to your phone.


Are you a representative of a Faculty or a member of an Institute who has many projects ? You can use this portal for:
1- Posting new Projects that meet your expectations.
2- Search for already posted projects (in norder maybe to take part or to merge teams).
3- Check the trend in market by viewing what projects are being rated.


Chapter 8 Modeling
8.1 Notation
The number of observations will be denoted by \(n\). When we refer to the size of a data set, we are referring to \(n\). We use \(p\) to refer the number of input variables used. The word “variables” is synonymous with “features”. For example, in the health_insurance
data, the variables are age
, sex
, bmi
, children
, smoker
and region
. These 7 variables mean that \(p = 7\). The data is collected from 1,338 patients, which means that \(n = 1,338\).
Scalar numbers are denoted by ordinary variables (i.e., \(x = 2\), \(z = 4\)), and vectors are denoted by bold-faced letters
\[\mathbf{a} = \begin{pmatrix} a_1 \\ a_2 \\ a_3 \end{pmatrix}\]
We use \(\mathbf{y}\) to denote the target variable. This is the variable which we are trying to predict. This can be either a whole number, in which case we are performing regression, or a category, in which case we are performing classification. In the health insurance example, y = charges
, which are the annual health care costs for a patient.
Both \(n\) and \(p\) are important because they tell us what types of models are likely to work well, and which methods are likely to fail. For the PA exam, we will be dealing with small \(n\) (<100,000) due to the limitations of the Prometric computers. We will use a small \(p\) (< 20) in order to make the data sets easier to interpret.
We organize these variables into matrices. Take an example with \(p\) = 2 columns and 3 observations. The matrix is said to be \(3 \times 2\) (read as “2-by-3”) matrix.
\[ \mathbf{X} = \begin{pmatrix}x_{11} & x_{21}\\ x_{21} & x_{22}\\ x_{31} & x_{32} \end{pmatrix} \]
The target is
\[\mathbf{y} = \begin{pmatrix} y_1 \\ y_2 \\ y_3 \end{pmatrix}\] This represents the unknown quantity that we want to be able to predict. In the health care costs example, \(y_1\) would be the costs of the first patient, \(y_2\) the costs of the second patient, and so forth. The variables \(x_{11}\) and \(x_{12}\) might represent the first patient’s age and sex respectively, where \(x_{i1}\) is the patient’s age, and \(x_{i2} = 1\) if the ith patient is male and 0 if female.
Machine learning is about using \(\mathbf{X}\) to predict \(\mathbf{y}\). We call this “y-hat”, or simply the prediction. This is based on a function of the data \(X\).
\[\mathbf{\hat{y}} = f(\mathbf{X}) = \begin{pmatrix} \hat{y_1} \\ \hat{y_2} \\ \hat{y_3} \end{pmatrix}\]
This is almost never going to happen perfectly, and so there is always an error term, \(\mathbf{\epsilon}\). This can be made smaller, but is never exactly zero.
\[ \mathbf{\hat{y}} + \mathbf{\epsilon} = f(\mathbf{X}) + \mathbf{\epsilon} \]
In other words, \(\epsilon = y - \hat{y}\). We call this the residual. When we predict a person’s health care costs, this is the difference between the predicted costs (which we had created the year before) and the actual costs that the patient experienced (of that current year).
8.2 Ordinary least squares (OLS)
The type of model used refers to the class of function of \(f\). If \(f\) is linear, then we are using a linear model. If \(f\) is non-parametric (does not have input parameters), then it is non-parametric modeling. Linear models are the simplest type of model.
We have the data \(\mathbf{X}\) and the target \(\mathbf{y}\), where all of the y’s are real numbers, or \(y_i \in \mathbb{R}\).
We want to find a \(\mathbf{\beta}\) so that
\[ \mathbf{\hat{y}} = \mathbf{X} \mathbf{\beta} \]
Which means that each \(y_i\) is a linear combination of the variables \(x_1, ..., x_p\), plus a constant \(\beta_0\) which is called the intercept term.
\[ \begin{equation} y_i = \beta_0 + \beta_1 x_1 + ... + \beta_p x_p \end{equation} \]
In the one-dimensional case, this creates a line connecting the points. In higher dimensions, this creates a hyperplane.
The question then is how can we choose the best values of \(\beta?\) First of all, we need to define what we mean by “best”. Ideally, we will choose these values which will create close predictions of \(\mathbf{y}\) on new, unseen data.
To solve for \(\mathbf{\beta}\), we first need to define a loss function. This allows us to compare how well a model is fitting the data. The most commonly used loss function is the residual sum of squares (RSS), also called the squared error loss or the L2 norm. When RSS is small, then the predictions are close to the actual values and the model is a good fit. When RSS is large, the model is a poor fit.
\[ \text{RSS} = \sum_i(y_i - \hat{y})^2 \]
When you replace \(\hat{y_i}\) in the above equation with \(\beta_0 + \beta_1 x_1 + ... + \beta_p x_p\), take the derivative with respect to \(\beta\), set equal to zero, and solve, we can find the optimal values. This turns the problem of statistics into a problem of numeric optimization, which computers can do quickly.
You might be asking: why does this need to be the squared error? Why not the absolute error, or the cubed error? Technically, these could be used as well. In fact, the absolute error (L1 norm) is useful in other models. Taking the square has a number of advantages.
- It provides the same solution if we assume that the distribution of \(\mathbf{Y}|\mathbf{X}\) is guassian and maximize the likelihood function. This method is used for GLMs, in the next chapter.
- Empirically it has been shown to be less likely to overfit as compared to other loss functions
8.2.1 Example
In our health, we can create a linear model using bmi
, age
, and sex
as an inputs.
The formula
controls which variables are included. There are a few shortcuts for using R formulas.
| Formula | Meaning |
|---|---|
charges ~ bmi + age |
Use age and bmi to predict charges |
charges ~ bmi + age + bmi *age |
Use age ,bmi as well as an interaction to predict charges |
charges ~ (bmi > 20 ) + age |
Use an indicator variable for bmi > 20 age to predict charges |
log(charges ) ~ log(bmi ) + log(age ) |
Use the logs of age and bmi to predict log(charges ) |
You can use formulas to create new variables (aka feature engineering). This can save you from needing to re-run code to create data.
Below we fit a simple linear model to predict charges.
library(ExamPAData)
library(tidyverse)
model <- lm(data = health_insurance, formula = charges ~ bmi + age)
The summary
function gives details about the model. First, the Estimate
, gives you the coefficients. The Std. Error
is the error of the estimate for the coefficient. Higher standard error means greater uncertainty. This is relative to the average value of that variable. The t value
tells you how “big” this error really is based on standard deviations. A larger t value
implies a low probability of the null hypothesis being rejected saying that the coefficient is zero. This is the same as having a p-value (Pr (>|t|))
) being close to zero.
The little *
, **
, ***
indicate that the variable is either somewhat significant, significant, or highly significant. “significance” here means that there is a low probability of the coefficient being that size if there were no actual casual relationship, or if the data was random noise.
##
## Call:
## lm(formula = charges ~ bmi + age, data = health_insurance)
##
## Residuals:
## Min 1Q Median 3Q Max
## -14457 -7045 -5136 7211 48022
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -6424.80 1744.09 -3.684 0.000239 ***
## bmi 332.97 51.37 6.481 1.28e-10 ***
## age 241.93 22.30 10.850 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 11390 on 1335 degrees of freedom
## Multiple R-squared: 0.1172, Adjusted R-squared: 0.1159
## F-statistic: 88.6 on 2 and 1335 DF, p-value: < 2.2e-16
When evaluating model performance, you should not rely on the summary
alone as this is based on the training data. To look at performance, test the model on validation data. This can be done by a) using a hold out set, or b) using cross-validation, which is even better.
Let’s create an 80% training set and 20% testing set. You don’t need to worry about understanding this code as the exam will always give this to you.
library(caret)
#create a train/test split
index <- createDataPartition(y = health_insurance$charges, p = 0.8, list = F) %>% as.numeric()
health_insurance_train <- health_insurance %>% slice(index)
health_insurance_test <- health_insurance %>% slice(-index)
Train the model on the health_insurance_train
and test on health_insurance_test
.
model <- lm(data = health_insurance_train, formula = charges ~ bmi + age)
pred = predict(model, health_insurance_test)
Let’s look at the Root Mean Squared Error (RMSE).
## [1] 126923024
The above number does not tell us if this is a good model or not by itself. We need a comparison. The fastest check is to compare against a prediction of the mean. In other words, all values of the y_hat
are the average of charges
## [1] 145661765
The RMSE is higher (worse) when predicting the mean, which is what we expect. If you ever fit a model and get an error which is worse than the average prediction, something must be wrong.
The next test is to see if any assumptions have been violated.
First, is there a pattern in the residuals? If there is, this means that the model is missing key information. For the model below, this is a yes, which means that this is a bad model. Because this is just for illustration, I’m going to continue using it, however.
The noraml QQ shows how well the quantiles of the predictions fit to a theoretical normal distribution. If this is true, then the graph is a straight 45-degree line. In this model, you can definitely see that this is not the case. If this were a good model, this distribution would be closer to normal.
Caution: This test only applies to linear models which have a gaussian response distribution.
The below is from an excellent post of Stack Exchange.
R does not have a distinct plot.glm() method. When you fit a model with glm() and run plot(), it calls ?plot.lm, which is appropriate for linear models (i.e., with a normally distributed error term).
In general, the meaning of these plots (at least for linear models) can be learned in various existing threads on CV (e.g.: Residuals vs. Fitted; qq-plots in several places: 1, 2, 3; Scale-Location; Residuals vs Leverage). However, those interpretations are not generally valid when the model in question is a logistic regression.
More specifically, the plots will often ‘look funny’ and lead people to believe that there is something wrong with the model when it is perfectly fine. We can see this by looking at those plots with a couple of simple simulations where we know the model is correct:
Once you have chosen your model, you should re-train over the entire data set. This is to make the coefficients more stable because n
is larger. Below you can see that the standard error is lower after training over the entire data set.
model_full_data <- lm(data = health_insurance, formula = charges ~ bmi + age)
model_test_data <- lm(data = health_insurance_train, formula = charges ~ bmi + age)
| term | full_data_std_error | test_data_std_error |
|---|---|---|
| (Intercept) | 1744.1 | 1942.2 |
| bmi | 51.4 | 57.7 |
| age | 22.3 | 25.0 |
All interpretations should be based on the model which was trained on the entire data set. Obviously, this only makes a difference if you are interpreting the precise values of the coefficients. If you are just looking at which variables are included, or at the size and sign of the coefficients, then this would not change.
## (Intercept) bmi age
## -6424.8046 332.9651 241.9308
Translating the above into an equation we have
\[\hat{y_i} = -6,424.80 + 332.97 \space\text{bmi} + 241.93\space \text{age}\]
For example, if a patient has bmi = 27.9
and age = 19
then predicted value is
\[\hat{y_1} = -6,424.80 + (332.97)(27.9) + (241.93)(19) = 7,461.73\]
This model structure implies that each of the variables \(\mathbf{x_1}, ..., \mathbf{x_p}\) each change the predicted \(\mathbf{\hat{y}}\). If \(x_{ij}\) increases by one unit, then \(y_i\) increases by \(\beta_j\) units, regardless of what happens to all of the other variables. This is one of the main assumptions of linear models: variable indepdendence. If the variables are correlated, say, then this assumption will be violated.
| Readings | |
|---|---|
| ISLR 2.1 What is statistical learning? | |
| ISLR 2.2 Assessing model accuracy |
8.3 Generalized linear models (GLMS)
Instead of the model being a direct linear combination of the variables, there is an intermediate step called a link function \(g\).
\[ g(\mathbf{\hat{y}}) = \mathbf{X} \mathbf{\beta} \] This implies that the response \(\mathbf{y}\) is related to the linear predictor \(\mathbf{X} \mathbf{\beta}\) through the inverse link function.
\[ \mathbf{\hat{y}} = g^-1(\mathbf{X} \mathbf{\beta}) \] This means that \(g(.)\) must be an invertable. For example, if \(g\) is the natural logarithm (aka, the “log-link”), then
\[ log(\mathbf{\hat{y}}) = \mathbf{X} \mathbf{\beta} \Rightarrow \mathbf{\hat{y}} = e^{\mathbf{X} \mathbf{\beta}} \]
This is useful when the distribution of \(Y\) is skewed, as taking the log corrects skewness.
You might be asking, what if the distribution of \(Y\) is not normal, no matter what choice we have for \(g\)? The short answer is that we can change our assumption of the distribution of \(Y\), and use this to change the parameters. If you have taken exam STAM then you are familiar with maximum likelihood estimation.
We have a response \(\mathbf{Y}\), and we fit a distribution to \(\mathbf{Y} | \mathbf{X}\). This is the target variable conditioned on the data. For each \(y_i\), each observation, we assign a probability \(f_Y(y_i)\)
\[ f_y(y_i | X_1 = x_1, X_2 = x_2, ..., X_p = x_p) = Pr(Y = y_i | \mathbf{X}) \]
Now, when we choose the response family, we are simply changing \(f\). If we say that the response family is Gaussian, then \(f\) has a Gaussian PDF. If we are modeling counts, then \(f\) is a Poisson PDF. This only works if \(f\) is in the exponential family of distributions, which consists of the common names such as Gaussian, Binomial, Gamma, Inverse Gamma, and so forth. Reading the CAS Monograph 5 will provide more detail into this.
The possible combinations of link functions and distribution families are summarized nicely on Wikipedia.
For this exam, a common question is to ask candiates to choose the best distribution and link function. There is no all-encompasing answer, but a few suggestions are
- If \(Y\) is counting something, such as the number of claims, number of accidents, or some other discrete and positive counting sequence, use the Poisson;
- If \(Y\) contains negative values, then do not use the Exponential, Gamma, or Inverse Gaussian as these are strictly positive. Conversely, if \(Y\) is only positive, such as the price of a policy (price is always > 0), or the claim costs, then these are good choices;
- If \(Y\) is categorical (either binary or with more than two outcomes), only the Logic or Probit
The exam will always ask you to interpret the GLM. These questions can usually be answered by inverting the link function and interpreting the coefficients. In the case of the log link, simply take the exponent of the coefficients and each of these represents a “relativity” factor.
\[ log(\mathbf{\hat{y}}) = \mathbf{X} \mathbf{\beta} \Rightarrow \mathbf{\hat{y}} = e^{\mathbf{X} \mathbf{\beta}} \] For a single observation \(y_i\), this is
\[ \text{exp}(\beta_0 + \beta_1 x_{i1} + \beta_2 x_{i2} + ... + \beta_p x_{ip}) = \\ e^{\beta_0} e^{\beta_1 x_{i1}}e^{\beta_2 x_{i2}} ... e^{\beta_p x_{ip}} = R_o R_2 R_3 ... R_{p} \] Where \(R_k\) is the relativity of the kth variable. This terminology is from insurance ratemaking, where actuaries need to be able to explain the impact of each variable in pricing insurance. The data science community does not use this language.
For binary outcomes with logit or probit link, there is no easy interpretation. This has come up in at least one past sample exam, and the solution was to create “psuedo” observations and observe how changing each \(x_k\) would change the predicted value. Due to the time requirements, this is unlikely to come up on an exam. So if you are asked to use a logit or probit link, saying that the result is not easy to interpret should suffice.
| Readings | |
|---|---|
| CAS Monograph 5 Chapter 2 | |
| ISLR 2.2 Assessing model accuracy |
8.3.1 Advantages and disadvantages
There is usually at least one question on the PA exam which asks you to “list some of the advantages and disadvantages of using this particular model”, and so here is one such list.
GLM Advantages
- Easy to interpret
- Handles skewed data through different response distributions
- Models the average response which leads to stable predictions on new data
- Handles continuous and categorical data
- Works well on small data sets
GLM Disadvantages
- Does not select features
- Strict assumptions around distribution shape, randomness of error terms, and others
- Unable to detect non-linearity directly (although this can manually be addressed through feature engineering)
- Sensitive to outliers
- Low predictive power
8.4 Penalized Linear Models
One of the main weaknesses of the GLM is that the features need to be selected by hand. For large \(p\), this means that the modeler needs to test every combination of variables. This is time consuming.
Earlier on we said that the linear model minimizes the sum of square terms, known as the residual sum of squares (RSS)
\[ \text{RSS} = \sum_i(y_i - \hat{y})^2 = \sum_i(y_i - \beta_0 - \sum_{j = 1}^p\beta_j x_{ij})^2 \]
This loss function can be modified so that models which include more (and larger) coefficients are considered as worse. In other words, when there are more \(\beta\)’s, or \(\beta\)’s which are larger, the RSS is higher.
8.4.1 Ridge Regression
Ridge regression adds a penalty term which is proportional to the square of the sum of the coefficients. This is known as the “L2” norm.
\[ \sum_i(y_i - \beta_0 - \sum_{j = 1}^p\beta_j x_{ij})^2 + \lambda \sum_{j = 1}^p\beta_j^2 \] This \(\lambda\) controls how much of a penalty is imposed on the size of the coefficients. When \(\lambda\) is high, simpler models are treated more favorably because the \(\sum_{j = 1}^p\beta_j^2\) carries more weight. Conversely, then \(\lambda\) is low, complex models are more favored. When \(\lambda = 0\), we have an ordinary GLM.
8.4.2 Lasso
The official name is the Least Absolute Shrinkage and Selection Operator, but the common name is just “the lasso”. Just as with Ridge regression, we want to favor simpler models; however, we also want to select variables. This is the same as forcing some coefficients to be equal to 0.
Instead of taking the square of the coefficients (L2 norm), we take the absolute value (L1 norm).
\[ \sum_i(y_i - \beta_0 - \sum_{j = 1}^p\beta_j x_{ij})^2 + \lambda \sum_{j = 1}^p|\beta_j| \] In ISLR, Hastie et al show that this results in coefficients being forced to be exactly 0. This is extremely useful because it means that by changing \(\lambda\), we can select how many variables to use in the model.
Note: While any response family is possible with penalized regression, in R, only the Gaussian family is possible in the library glmnet
, and so this is the only type of question that the SOA can ask.
8.4.3 Advantages and disadvantages
Elastic Net/Lasso/Ridge Advantages
- All benefits from GLMS
- Automatic variable selection
- Better predictive power than GLM (usually)
Elastic Net/Lasso/Ridge Disadvantages
- All cons of GLMs
| Readings | |
|---|---|
| ISLR 6.1 Subset Selection | |
| ISLR 6.2 Shrinkage Methods |
8.5 Decision Trees
Decision trees can be used for either classification or regression problems. The model structure is a series of yes/no questions. Depending on how each observation answers these questions, a prediction is made.
The below example shows how a single tree can predict health claims.
- For non-smokers, the predicted annual claims are 8,434. This represents 80% of the observations
- For smokers with a
bmi
of less than 30, the predicted annual claims are 21,000. 10% of patients fall into this bucket. - For smokers with a
bmi
of more than 30, the prediction is 42,000. This bucket accounts for 11% of patients.
We can cut the data set up into these groups and look at the claim costs. From this grouping, we can see that smoker
is the most important variable as the difference in average claims is about 20,000.
| smoker | bmi_30 | mean_claims | percent |
|---|---|---|---|
| no | bmi < 30 | $7,977.03 | 0.38 |
| no | bmi >= 30 | $8,842.69 | 0.42 |
| yes | bmi < 30 | $21,363.22 | 0.10 |
| yes | bmi >= 30 | $41,557.99 | 0.11 |
ISLR describes the algorithm used to create trees on page 309. In simple language, this process is
Choose a variable at random. Then find the split point which best seperates observations out based on the value of \(y\). A good split is one where the \(y\)’s are very different. Continue doing this until a very deep tree is made.
Apply cost complexity pruning to the large tree in order to obtain a sequence of best subtrees. This complexity is based on a parameter \(\alpha\), which is similar to the \(\lambda\) from the Lasso in that a higher value imposes greater penalization (remove more splits). For each value of \(\alpha\), there is a different subtree (different brances are removed).
Use cross validation to choose the best \(\alpha\). For each value of \(\alpha\), we have an esimate of the squared prediction error. This is similar to how the Lasso uses CV to choose \(\lambda\).
8.6 Advantages and disadvantages
Advantages
- Easy to interpret
- Captures interaction effects
- Captures non-linearities
- Handles continuous and categorical data
- Handles missing values
Disadvantages
- Is a “weak learner” because of low predictive power
- Does not work on small data sets
- Is often a simplification of the underlying process because all observations at terminal nodes have equal predicted values
- Is biased towards selecting high-cardinality features because more possible split points for these features tend to lead to overfitting
- High variance (which can be alleviated with stricter parameters) leads the “easy to interpret results” to change upon retraining Unable to predict beyond the range of the training data for regression (because each predicted value is an average of training samples)
| Readings | |
|---|---|
| ISLR 8.1.1 Basics of Decision Trees | |
| ISLR 8.1.2 Classification Trees |
8.7 Random Forests
Advantages
- Resilient to overfitting due to bagging
- Only one parameter to tune (mtry, the number of features considered at each split)
- Very good a multi-class prediction
- Nonlinearities
- Interaction effects
- Deal with unbalanced and missing data*Usually requires over/undersamplin
Disadvantages
- Does not work on small data sets
- Weaker performance than other methods (GBM, NN)
- Unable to predict beyond training data for regression
| Readings | |
|---|---|
| ISLR 8.1.1 Basics of Decision Trees | |
| ISLR 8.1.2 Classification Trees |
8.8 Gradient Boosted Trees
- High prediction accuracy
- Closest model to a “silver bullet” that exists
- Nonlinearities, interaction effects, resilient to outliers, corrects for missing values
- Deals with class imbalance directly through by weighting observations
Disadvantages
- Requires large sample size
- Longer training time
- Does not detect linear combinations of features. These must be engineered Can overfit if not tuned correctly
| Readings | |
|---|---|
| ISLR 8.1.1 Basics of Decision Trees | |
| ISLR 8.1.2 Classification Trees |


Your payment has been successful
Reference number:
43236WPGV
We will email you a receipt shortly.
Payment summary
| Payment for: | Resident's parking permit |
| Amount paid: | £60.00 |
43236WPGV
We will email you a receipt shortly.
| Payment for: | Resident's parking permit |
| Amount paid: | £60.00 |


<% for (var index in htmlWebpackPlugin.files.js) { %>
<% } %>
<%= htmlWebpackPlugin.options.title %>
Cipher Descriptions
RAILFENCE (3-7 rows, 10-15
times number of rows)
|
REDEFENCE (3-7 rows, 10-15
times the number of rows)
References
-
Calculus of the Rail
Fence,
FIDDLE, Apr-May 1952, p.41
-
Sidelights of the
Rail Fence,
RIG R. MORTIS, Jul-Aug 1959, p.128
-
A Method of Solving,
MACHIAVELLI, Mar-Apr 1961, p.75
-
Redefence Cipher,
FRINKUS, Jul-Aug 1965, p.123
-
Solving a Normal Railfence,
TEEPEE, Mar-Apr 1966, p.80
-
Redefence Solving,
MACHIAVELLI, May-Jun 1970, p.48
-
Rail Fence (Novice
Notes),
LEDGE, Nov-Dec 1974, p.116
-
The Railfence and
Redefence as Special Cases of the Myszkowsky,
CROTALUS, Jul-Aug 1980, p.73
-
Simplified Rail Fence
& Redefence Construction & Solving,
SI SI, Jan-Feb 1983, p.4
-
Simplifying the Solution
of the Rail Fence Cipher,
SNAIL PACE, Mar-Apr 1984, p.1
-
More Simplification
in Solving the Rail Fence Cipher,
SNAIL PACE, Jul-Aug 1984, p.1
-
Redefence, a la Myszkowski,
QUINCE, Jan-Feb 1992, p.7
-
The Railfence Cipher,
JOT, Jul-Aug 1994, p.6
-
Redefence Solution,
MICROPOD, Nov-Dec 1995, p.5
-
Rail Fence Template,
LIONEL, Nov-Dec 1999, p.8
-
Railfence Offsets,
SCRYER, Jul-Aug 2001, p.6
-
Computer Column: Railfence
and Redefence,
ANCHISES, May-Jun 2003, p.12
-
Rail Fence (Tyro Grams),
LIONEL, Jul-Aug 2004, p.21
-
Rail Fence, (Tyro
Grams),
LIONEL, Sep-Oct 2015, p.17


I AM NEW
NEWS ROOM
LOGIN
LOGOUT
JOIN THE COMMUNITY HUB
Login
Log in with your details you entered during registration.
Don't have an account?
REGISTER
*Email:
*Password:
Login
Profile Management Dashboard
Membership Number/ID:
*First Name:
*Last Name:
*Email:
*Postal Address:
Membership Number/ID:
*Current Password:
*New Password:
*Confirm New Password:
Edit Profile
Save Changes
Change Password
Save New Password
Cancel
DELETE ACCOUNT


The selected students will be sent an e-mail, where the content can be specified below.
You may also use the following tags to further personalize your email subject and content:
[FNAME]
= Student's first name.
[LNAME]
= Student's last name.
[MLIST]
= List of mentees in the group.
Subject:
Content:
Also e-mail all members in the same group the students selected.


Terms and Conditions
- DEFINITIONS
1.1 "Buyer" means the individual or organisation who buys or agrees to buy the Goods from the Seller;
1.2 "Consumer" shall have the meaning ascribed in section 12 of the Unfair Contract Terms Act 1977;
1.3 "Contract" means the contract between the Seller and the Buyer for the sale and purchase of Goods incorporating these Terms and Conditions;
1.4 "Goods" means the articles that the Buyer agrees to buy from the Seller;
1.5 "Seller" means LYFT Clothing of 7 BULLHURST CLOSE, STOKE-ON-TRENT, STAFFORDSHIRE, ST6 8FG that owns and operates www.lyftclothing.com;
1.6 "Terms and Conditions" means the terms and conditions of sale set out in this agreement and any special terms and conditions agreed in writing by the Seller;
1.7 "Website" means www.lyftclothing.com.
- CONDITIONS
2.1. Nothing in these Terms and Conditions shall affect the Buyers statutory rights as a Consumer.
2.2. These Terms and Conditions shall apply to all contracts for the sale of Goods by the Seller to the Buyer and shall prevail over any other documentation or communication from the Buyer.
2.3. Acceptance of delivery of the Goods shall be deemed conclusive evidence of the Buyers acceptance of these Terms and Conditions.
2.4. Any variation to these Terms and Conditions (including any special terms and conditions agreed between the parties) shall be inapplicable unless agreed in writing by the Seller.
2.5. Any complaints should be addressed to the Seller's address stated in clause 1.5.
- ORDERING
3.1. All orders for Goods shall be deemed to be an offer by the Buyer to purchase Goods pursuant to these Terms and Conditions and are subject to acceptance by the Seller. The Seller may choose not to accept an order for any reason.
3.2. Where the Goods ordered by the Buyer are not available from stock the Buyer shall be notified and given the option to either wait until the Goods are available from stock or cancel the order and receive a full refund within 28 days.
3.3. When making an order through the Website, the technical steps the Buyer needs to take to complete the order process are described in THE HELP SECTION.
- PRICE AND PAYMENT
4.1. The price of the Goods shall be that stipulated on the Website. The price is INCLUSIVE of VAT. The price EXCLUDES delivery charges.
4.2. The total purchase price, including VAT and 3.00 delivery charge, will be displayed in the Buyers shopping cart prior to confirming the order.
4.3. After the order is received the Seller shall confirm by email the details, description and price for the Goods together with information on the right to cancel if the Buyer is a Consumer.
- RIGHTS OF SELLER
5.1. The Seller reserves the right to periodically update prices on the Website, which cannot be guaranteed for any period of time.
5.2. The Seller reserves the right to withdraw any Goods from the Website at any time.
5.3. The Seller shall not be liable to anyone for withdrawing any Goods from the Website or for refusing to process an order.
- DELIVERY
6.1. Goods supplied within the UK will normally be delivered within 7 days of acceptance of order.
6.2. Goods supplied to Europe will normally be delivered within 14 days of acceptance of order.
6.3. Goods supplied to Rest of the world will normally be delivered within 21 days of acceptance of order
6.4. Delivery of the Goods shall be made to the Buyers address specified in the order and the Buyer shall make all arrangements necessary to take delivery of the Goods whenever they are tendered for delivery.
6.5 Risk in the Goods shall pass to the Buyer upon delivery of the Goods.
- CANCELLATION OF AN ORDER
The Buyer may cancel the order for any reason up to the point of dispatch and any payments made by the Buyer shall be refunded in full within 28 days.
- FAULTY ITEMS
8.1. The Buyer shall inspect the Goods immediately upon receipt and shall notify the Seller by telephone, email or writing within 7 days if the Goods are damaged or do not comply with any of the Contract. If the Buyer fails to do so the Buyer shall be deemed to have accepted the Goods.
8.2. Where a claim of defect or damage is made, or the wrong goods have been sent, the Goods shall be returned by the Buyer to the Seller within 28 days of delivery. The Buyer shall be entitled to a replacement or a full refund (including delivery costs) plus any return postal charges if the Goods are in fact defective.
8.3. Goods must be returned by the Buyer within 28 days of cancellation in the original packaging and should be adequately insured during the return journey. The Buyer will receive a refund of all monies paid for the Goods (including delivery charges, if any, and return postal charges). If the Buyer fails to return the Goods following cancellation, the Seller shall be entitled to deduct the cost of recovering the Goods from the Buyer.
- UNWANTED ORDERS
9.1. In the event of the goods being unsuitable the Buyer shall be responsible for returning of the Goods to the Seller and any postage costs involved within 28 days. The Buyer will be under a duty to take care of the Goods until they are returned to the seller.
9.2. Goods to be returned must include the completed returns slip enclosed with the order and clearly stating a refund or an exchange. In the event of an exchange the Buyer is responsible for the postage costs (3 GBP or equivalent) to return the Goods back to the Buyer.
9.3. Where returned Goods are found to be damaged due to the Buyers fault the Buyer will be liable for the cost of remedying such damage.
- LIMITATION OF LIABILITY
10.1. Except as may be implied by law where the Buyer is dealing as a Consumer, in the event of any breach of these Terms and Conditions by the Seller the remedies of the Buyer shall be limited to damages which shall in no circumstances exceed the price of the Goods and the Seller shall under no circumstances be liable for any indirect, incidental or consequential loss or damage whatever.
10.2. Nothing in these Terms and Conditions shall exclude or limit the liability of the Seller for death or personal injury resulting from the negligence of the Seller or that of the Sellers agents or employees.
- WAIVER
No waiver by the Seller (whether express or implied) in enforcing any of its rights under this contract shall prejudice its rights to do so in the future.
- FORCE MAJEURE
The Seller shall not be liable for any delay or failure to perform any of its obligations if the delay or failure results from events or circumstances outside its reasonable control, including but not limited to, acts of God, strikes, lock outs, accidents, war, fire, failure of any communications, telecommunications or computer system, breakdown of plant or machinery or shortage or unavailability of raw materials from a natural source of supply, and the Seller shall be entitled to a reasonable extension of its obligations.
- SEVERANCE
If any term or provision of these Terms and Conditions is held invalid, illegal or unenforceable for any reason by any court of competent jurisdiction such provision shall be severed and the remainder of the provisions hereof shall continue in full force and effect as if these Terms and Conditions had been agreed with the invalid illegal or unenforceable provision eliminated.
- CHANGES TO TERMS AND CONDITIONS
The Seller shall be entitled to alter these Terms and Conditions at any time but this right shall not affect the existing Terms and Conditions accepted by the Buyer upon making a purchase.
- GOVERNING LAW AND JURISDICTION
These Terms and Conditions shall be governed by and construed in accordance with the law of England and the parties hereby submit to the exclusive jurisdiction of the English courts.


I highly recommend using the version of Webauthn available here using Firefox's Beta Build
Things to note about this build: