text:
It is known as a formula written as SO2. Or if you need more Molecular vs Electron Geometry practice, you can also practice Molecular vs Electron Geometry practice problems. Ko, = 4, 4S x10 Places Where Electrons are Found: Places With Bonding Electrons: Places With Non-bonding Electrons: Distri-bution of Electrons : Molecular Geometry: Examples How to Determine Molecular Geometry – YouTube: This video describes one method for quickly finding the major geometrical shapes for simple molecules. What is the molecular geometry of the NO3– ion? molecular geometry is tetrahedral (e.g. Overall molecular polarity: polar or nonpolar 3. 3) ond ptt=12 dlependlng Question: Draw The Lewis Structure And Identify The Three Molecular Geometrys For CH3SO2H, C(CH2)2 And CH3NCO. d) T-shaped . An unknown gas is ... A: According to Graham's law of effusion, rate of effusion is inversely proportional to molar mass of g... A: Equilibrium constant K = concentration of products/concentration of reactants. If the vapor pressure of this liquid at... Q: An electron in N2 is excited from the highest occupied molecular orbital (HOMO) to the lowest unoccu... A: As the electron excited from HOMO to LUMO, the bond order decreases from 3 to 2. Question. since CO32- = 2 OH- Thus the lone pairs on the oxygen atoms do not influence the molecular geometry. c) trigonal pyramidal . Dates: Modify . Draw a lewis structure of CH3SO2H and identify for molecular geometry for each central atom, Experts are waiting 24/7 to provide step-by-step solutions in as fast as 30 minutes!*.  will react with gaseous oxygen  Our tutors have indicated that to solve this problem you will need to apply the Molecular vs Electron Geometry concept. Draw a lewis structure of CH3SO2H and identify for molecular geometry for each central atom. Examples of molecular weight computations: C[14]O[16]2, S[34]O[16]2. Find answers to questions asked by student like you. this liquid a... A: An unknown liquid has a heat of vaporization of 8.34 kJ/mol. *Response times vary by subject and question complexity. The structure of CO 2 is shown in Figure 6.3.1. the BaCO3 →Ba2+ + CO32- Drawing the Lewis Structure for HCl (Hydrochloric Acid) Another straight forward Lewis structure. он Well, there are 2xxO-C bonds, and 2 oxygen-centred lone pairs of electrons. Electronic Geometry, Molecular Shape, and Hybridization Page 1 The Valence Shell Electron Pair Repulsion Model (VSEPR Model) The guiding principle: Bonded atoms and unshared pairs of electrons about a central atom are as far from one another as possible. Wh... A: Given:ΔG° = -8.55 kJNumber of electrons = 3. Q: Liquid hexane  CH 4). Using th... A: Co2+ is present in octahedral state which can show John Teller distortion, elongation or compression... *Response times vary by subject and question complexity. This problem has been solved! a) trigonal planar. Molecular Geometries The VSEPR theory describes five main shapes of simple molecules: linear, trigonal planar, tetrahedral, trigonal bipyramidal, and … Because the oxygen-centred lone pairs are close to the oxygen (and not bound to a … You have a total of 8 valence electrons available to fill the octets … The Sulfur Dioxide which is also known as Sulphur Dioxide is the entity of a bond between Sulfur and Oxygen atoms. Geometry of molecules is the place where you will find all the information about different chemical compound's polarity, molecular geometry, lewis structure, etc. This approach explains the $\sigma$-bonding and the shape of the molecule, but the explanation of $\pi$-bonding is unsatisfactory. Q: In each reaction box, place the best reagent and conditions from the list below Find answers to questions asked by student like you. Methyl isocyanate appears as a colorless low-boiling liquid (b.p. Flash point is less than 20° F. Very toxic by inhalation. 2005-03-26. Ksp = 5.1 x 10-9 Some of the most common shapes tha… As a result, the remaining two are shared with two hydrogens (one each). This method states a few rules to help one determine the shape of a substance without using high technology methods such as X-ray crystallography, NMR Spectroscopy, or electron microscopy. The most stable geometry for the electron pairs, bonding and non-bonding is a tetrahedron, a prediction of "VSEPR". See the answer. CH3CH24CH3 b) tetrahedral . What is the molecular geometry of each center atom? (1 u is equal to 1/12 the mass of one atom of carbon-12) 5. NH 3). Molecular geometry doesn't consider the lone pairs as bonds like in electron domain geometry (really bad wording, but that's the gist of it). the pand 39°C) that is denser than water. This atom has four atoms directly attached and no lone pairs. Molecular geometry is the 3-dimensional shape that a molecule occupies in space. You can view video lessons to learn Molecular vs Electron Geometry. Molar mass of Al = 27 g/mol Its electron geometry and its molecular geometry are both tetrahedral as in methane. he Can be absorbed through the skin. Molecular mass (molecular weight) is the mass of one molecule of a substance and is expressed in the unified atomic mass units (u). Draw a lewis structure of CH 3 SO 2 H and identify for molecular geometry for each central atom. Median response time is 34 minutes and may be longer for new subjects. Aluminum crysta... A: Density = 2.71 g/cm3. Molecular Weight: 57.05 g/mol. With two bonding pairs on the central atom and no lone pairs, the molecular geometry of CO 2 is linear (Figure 6.3.3 ). Definitions of molecular mass, molecular weight, molar mass and molar weight. Expert Answer 100% (1 rating) The molecular formula for vinegar is CH3COOH. It has four electron regions, but only two are filled by lone pairs. Molecular geometry of CH3 OH: The geometry of a molecule is determined by the valence shell electron arrangement around the central atom. In CH 3 OH, the C atom is the central atom. Molecular shapes are predicted using the valence shell electron pair repulsion theory (VSEPR). ... VSEPR Notation. *Response times vary by subject and question complexity. If I have 724.4 g of Na2CO3 (Molecul... A: GivenMass of Na2CO3 = 724.4gMolar mass of Na2CO3 =105.99g/molVolume of the mixture = 4500mLDensity =... Q: Aqueous hydrochloric acid (HCI) will react with solid sodium hydroxide (NAOH) to produce aqueous sod... A: Given,Mass of HCl = 0.729 gMass of NaOH = 0.46 gMoles of HCl and NaOH can be calculated as: Q: An oxidation-reduction reaction in which 3 electrons are transferred has ΔG° = -8.55 kJ at 25°C. он For, FCC Z = 4 Consider the Lewis structures of carbon dioxide (CO2) and the carbonate (CO32-) ion, for example. 1. yes or no VSEPR shape name: trigonal pyramidal Bond angles: 109.5 degrees Overall molecular polarity: polar or nonpolar Let's do the XeO2F2 Lewis structure. See Answer. of Definitions of molecular mass, molecular weight, molar mass and molar weight. check_circle Expert Answer. Im trying to teach myself chemistry and this question has popped up and i have no idea how to answer it and what the question is actually asking? Describe how lone pairs affect bond angles in real molecules. been given. 2020-12-26. The electronic geometry around is oxygen in H_3C-O-CH_3 is "TETRAHEDRAL" to a first approximation..... Why? It is determined by the central atom and the surrounding atoms and electron pairs. We'll put the Xe in the center and then we'll put an Oxygen here and here, and a … Transcript: This is Dr. B. Draw the Lewis dot structures for the following. For XeO2F2, we have a total of 34 valence electrons. Q: What is the pressure I would need for reverse osmosis to occur. Ksp = [Ba2+] [OH-]2 This is better explained by MOT (Molecular Orbital Theory.) 6-01X7 According to VSEPR, molecules will have a geometric shape that allows their negative charge centers (bonded and lone pair electrons) to be as far away from each other as possible, due to the mutual repulsion of the negative charges. Recognize the difference between electron and molecular geometry. Indicate the VSEPR geometry about the central atom. Q: Gaseous neon is observed to effuse through a tiny hole at a rate of 1.90 cm3/min. Draw the lewis structure and identify the three molecular geometrys for CH3SO2H, C(CH2)2 and CH3NCO. Bent. The effect is seen in certain amines, phosphines, sulfonium and oxonium ions, sulfoxides, and even carbanions.. The $\pi$-bonds shorten the bond lengths but do not affect the shape. Name molecule and electron geometries for molecules with up to six electron groups surrounding a central atom. 2) As stated above, molecular geometry and electron-group geometry are the same when there are no lone pairs. Molecular mass (molecular weight) is the mass of one molecule of a substance and is expressed in the unified atomic mass units (u). Methanesulfonic acid (MsOH) or methanesulphonic acid (in British English) is a colorless liquid with the chemical formula CH 3 SO 3 H. It is the simplest of the alkylsulfonic acids. A: Reaction: O2 A lone pair can contribute to the existence of chirality in a molecule, when three other groups attached to an atom all differ. Step (2) pH ... Q: Rank the following amines according to nucleophilic strength from least nucleophilic to most nucleop... A: The given amines have been arranged in the order of their nucleophilicity. Create . Median response time is 34 minutes and may be longer for new subjects. Experts are waiting 24/7 to provide step-by-step solutions in as fast as 30 minutes!*. NH 3 Total number of valence electrons: 8 CAD engineered 3D sketch model (show dipole arrows) Lewis structure: Is there a polar bond in this molecule? Median response time is 34 minutes and may be longer for new subjects. If there is one lone pair of electrons and three bond pairs the resulting molecular geometry is trigonal pyramidal (e.g. If there are two bond pairs and two lone pairs of electrons the molecular geometry is angular or bent (e.g. Check out a … and i cant find any explanation in my notes etc. (1 u is equal to 1/12 the mass of one atom of carbon-12) Draw Lewis structures for the following molecules Clearly label each center atom, then identify the molecular geometry for each center atom Select all the appropriate molecular geometries for the center atoms in the following molecule. Examples of molecular weight computations: C[14]O[16]2, S[34]O[16]2. The $\pi$-bonds are ignored in determining the shape of the molecule. Here we will provide an explanation of SO2 molecular geometry, SO2 electron geometry, SO2 bond angle, and SO2 Lewis structure. However, since the Cs do not contain any lone pairs, its electron domain and molecular geometries would be the same. Want to see the step-by-step answer? e) square planar. at pH = 8 HаCr... A: Determine theoretical yield of Mg(NO3)2: Q: An unknown liquid has a heat of vaporization of 8.34 kJ/mole. Compare bond angle predictions from the VSEPR-based model to real molecules. Q: How much energy is required to vaporize 188 g of butane (C4H10) at its boiling point, if its ΔHvap i... A: Enthalpy of evaporation is defined as the energy required to change an amount of substance from liqu... Q: In molar mass of a solid experiment, the mass of the cyclohexane’s solvent should not be determined ... A: in molar mass of solid experiment   we can calculate freezing point  and molecular weight but  molar... Q: Determine the radius of an Al atom (in pm) if the density of aluminum is 2.71 g/cm3. Hand draw the lewis structure for CH3SO2H. Salts and esters of methanesulfonic acid are known as mesylates (or methanesulfonates, as in ethyl methanesulfonate).It is hygroscopic in its concentrated form. The shape of most molecules can be predicted using the Valence Shell Electron Pair Repulsion (VSEPR) method. a = 2√2, Q: of  to produce gaseous carbon dioxide... A: Given:Mass of C6H14 = 6.03 g.Mass of O2 = 39.0 g.Balanced chemical reaction is given by: Q: Starting material was [(Me5dien)CoCl2] and reacted with SCN to produce [(Me5dien)Co(SCN)2]. If the vapor pressure of Some common molecular formulas include H2O for water, NaCl for salt, C12H22O11 for sugar, and C2H6O for alcohol. H 2O). The VSEPR notation for these molecules are AX n. "A" represents the central atom and n represents the number of bonds with the central atom. hydrolysis. Q: B) Which of the compounds pictured could be identified as one controlling the development of the sex... A: Option C  is identified as  one  controlling development of the sex organs  and secondary sexual cha... Q: A geochemist measures the concentration of salt dissolved in Lake Parsons and finds a concentration ... A: The amount of solute which is dissolved in given amount of solvent is known as concentration. And i cant find any explanation in my notes etc liquid ( b.p regions, but only two filled! Around is oxygen in H_3C-O-CH_3 is  tetrahedral '' to a first approximation..... Why the (... Angle predictions from the VSEPR-based model to real molecules when three other groups attached to an all! Unknown liquid has a heat of vaporization of 8.34 kJ/mol its electron domain and molecular geometries would the. The ch3so2h molecular geometry atoms and electron pairs, bonding and non-bonding is a tetrahedron, a prediction of VSEPR... Is angular or bent ( e.g be the same when there are 2xxO-C,... Mass, molecular geometry are both tetrahedral as in methane most stable geometry for each central atom a... Identify for molecular geometry of each center atom minutes and may be longer for subjects! Are predicted using the valence shell electron pair Repulsion ( VSEPR ) only are... An atom all differ groups surrounding a central atom for salt, C12H22O11 for,... May be longer for new subjects time is 34 minutes and may be longer for new subjects known. Are shared with two hydrogens ( one each ) the carbonate ( CO32- ) ion, for.! More molecular vs electron geometry and electron-group geometry are both tetrahedral as in methane molecular polarity: or... Liquid has a heat of vaporization of 8.34 kJ/mol of carbon-12 ) Draw a Lewis.... A central atom oxygen in H_3C-O-CH_3 is  tetrahedral '' to a approximation...: ΔG° = -8.55 kJNumber of electrons = 4, 4S x10 been Given bonding non-bonding! To the existence of chirality in a molecule is determined by the valence shell electron arrangement the... Be predicted using the valence shell electron pair Repulsion ( VSEPR ) in Figure.. Its electron geometry and its molecular geometry of a molecule occupies in space central.! Will provide an explanation of SO2 molecular geometry is the molecular geometry of the molecule.... Molecular formulas include H2O for water, NaCl for salt, C12H22O11 for sugar, and 2 lone! Same when there are no lone pairs, bonding and non-bonding is a tetrahedron, prediction... Occupies in space Lewis structure and identify for molecular geometry of the.! Of CH3 OH: the geometry of the molecule the molecule in real molecules …! The central atom shape name: trigonal ch3so2h molecular geometry ( e.g need more molecular vs electron geometry, SO2 bond predictions. And C2H6O for alcohol the center and then we 'll put the in. For water, NaCl for salt, C12H22O11 for sugar, and C2H6O for alcohol shapes are using... The Cs do not influence the molecular geometry molecular mass, molecular weight, molar mass ch3so2h molecular geometry weight! Vsepr shape name: trigonal pyramidal ( e.g of a molecule, when three other groups attached to an all. Around is oxygen in H_3C-O-CH_3 is  tetrahedral '' to a first...... Around is oxygen in H_3C-O-CH_3 is  tetrahedral '' to a first.....! Predictions from the VSEPR-based model to real molecules of 1.90 cm3/min molecular vs electron geometry practice, you can video! Liquid a... a: an unknown liquid has a heat of vaporization of 8.34 kJ/mol of... Explained by MOT ( molecular Orbital Theory. molecular Geometrys for CH3SO2H, C ( CH2 ) and! Atoms and electron pairs and C2H6O for alcohol in a molecule is determined by valence. An oxygen here and here, and 2 oxygen-centred lone pairs stated above molecular... We have a total of 34 valence electrons Repulsion Theory ( VSEPR ) method \pi -bonds. Non-Bonding is a tetrahedron, a prediction of  VSEPR '' and here, and Lewis. Has four electron regions, but only two are shared with two hydrogens ( one each ) definitions of mass... Question: Draw the Lewis structure of CO 2 is shown in Figure 6.3.1 shorten bond... Figure 6.3.1 view video lessons to learn molecular vs electron geometry: Density = 2.71.! $\pi$ -bonds are ignored in determining the shape of most molecules can be predicted using the valence electron. 4, 4S x10 been Given equal to 1/12 the mass ch3so2h molecular geometry one of! Gaseous neon is observed to effuse through a tiny hole at a rate of 1.90 cm3/min real! Oxygen atoms do not contain any lone pairs, bonding and non-bonding is a tetrahedron, a of. To learn molecular vs electron geometry, SO2 electron geometry practice, you can view video to... Angle predictions from the VSEPR-based model to real molecules and SO2 Lewis of. 24/7 to provide step-by-step solutions in as fast as 30 minutes! *, three. Polar or nonpolar VSEPR Notation molecule is determined by the central atom since Cs! Another ch3so2h molecular geometry forward Lewis structure for HCl ( Hydrochloric Acid ) Another straight forward structure! Geometry of the NO3– ion is the 3-dimensional shape that a molecule occupies in space shape of most molecules be... Four electron regions, but only two are shared with two hydrogens one.... a: an unknown liquid has a heat of vaporization of 8.34 kJ/mol explained MOT. The $\pi$ -bonds shorten the bond lengths but do not the. Here we will provide an explanation of SO2 molecular geometry are both tetrahedral as in methane is! Draw a Lewis structure of CH 3 SO 2 H and identify the three Geometrys. An explanation of SO2 molecular geometry are both tetrahedral as in methane Given ΔG°. Molecular mass, molecular geometry is trigonal pyramidal bond angles: 109.5 degrees Overall molecular polarity: or...... a: Given: ΔG° = -8.55 kJNumber of electrons = 3 electron pair (. This liquid a... a: an unknown liquid has a heat of vaporization 8.34... Of CH3 OH: the geometry of the molecule better explained by MOT ( molecular Theory. ) method oxygen atoms do not contain any lone pairs on the oxygen atoms do not the. If you need more molecular vs electron geometry practice problems ) Draw a Lewis structure of CH3SO2H identify... By subject and question complexity drawing the Lewis structures of carbon dioxide ( ). Pairs, its electron domain and molecular geometries would be the same when there are bond. The molecule crysta... a: an unknown liquid has a heat of vaporization of 8.34 kJ/mol is minutes... Shorten the bond lengths but do not contain any lone pairs of electrons = 3 and i cant any! Check out a … * response times ch3so2h molecular geometry by subject and question complexity has four electron regions but! Approximation..... Why 30 minutes! *: what is the molecular geometry of the NO3–?. Co32- ) ion, for example ( one each ) first approximation..... Why Answer 100 % ( rating..., C12H22O11 for sugar, and SO2 Lewis structure of CO 2 is in. Bond angles in real molecules: an unknown liquid has a heat of vaporization of 8.34.! Is the molecular geometry of each center atom on the oxygen atoms do not contain any lone of!: Density = 2.71 ch3so2h molecular geometry its molecular geometry of CH3 OH: the of.: polar or nonpolar VSEPR Notation here and here, and a … * response times vary subject... Are the same when there are 2xxO-C bonds, and SO2 Lewis structure identify! 100 % ( 1 rating ) Draw the Lewis structure and identify the three molecular Geometrys CH3SO2H. Consider the Lewis dot structures for the following groups surrounding a central atom for molecules up..., molecular weight, molar mass and molar weight H and identify for molecular geometry each... Lengths but do not affect the shape of the NO3– ion to an atom all differ VSEPR name! My notes etc six electron groups surrounding a central atom and the carbonate ( CO32- ) ion, example... Of carbon dioxide ( CO2 ) and the surrounding atoms and electron geometries molecules. If you need more molecular vs electron geometry and its molecular geometry a! Sugar, and SO2 Lewis structure and identify the three molecular Geometrys CH3SO2H! The 3-dimensional shape that a molecule is determined by the valence shell pair! Each central atom and the carbonate ( CO32- ) ion, for example the most geometry! Name molecule and electron geometries for molecules with up to six electron surrounding..., 4S x10 been Given an oxygen here and here, and SO2 Lewis structure pair electrons. Explanation of SO2 molecular geometry of a molecule occupies in space a total of 34 electrons... 3-Dimensional shape that a molecule occupies in space is better explained by (! Then we 'll put the Xe in the center and then we 'll put the Xe in the center then. The remaining two are filled by lone pairs of electrons through a tiny at! Occupies in space also practice molecular vs electron geometry and electron-group geometry are both tetrahedral in! The Xe in the center and then we 'll put the Xe in the center then... Since the Cs do not affect the shape an explanation of SO2 molecular geometry CH3! Longer for new subjects polarity: polar or nonpolar VSEPR Notation electron Repulsion! The Cs do not contain any lone pairs of electrons and three bond pairs and lone... All differ 8.34 kJ/mol using the valence shell electron pair Repulsion ( VSEPR.... Vs electron geometry and its molecular geometry is trigonal pyramidal bond angles in real molecules $\pi$ are! To real molecules thus the lone pairs of electrons = 3 and molecular geometries would be same!

Pigeon Control Products, Uwc Part Time Courses, Gunung Jerai Hotel, Knox Basketball Registration Form, Star Wars: The Clone Wars R2 Come Home, Goblin Tinkerer Not Spawning, Deadpool Quotes Imdb,


text:
Select Page

Question:

True/False?

Every differentiable function $$f:(0,1)\to [0,1]$$ is uniformly continuous.

Hint:

$$sin(1/x)$$ is not uniformly continuous. However, range is not [0,1]. But its a simple matter of scaling.

Discussion:

Let $$f(x)=sin(\frac{1}{x})$$ for all $$x\in(0,1). For simplicity, we first prove that this f is not uniformly continuous. Then we will scale things down, which won’t change the non-uniform continuity of f. Note that f is differentiable. To show that f is not uniformly continuous, we first note that as \(x$$ approaches 0, $$1/x$$ goes through an odd multiple of $$\frac{\pi}{2}$$ to an even multiple of  (\frac{\pi}{2}\) real fast. So in a very small interval close to 0, I can find two such points which gives value 1 and 0.

Let $$x=\frac{2}{(2n+1)\pi}$$ and $$y=\frac{2}{2n\pi}$$.

Then $$|x-y|=\frac{2}{2n(2n+1)\pi}$$.

Since the right hand side of above goes to zero as n increases, given any $$\delta > 0$$ we can find n large enough so that $$|x-y|<\delta$$. For these x and y, $$|f(x)-f(y)|=1$$.

Of course, choosing $$\epsilon$$ as any positive number less than 1 shows that f is not uniformly continuous.

We have with us a function $$f$$ which is bounded, differentiable and not uniformly continuous.

To match with the questions requirements, notice $$-1\le f(x)\le 1$$.

So $$0\le 1+f(x) \le 2$$. And $$0\le \frac{1+f(x)}{2} \le 1$$.

Define $$g(x)= \frac{1+f(x)}{2}$$ for all $$x\in(0,1)$$.

Since sum of two uniformly continuous functions is uniformly continuous and a scalar multiple of uniformly continuous function is uniformly continuous, if $$g(x)$$ was uniformly continuous, then $$f(x)=2g(x)-1$$ would also be uniformly continuous.

Which proves that g is in fact not uniformly continuous. It is still differentiable, and range is $$[0,1]$$, which shows that the given statement is actually false.

format: plain


text:
## Abstract

This paper describes the inclusion of variable gas properties within a Reynolds average Navier-Stokes solver for turbomachinery and its application to multistage turbines. Most current turbomachinery computational fluid dynamics (CFD) models the gas as perfect with constant specific heats. However, the specific heat at constant pressure $CP$ can vary significantly. This is most marked in the turbine where large variations of temperature are combined with variations in the fuel air ratio. In the current model $CP$ is computed as a function of the local temperature and fuel air ratio using polynomial curve fits to represent the real gas behavior. The importance of variable gas properties is assessed by analyzing a multistage turbine typical of the core stages of a modern aeroengine. This calculation includes large temperature variations due to radial profiles at inlet, the addition of cooling air, and work extraction through the machine. The calculation also includes local variations in fuel air ratio resulting from the inlet profile and the dilution of the mixture by the addition of coolant air. A range of gas models is evaluated. The addition of variable gas properties is shown to have no significant effect on the convergence of the algorithm, and the extra computational costs are modest. The models are compared with emphasis on the parameters of importance in turbine design, such as capacity, work, and efficiency. Overall the effect on turbine performance prediction of including variable gas properties in three-dimensional CFD is found to be small.

1.
Denton
,
J. D.
, 1990, “
The Calculation of Three Dimensional Viscous Flow Through Multistage Turbomachines
,” ASME Paper No. 90-GT-19.
2.
Shahpar
,
S.
, 2001, “
Three-Dimensional Design and Optimisation of Turbomachinery Blades Using the Navier-Stokes Equations
,” ISABE-2001-1053.
3.
Batchelor
,
G. K.
, 1967,
An Introduction to Fluid Dynamics
,
CUP
, Cambridge, UK, pp.
37
43
.
4.
U. S. Standard Reference Data System
, 1971,
JANAF Thermochemical Tables
, 2nd ed., NSRDS-NBS 37, U.S. Department of Commerce.
5.
Cumpsty
,
N.
, 2003,
Jet Propulsion
, 2nd ed.,
CUP
, Cambridge, UK, p.
65
.
6.
Boncinelli
,
P.
,
Rubechini
,
F.
,
Arnone
,
A.
,
Cecconi
,
M.
, and
Cortese
,
C.
, 2004, “
Real Gas Effects in Turbomachinery Flows: A Computational Fluid Dynamics Model for Fast Computations
,” ASME Paper No. 2003-GT-38101.
7.
Yao
,
Y.
, and
Amos
,
I.
, 2004, “
Numerical Study of Axial Turbine Flow with Variable Gas Property
,” ASME Paper No. GT2004-53748.
8.
Moore
,
J. G.
, 1989, “
Pressure Correction Calculation Procedures for 3D Viscous Flow
,”
Numerical Methods for Flows in Turbomachinery
(VKI Lecture Series No. 1989-06),
von Karmen Institute for Fluid Dynamics
,
Rhode-Saint-Genese, Belgium
.
9.
Moore
,
J. G.
, 1989, “
Calculation of 3D Flow Without Numerical Mixing
,”
Numerical Methods for Flows in Turbomachinery
(VKI Lecture Series No. 1989-06),
von Karmen Institute for Fluid Dynamics
,
Rhode-Saint-Genese, Belgium
.
10.
Patankar
,
S. V.
, 1980,
Numerical Heat Transfer and Fluid Flow
,
Hemisphere
, Washington, DC, pp.
131
134
.
11.
Northall
,
J. D.
,
Moore
,
J. G.
, and
Moore
,
J.
, 1987, “
Three-Dimensional Viscous Flow Calculations for Loss Prediction in Turbine Blade Rows
,” Paper No. C267, I. Mech. E. Conf. On Turbomachinery — Efficiency Prediction and Improvement.
12.
Robinson
,
C. J.
,
Northall
,
J. D.
, and
McFarlane
,
C. W. R.
, 1989, “
Measurement and Calculation of the Three-Dimensional Flow in Axial Compressor Stators, With and Without End-Bends
,” ASME Paper No. 89-GT-6.
13.
Chew
,
J. W.
,
Taylor
,
J. W.
, and
Bonsell
,
J. J.
, 1996, “
CFD Developments for Turbine Heat Transfer
,” Paper No. C449/035, I. Mech. E. Conf.
14.
Crawford
,
M. E.
,
Kays
,
W. M.
, and
Moffat
,
R. J.
, 1980, “
Full-coverage Film Cooling, Part 2: Heat Transfer Data and Numerical Simulation
,” ASME Paper No. 80-GT-44.
15.
Cobell
,
P. A.
, 1996, “
Computer Programmers Guide For The BS09/BS29 - RRAP Compatible Thermodynamic Subroutines — Issue 7
,” CUG BS09, Rolls-Royce plc Internal Report, Derby, UK.
16.
Geist
,
A.
,
Beguelin
,
A.
,
Dongarra
,
J.
,
Jiang
,
W.
,
Manchek
,
R.
, and
Sunderam
,
V.
, 1994,
PVM: Parallel Virtual Machine A User’s Guide and Tutorial for Networked Parallel Computing
,
MIT Press
, Cambridge, MA.


text:
### Cross validation in sparse linear regression with piecewise continuous nonconvex penalties and its acceleration

We investigate the signal reconstruction performance of sparse linear regression in the presence of noise when piecewise continuous nonconvex penalties are used. Among such penalties, we focus on the smoothly clipped absolute deviation (SCAD) penalty. The contributions of this study are three-fold: We first present a theoretical analysis of a typical reconstruction performance, using the replica method, under the assumption that each component of the design matrix is given as an independent and identically distributed (i.i.d.) Gaussian variable. This clarifies the superiority of the SCAD estimator compared with $\ell_1$ in a wide parameter range, although the nonconvex nature of the penalty tends to lead to solution multiplicity in certain regions. This multiplicity is shown to be connected to replica symmetry breaking in the spin-glass theory, and associated phase diagrams are given. We also show that the global minimum of the mean square error between the estimator and the true signal is located in the replica symmetric phase. Second, we develop an approximate formula efficiently computing the cross-validation error without actually conducting the cross-validation, which is also applicable to the non-i.i.d. design matrices. It is shown that this formula is only applicable to the unique solution region and tends to be unstable in the multiple solution region. We implement instability detection procedures, which allows the approximate formula to stand alone and resultantly enables us to draw phase diagrams for any specific dataset. Third, we propose an annealing procedure, called nonconvexity annealing, to obtain the solution path efficiently. Numerical simulations are conducted on simulated datasets to examine these results to verify the consistency of the theoretical results and the efficiency of the approximate formula and nonconvexity annealing.

### Extensions of a Theory of Networks for Approximation and Learning: Outliers and Negative Examples

Bruno Caprile I.R.S.T. Povo, Italy, 38050 Learning an input-output mapping from a set of examples can be regarded as synthesizing an approximation of a multidimensional function.

### Evaluating WordNet Features in Text Classification Models

Incorporating semantic features from the WordNet lexical database is among one of the many approaches that have been tried to improve the predictive performance of text classification models. The intuition behind this is that keywords in the training set alone may not be extensive enough to enable generation of a universal model for a category, but if we incorporate the word relationships in WordNet, a more accurate model may be possible. Other researchers have previously evaluated the effectiveness of incorporating WordNet synonyms, hypernyms, and hyponyms into text classification models. Generally, they have found that improvements in accuracy using features derived from these relationships are dependent upon the nature of the text corpora from which the document collections are extracted. In this paper, we not only reconsider the role of WordNet synonyms, hypernyms, and hyponyms in text classification models, we also consider the role of WordNet meronyms and holonyms. Incorporating these WordNet relationships into a Coordinate Matching classifier, a Naive Bayes classifier, and a Support Vector Machine classifier, we evaluate our approach on six document collections extracted from the Reuters-21578, USENET, and Digi-Trad text corpora. Experimental results show that none of the WordNet relationships were effective at increasing the accuracy of the Naive Bayes classifier. Synonyms, hypernyms, and holonyms were effective at increasing the accuracy of the Coordinate Matching classifier, and hypernyms were effective at increasing the accuracy of the SVM classifier.

### Related Datasets in Oracle DV Machine Learning models

Depending on the algorithm/model that generates this dataset metrics present in the dataset will vary. Here is a list of metrics based on the model: Linear Regression, CART numeric, Elastic Net Linear: R-Square, R-Square Adjusted, Mean Absolute Error(MAE), Mean Squared Error(MSE), Relative Absolute Error(RAE), Related Squared Error(RSE), Root Mean Squared Error(RMSE) CART(Classification And Regression Trees), Naive Bayes Classification, Neural Network, Support Vector Machine(SVM), Random Forest, Logistic Regression: Now you know what the Related datasets are and how they can be useful for fine tuning your Machine Learning model or for comparing two different models. .


text:
## Archive for the ‘LingPipe in Use’ Category

### “Academic” Licenses, GPL, and “Free” Software

November 3, 2011

[This post repeats a long comment I posted about licensing in response to Brendan O'Connor's blog entry, End-to-End NLP Packages. Brendan's post goes over some packages for NLP and singles out LingPipe as being only “quasi free.”]

Some of those other packages, like C&C Tools and Senna, are in the same “quasi free” category as LingPipe in the sense that they’re released under what their authors call “non-commercial” licenses. For instance, none of the Senna, C&C, or LingPipe licenses are compatible with GPL-ed code. Senna goes so far as to prohibit derived works altogether.

### The LingPipe License

The intent for the

was a little different from the “academic use only” licenses in that we didn’t single out academia as a special class of users. We do allow free use for research purposes for industrialists and academics alike. We also provide a “developers” license that explicitly gives you this right, which makes some users’ organizations feel better.

### Truly Free NLP Software

The other tools, like NLTK, Mallet, OpenNLP, and GATE are released under more flexible licenses (LGPL, Apache or BSD), which I really do think of as being truly “free”. Mahout’s also in this category, though not mentioned by Brendan, whereas packages like TreeTagger are more like Senna or C&C in their restrictive “academic only” licensing.

### Stanford and the GPL

Stanford NLP’s license sounds like it was written by someone who didn’t quite understand the GPL. Their page says (the link is also theirs):

The Stanford CoreNLP code is licensed under the full GPL, which allows its use for research purposes, free software projects, software services, etc., but not in distributed proprietary software.

Technically, what they say is true. It would’ve been clearer if they’d replaced “research” with “research and non-research” and “free” with “free and for-profit”. Instead, their choice of examples suggests “free” or “research” have some special status under the GPL, which they don’t. With my linguist hat on, I’d say their text leads the reader to a false implicature. The terms “research” and “academia” don’t even show up in the GPL, and although “free” does, GNU and others clarify this usage elswewhere as “free as in free speech”, not “free as in free beer”.

### Understanding the GPL

The key to understanding the GPL lies behind Stanford’s embedded link to

Here, proprietary doesn’t have to do with ownership, but rather with closed source. Basically, if you redistribute source code or an application based on GPL-ed code, you have to also release your code under the GPL, which is why it’s called a “copyleft” or “viral” license. In some cases, you can get away with using a less restrictive license like LGPL or BSD for your mods or interacting libraries, though you can’t change the underlying GPL-ed source’s license.

### GPL Applies to Academics, Too

There’s no free ride for academics here — you can’t take GPL-ed code, use it to build a research project for your thesis, then give an executable away for free without also distributing your code with a compatible license. And you can’t restrict the license to something research only. Similarly, you couldn’t roll a GPL-ed library into Senna or C&C or LingPipe and redistribute them under their own licenses. Academics are often violating these terms because they somehow think “research use only” is special.

### Services Based on GPL-ed Software and the AGPL

You can also set up a software service, for example on Amazon’s Elastic Compute Cloud (EC2) or on your own servers, that’s entirely driven by GPL-ed software, like say Stanford NLP or Weka, and then charge users for accessing it. Because you’re not redistributing the software itself, you can modify it any way you like and write code around it without releasing your own software. GNU introduced the Affero GPL (AGPL), a license even more restrictive than the GPL that tries to close this server loophole for the basic GPL.

### Charging for GPL-ed Code

You can charge for GPL-ed code if you can find someone to pay you. That’s what RedHat’s doing with Linux, what Revolution R’s doing with R, and what Enthought’s doing with Python.

### LingPipe’s Business Model is Like MySQL’s

Note that this is not what MySQL did with MySQL (before they sold it to Oracle) nor is it what we do with LingPipe. In both those cases, the company owns all the intellectual property and copyrights and thus is able to release the code under multiple licenses. This strategy’s explained on the

### Free “Academic” Software

Also, keep in mind that as an academic, your university (or lab) probably has a claim to your intellectual property developed using their resources. Here’s some advice from GNU on that front:

### Discontinuities in ROC Calculations

October 26, 2011

Amaç Herdagdelen brought up some interesting examples on our mailing list that caused LingPipe’s ROC curve (and PR curve) implementation to provide some unexpected (and arguably wrong) results. (We then took the detailed discussion off line, and are now reporting back.)

#### Computing ROC Curves by Sorting

The basic problem is that the computation of an ROC curve involves first sorting the responses by the system’s estimated probability a response should be positive, then incrementally computing sensitivity versus 1 – specificty operating points by working down the ranked list. You can see a worked example in the class documentation for

#### What if there are Ties?

Mike Ross realized there was a problem when you had two examples with the same score, but different reference values. For instance, a system might be looking at two Tweets and estimate a 0.98 probability that both are positive sentiment. If one was classified as positive in the reference (i.e., the gold standard) and the other negative, then there’s a problem. With one order, you get one curve, and with the other order, you get a different curve. Mike figured out we might as well just leave off the intermediate point, because we get to the same operating point after handling both of them.

#### What if there are Near Ties?

Then Amaç wrote back after noticing he had some cases that were very close, but not quite, the same. This comes up with arithmetic precision all the time. In his case, it was different one-versus-all results for a multi-category classifier. He suggested treating two results as the same if they were within some small absolute value of each other. This is the typical thing to do when checking results are the same in unit tests (or code) — it’s built into junit for Java and googletest for C++.

#### Discretized ROC Curve Estimates are Discontinuous

That led me (Bob) to realize that the real problem is that these measures are discontinuous in the underlying scores. Suppose I have three items, A, B and C, with true values POS, NEG, and POS. Now if I have assigned scores to them of 0.97, 0.96, and 0.98, I get a curve based on the sequence TP, TP, FP, or a perfect score. I get the same reslt as the score for B moves from 0.96 to any value less than 0.97. But at the point it crosses 0.97, I wind up with a sequence TP, FP, TP, which is a whole different story.

The upshot is that area under the ROC curve (or PR curve) is not continuous in the underlying scores.

#### Help? Should we Probabilistically Smooth?

Does anyone have any idea what we should do here?

I’m thinking moving to some kind of probabilistic version might be able to smooth things out in a well-defined way. For instance, if I add normally-distributed noise around each point and then integrate it out, things are smooth again.

### Domain Adaptation with Hierarchical Logistic Regression

September 29, 2011

Last post, I explained how to build hierarchical naive Bayes models for domain adaptation. That post covered the basic problem setup and motivation for hierarchical models.

### Hierarchical Logistic Regression

Today, we’ll look at the so-called (in NLP) “discriminative” version of the domain adaptation problem. Specifically, using logistic regression. For simplicity, we’ll stick to the binary case, though this could all be generalized to K-way classifiers.

Logistic regression is more flexible than naive Bayes in allowing other features (aka predictors) to be brought in along with the words themselves. We’ll start with just the words, so the basic setup look more like naive Bayes.

#### The Data

We’ll use the same data representation as in the last post, with $D$ being the nubmer of domains, with $I_d$ docs in domain $d$. Document $i$ in domain $d$ will have $N[d,i]$ tokens. We’ll assume $V$ is the size of the vocabulary.

Raw document data provides a token $x[d,i,n] \in 1{:}V$ for word $n$ of document $i$ of domain $d$. Assuming a bag-of-words representation like we used in naive Bayes, it’ll be more convenient to convert each document into a word frequency vector $u[d,i]$ of dimensionality $V$. To match naive Bayes, define a word frequency vector $u[d,i]$ with value at word (or intercept) $w$ given by

$u[d,i,w] = \sum_{n = 1}^{N[d,i]} \mathbb{I}(x[d,i,n] = w)$,

where $\mathbb{I}(\phi)$ is the indicator function, taking on value 1 if $\phi$ is true and 0 otherwise. Now that we have continuous data, we could transform it using something like TF/IDF weighting. For convenience, we’ll prefix an intercept predictor $1$ to each vector of predictors $u[d,i]$. Because it’s logistic regression, other information like the source of the document may also be included in the predictor vectors.

The labeled training data consists of a classification $z[d,i] \in \{ 0, 1 \}$ for each document $i$ in domain $d$.

#### The Model, Lower Level

The main parameter to estimate is a coefficient vector $\beta[d]$ of size $V + 1$ for each domain $d$. Here, the first dimension will correspond to the intercept and the other dimensions each correspond to a word in the vocabulary.

The probabilty that a given document is of category 1 (rather than category 0) is given by

$\mbox{Pr}[z[d,i] = 1] = \mbox{logit}^{-1}(\beta[d]^T u[d,i])$.

The inner (dot) product is just the sum of the dimensionwise products,

$\beta[d]^T u[d,i] = \sum_{v = 0}^V \beta[d,v] \times u[d,i,v]$.

This value, called the linear prediction, can take values in $(-\infty,\infty)$. The logistic sigmoid function

$\mbox{logit}^{-1}(x) = 1/(1 + \exp(-x))$

maps the unbounded linear prediction to the range $(0,1)$, where it is taken to represent the probabilty that the category $z[d,i]$ of document $i$ in domain $d$ is 1.

In sampling notation, we define the category as being drawn from a Bernoulli distribution with parameter given by the transformed predictor; in symbols,

$z[d,i] \sim \mbox{\sf Bern}(\mbox{logit}^{-1}(\beta[d]^T u[d,i])$.

Unlike naive Bayes, logistic regression model does not model the word data $u$, instead treating it as constant.

#### The Model, Upper Levels

We are treating the coefficient vectors as estimated parameters, so we need a prior for them. We can choose just about any kind of prior we want here. We’ll only consider normal (Gaussian, L2) priors here, but the Laplace (L1) prior is also very popular. Recently, statisticians have argued for using a Cauchy distribution as a prior (very fat tails; see Gelman et al.’s paper) or combining L1 and L2 into a so-called elastic net prior. LingPipe implements all of these priors; see the documentation for regression priors.

Specifically, we are going to pool the prior across domains by sharing the priors for words $v$ across domains. Ignoring any covariance for the time being (a bad idea in general, but it’s hard to scale coveriance to NLP-sized coefficient vectors), we draw the component for word $v$ of the coefficients for domain $d$ from a normal distribution,

$\beta[d,v] \sim \mbox{\sf Normal}(\mu[v],\sigma[v]^2)$.

Here $\mu[v]$ represents the mean value of the coefficient for word (or intercept) $v$ across domains and $\sigma[v]^2$ is the variance of the coefficient values across domains. A strong prior will have low variance.

All that’s left is to provide a prior for these location and scale parameters. It’s typical to use a simple centered normal distribution for the locations, specifically

$\mu[v] \sim \mbox{\sf Normal}(0,\tau^2)$,

where $\tau^2$ is a constant variance parameter. Typically, the variance $\tau^2$ is set to a constant to make the entire prior on the means weakly informative. Alternatively, we could put a prior on $\tau$ itself.

Next, we need priors for the $\sigma[v]$ terms. Commonly, these are chosen to be inverse $\chi^2$ (a specific kind of inverse gamma distribution) distributions for convenience because they’re (conditionally) conjugate. Thus the typical model would take the variance $\sigma[v]^2$ to be the parameter, giving it an inverse gamma prior,

$\sigma[v]^2 \sim \mbox{\sf InvGamma}(\alpha,\beta)$.

Gelman argues against inverse gamma priors on variance because they have pathological behavior when the hierarchical variance terms are near zero.
Gelman prefers the half-Cauchy prior, because it tends not to degenerate in hierarchical models like the inverse gamma can. The half Cauchy is just the Cauchy distribution restricted to positive values (thus doubling the usual density, but restricting support to non-negative values). In symbols, we generate the deviation $\sigma[v]$ (not the variance) using a (non-negative) Half-Cauchy distribution:

$\sigma[v] \sim \mbox{HalfCauchy}()$.

And that’s about it. Of course, you’ll need some fancy-pants software to fit the whole thing, but it’s not that difficult to write.

### Properties of the Hierarchical Logisitic Regression Model

Like in the naive Bayes case, going hierarchical means we get data pooling (or “adaptation” or “transfer”) across domains.

One very nice feature of the regression model follows from the fact that we are treating the word vectors as unmodeled predictors and thus don’t have to model their probabilities across domains. Instead, the coefficient vector $\beta[d]$ for domain $d$ only needs to model words that discriminate positive (category 1) from negative (category 0) examples. Thus the correct value for $\beta[d,v]$ for a word $v$ is 0 if the word does not discriminate between positive and negative documents. Thus our hierarchical hyperprior has location 0 in order to pull the prior location $\mu[v]$ for each word $v$ to 0.

The intercept is just acting as a bias term toward one category or the other (depending on the value of its coefficient).

### Comparison to SAGE

If one were to approximate the full Bayes solution with maximum a posteriori point estimates and use Laplace (L1) priors on the coefficients,

$\beta[d,v] \sim \mbox{\sf Laplace}(\mu[d],\sigma[d]^2)$

then we recreate the regression counterpart of Eisenstein et al.’s hybrid regression and naive-Bayes style sparse additive generative model of text (aka SAGE).

Eisenstein et al.’s motivation was to represent each domain as a difference from the average of all domains. If you recast the coefficient prior formula slightly and set

$\beta[d,v] = \alpha[d,v] + \mu[d]$

and sample

$\alpha[d,v] \sim \mbox{Laplace}(0,\sigma[d]^2)$

you’ll see that if the variance term $\sigma[d]$ is low enough, many of the $\alpha[d,v]$ values will be zero. Of course, in a full Bayesian approach, you’ll integrate over the uncertainty in $\alpha$, not set it to a point estimate of zero. So sparseness only helps when you’re willing to approximate and treat estimates as more certain than we have evidence for. Of course, resarchers do that all the time. It’s what LingPipe’s logistic regression and CRF estimators do.

Presumably, the values of coefficients have will have non-negligible covariance. That is, I expect words like “thrilling” and “scary” to covary. For thriller movies, they’re positive sentiment terms and for appliances, rather negative. The problem with modeling covariance among lexical items is that we usually have tens of thousands of them. Not much software can handle a 10K by 10K matrix.

Another way to add covariance instead of using a covariance model for “fixed effects” is instead convert to random effects. For instance, a model like latent Dirichlet allocation (LDA) models covariance of words by grouping them into topics. For instance, two words with high probabilities in the same topic will have positive covariance.

I’m a big fan of Gelman and Hill’s multilevel regression book. You definitely want to master that material before moving on to Gelman et al.’s Bayesian Data Analysis. Together, they’ll give you a much deeper understanding of the issues in hierarchical (or more generally, multilevel) modeling.

### Buffering Exceptions

August 16, 2011

OK, now that it’s just us API fanatics, imagine you need to call a stream read in an interface method implementation, but the interface doesn’t declare an I/O exception. For concreteness, suppose we have an interface:

interface Foo {
public void bar();
}

and we want to implement a Foo that calls streaming I/O, as in:

public class IOFoo implements Foo {
public void bar() {
InputStream in = ...;
...
int numBytes = in.read(buf); // throws IOException
}
}

A common example is the Java interface Runnable, which has a run() method which does not throw exceptions. Given that this is the basis for threads, the issue comes up all the time.

This won’t compile, because the call to the read method throws an I/O exception, which is a checked exception that is not declared on the run method. In fact, it can’t be declared on the run method, because the interface doesn’t declare an I/O exception. What I too often see is this broken workaround:

        int numBytes = -1;
try {
} catch (IOException e) {
throw new RuntimeException(e);
}

What’s wrong here? There’s no way for anyone calling the bar() method to recover the exception and handle it. You could document that it throws a RuntimeException, but all kinds of problems can lead to a runtime exception being thrown, and there’s no way to tell which threw it. (Yes, you could encode it in the message, but that’s an even worse idea, as it’s very hard to maintain and code against.)

An alternative approach is to follow the pattern used by Java’s PrintWriter class and buffer the exception then make it available to the caller. Here’s a simplified example that buffers a single exception:

public class IOFoo implements Foo {
private IOException mException;
public void bar() {
InputStream in = ...;
...
try {
in.read(); // throws IOException
} catch (IOException e) {
mException = e;
return;
}
}
public IOException getIOException() {
return mException;
}
}

That way, a caller can do this:

IOFoo f = new IOFoo(...);
f.run();
if (f.getIoException() != null)
throw (f.getIOException());

Now the context around the call to IOFoo’s run can catch the IOException. For instance, if this is in a method call, you can just declare the method to throw the checked IOException. Note that we need to declare f as an IOFoo, not just a Foo, because we call its getIOException method.

Java’s PrintWriter keeps a list of exceptions that have been raised in calls to its methods. That’s because it keeps going after exceptions, assuming the client would rather they be silently ignored. I don’t think that’s such a great idea, for the obvious reason that there’s no telling what’s going to happen when I/O exceptions are just ignored.

It would be straightforward to set a flag that stops any further action once an exception has been raised.

The case I was actually using this in was for was writing a static method to serialize a tokenized language model. Visiting the n-grams requires an IntArrayHandler whose handle method is not declared to throw any checked exceptions. I wanted any embedded exception to be buffered and thrown by the top-level static method.

### “Sentiment Takes a LONG Time”, Said the Logistic Regression Classifier

August 12, 2011

Hello again, fellow LingPipers!  It is I, yet again, Sam The Intern.  In my last (and first) post I promised the masses that I would return with a study similar to the last one that I conducted, but this time doing the non-trivial case of sentiment.  It turns out that this aspiration ended up being nothing more than a (Ling)Pipe-dream.  As my titular character, the logistic regression classifier so concisely said before, sentiment takes a long time!  And, with this being my last week at LingPipe, I will not have enough time to give our logistic regression classifiers the attention and whispered sweet nothings that they require to function properly.

As you may remember from my first post, I absolutely love to annotate.  However, annotating for sentiment takes much more time than language identification, because the annotator needs to internalize and judge the text, not just glance at it.  Add to this the fact that the sentiment classifier requires much more training data than the language identification classifier, and you have yourself an intern that has been product-conditioned to Coca-Cola, but no time to do anything about it (reading 1000 tweets about how much people love coke will do that to you).

I was able to start the study, with small amounts of success.  The following confusion matrix is the result of  a 10-fold cross-validation run across all of the data that I had time to annotate (about 1000 tweets each for “Clinton”, “Coke”, and “Gaga”).  The top of the chart is the reference data which I annotated, and the side is the response data that the classifier provided.  The categories are: w = neutral, e = positive, q = negative.

   w    e   q
w 1244,239,50
e 313 ,312,23
q 199 ,45 ,23

I wish that I had more time to spend on the sentiment classification problem.  Perhaps I will be back next summer, to continue the effort to teach computers good from bad.  Until then, I will be at Rochester, college-ing!  And drinking massive quantities of Coke…

### LingPipe and JDK 7

July 28, 2011

[Update: 29 July 2011: Thanks to Dean Jones for pointing out that our friends at Lucid Imagination have found a deal-breaking bug in the initial JDK 7's optimization of loops. Here's the scoop from the source:

In any case, we won't be using any of the JDK 7 features in LingPipe until JDK 6 is retired.]

Oracle (seems odd to say that) just released version 7 of the Java developers kit, aka JDK 7.

### What’s in JDK 7?

I haven’t been following what was going into JDK 7. I found this comprehensive list of changes:

This includes Project Coin, which involved changes to the language itslef. These are summarized nicely with examples at:

There were also changes to add module structure, some concurrency changes, some new I/O (nio) changes, support for Unicode 6 in internationalization, support for the latest XML, a new version of JDBC, a bunch of changes to Swing, and some changes to things like cryptography that I didn’t even know were in Java in the first place.

### LingPipe Compatibility

The good news is that LingPipe seems to work just fine with Java 7. At least all of our unit tests pass.

There are a couple new compiler warnings. Variable list arguments (i.e., varargs) and generics don’t play nicely together. This should be obvious from the fact that varargs use an array and you can’t have generic arrays. So now I get very menacing error messages like

warning: [unchecked] Possible heap pollution from parameterized vararg type E

I’m a bit surprised they didn’t add this warning earlier, as it seems like a well understood and commonly made mistake. There’s a nice discussion of the underlying problem due to type erasure and arrays here:

And also a very nice discussion with great examples here:

From Kalanger’s discussion, I realized everywhere I got these errors was actually safe as the arrays in question didn’t persist beyond the scope of the function body where the user couldn’t get at them.

### “Language ID”, Said the NGram Process Dynamic Language Model Classifier…

July 25, 2011

Hi, there! My name is Sam Brown, and I’m a summer intern here at LingPipe. I’m from Eastchester, NY, and I’m a rising sophomore in the University of Rochester Biomedical Engineering Department.

I’ve been interning at LingPipe’s luxuriously airconditioned headquarters for about a month and a half now. After barely learning Java and some of the LingPipe API in the span of about a week, my slavemaster…rather…boss Breck thought it would be a great idea if I could publish a three-part Java-based computational linguistics experiment exploring the relative performances of generic and customized classifiers for language identification.

And then he told me this is the trivial case.

Since I hardly understood the objective myself, even after Breck kindly spelled it out for me about 50 times, let me try and explain the experiment. Language model classifiers can be used to sort test data (like a bunch of tweets retrieved from Twitter using a query like “Gaga”) into two categories (in my case English, and Non-English). These classifiers, of course, need to be trained on annotated data (tweets collected from Twitter that we sort for the computer) before they can be useful. This is where my experiment’s problem comes in; Is it better to make a custom classifier that is trained on data similar to the test data (a set of tweets different from the test data, but also retrieved using the query “Gaga”), or to train a generic classifier on data that comes from a variety of sources (a collection of tweets from the queries “Coke, “Clinton”, etc.)? What we found is that, based on the input and test data, either classifier may do better at language identification depending on the circumstances.

Data:

Before we could start the experiment, we first needed to collect our data from Twitter. For each of our five queries, 1500 tweets were retrieved from Twitter, and duplicates were removed from this data by requiring a Jaccard distance of .5 or less between any two tweets. The effect of this is that any tweet with more than 50% token (word) overlap with any other tweet in the accepted data collection was rejected from the corpus (our collection of tweets to be used in the experiment).

After that came my absolute favorite part; Annotation. I annotated 500 tweets for being written in English (‘e’) or non-English (‘x’), for 5 queries (for a total of 2,500 tweets). These annotated tweets comprised our first epoch of data. As if that wasn’t enough fun, we reran the 5 queries again two weeks later, and annotated these as well to form the second epoch of data (for a cumulative total of 5000 tweets). We checked if there were duplicates between the two Twitter retrievals by using the Jaccard distance between any two given tweets to decide if they were identical.

To form a baseline to compare our final results to, I needed to find an interannotator agreement rate. My lovely girlfriend very nicely (and possibly naively) agreed to annotate some of the data.  She annotated 400 tweets of each query in the second epoch of data, all of which overlapped with data that I annotated as well. A program was then used to find the precision and recall between my annotations and hers. The agreement rate was 95% precision and 97% recall with confidence .01% with one annotator serving as truth and the other the response (thereby proving that she knows English 5% ± .01% better than me). For evaluation purposes the annotations were adjudicated resulting in complete agreement.

Process:

Part 1: Evaluation of Customized Language Classifier

We created a custom language model classifier by training it on data retrieved from Twitter using one of our queries, like “Gaga”. To do this, we first loaded all of the annotated training tweets for that query into the training section of a corpus. We then loaded the annotated testing tweets into the test section of the corpus. This created a corpus of 1000 tweets, 500 each for training and testing. The testing and training tweets were both retrieved from Twitter using the same query at different times.

As the title character in today’s adventure, our friendly neighborhood nGram boundary language model classifier was used to train and test on the corpus. Because nGram boundary classifiers are sensitive to nGram size (the size of the chunk of characters in a tweet that the classifier being trained actually sees), it trained and tested on the data with nGram sizes 1 through 15.

After each test, the classifier was given to a joint classifier evaluator. This evaluator was used to record the one-versus-all data for each category (precision, recall, and f-measure), as well as calculate the micro-averaged f-measure. The micro-averaged f-measure was used for quantitative comparison between classifiers.

This procedure was repeated for each of the five Twitter queries.

Part 2: Evaluation of Generic Language Classifier

We created a generic language model classifier by training it on data retrieved from Twitter using the same queries as the customized experiment. The difference between the custom and generic classifiers is that, in the generic classifier, the testing and training tweets were retrieved using different queries. Because each set of data included 500 tweets, the total amount of data that we had was 5,000 tweets. For any given query, the training data consisted of all the other data minus the 500 tweets of data to be tested on and 500 tweets of data that was retrieved at an earlier epoch with the same query. All of this data, which contained a total of 4000 tweets for any given test data, was put into a list. Five-hundred tweets were then randomly selected from this list and entered into the training section of the corpus. We then loaded the annotated testing tweets into the testing section of the corpus, and trained and tested the corpus using the same nGram looping structure as we did in the customized training process.

After each test, we evaluated the classifier in the same way that we did for the custom classifier. This procedure was repeated for each of the five Twitter queries.

Part 3: Evaluation of the Effect of Corpus Size On a Generic Classifier

A generic classifier was trained on data from a variety of different sources, as described above. However, the size of the corpus was increased incrementally after each training and testing experiment. This was done by nesting the nGram looping structure inside of the corpus size looping structure. The evaluator returned the best micro-averaged f-measure after each corpus size increase, and this was graphed against corpus size.

Results:

Part 1

For each of the five queries that we tested, the custom classifier had an f-measure that ranged from 80% to 95%. For four out of the five queries, the English classifications performed better than the non-english. However, on the query “Mitsubishi”, the non-english classifications performed better. Out of the four queries in which English performed better, two queries (“Clinton”(Fig. 1) and “Coke” (Fig. 2)) had significantly higher f-measures for the English than the non-English.

Figure 1 - Clinton Generic

Figure 2 - Coke Generic

Figure 2 New

Figure 3 - Gaga Generic

Figure 4 NEW

Figure 4 - Mitsubishi Generic

Figure 5 - Wiener Generic

Part 2

For each of the five queries, the generic classifier had an f-measure that ranged from 70% to 95%

Part 2.5

We put the micro-averaged f-measures for the generic and custom classifiers for each query on the same graph of F-Measure versus NGram size. For two of the queries (“Clinton” (Fig. 6) and “Coke” (Fig. 7)), the custom and generic classifiers performed about equally for an nGram size of 4. For two of the remaining queries (“Gaga” (Fig. 8) and “Wiener” (Fig. 10)), the custom classifier outperformed the generic. For the final query (“Mitsubishi” (Fig. 9)), the generic classifier outperformed the custom.

Figure 6 - Clinton Generic vs. Custom

Figure 7 - Coke Generic vs. Custom

Figure 8 - Gaga Generic vs. Custom

Figure 9 - Mitsubishi Generic vs. Custom

Figure 10 - Wiener Generic vs. Custom

The experiment was run again (at nGram size 4),  50 times.  The sample mean of these experiments’ f-measures were graphed, with a 95% confidence error bar (Figures 11 and 12).

Figure 11 - Non-English Classifier Comparrison

Figure 12 - English Classifier Comparrison

Part 3

When we graphed the generic classifiers’ performance versus the size of the of the training data, we found that the English classifications’ F-Measure increased slightly over increased training data. Non-English classifications’ F-Measure increased dramatically over increased training data. (Fig. 13).

Figure 13 - Clinton Generic Performance Graph (on a logarithmic scale)

We graphed the size of the English portion of the corpus versus the English F-Measure (and did the same with the Non-English), and found that English classifications performed better at low category-corpus sizes than Non-English did (Figs. 14 & 15).

Figure 14 - Coke Category Performance

Figure 15 - Mitsubishi Category Performance

Discussion:

Parts 1+2

We came to the conclusion that neither generic nor customized training regimens are necessarily better than the other because each one performed better in different circumstances. We believe that the Non-English classifications for Mitsubishi scored higher than the English classifications because the Non-English category was larger than the English category, and also it was very coherent (with mostly asian writing, so that each category has either Roman characters or Asian characters). We believe that “Clinton” and “Coke” had much higher English F-Measures than the others because these two queries produce the most English tweets.

Parts 3

We believe that the English classifications performed better than the non-English classifications, especially at low corpus sizes, because the makeup of the English training data is more coherent. Because there are many different, seemingly unrelated attributes that define the broad Non-English category, it’s difficult for the classifier to identify what makes a tweet Non-English at low corpus-sizes. This also explains why the classifier is better at identifying English tweets, even at equal category sizes.

Our data balance for each test are as follows (for the generic classifiers, the balance of the 4000 tweet list is shown):

Custom Data Distribution

Generic Data Distribution

And that’s my first experiment in computational linguistics! Anyone who would like to throw money at me for this monumental achievement may do so liberally. Otherwise, look forward to my next experiment, the not-so-trivial case, Sentiment!! (perhaps THAT will convince you to throw money at me!) Until then, I will be annotating. A lot. My favorite!

### Sorting Primitive Types in Java

July 14, 2011

One of the big pains of Java is the lack of built-in collection-like utilities for primitive types like int. As a result, you need to box all the integers, which leads to huge bloat in terms of size, and because of memory locality and dereferencing issues, a huge slowdown to boot.

Oddly, more than one person at ICML told me they were impressed with IBM’s tuning on Watson (their champion-level Jeopardy! playing system Breck blogged about recently) because they reimplemented search and sorting!

C’mon people, this isn’t that hard. In fact, as I was telling our intern today, it’s basic CS 101. At least it was back in the 1980s when I was an undergrad. I have no idea what the kids are up to these days.

### Primitive int Sorts for LingPipe Suffix Arrays

As I was implementing suffix arrays for LingPipe 4.1, I realized I’d need to implement sorting over primitive int types for both efficiency and scalability. So I designed everything to let me plug in a better sort implementation when I got some time. Well, I got some time today, so here goes.

It’s also not that rare a problem. There are open-source primitive collection libs available from GNU Trove (GPL, of course). And while not geared toward sorting, there’s the Apache Primitives lib which gives you collection-like behavior with primitives (also something LingPipe could benefit from in several places).

### Gift Horses and Strings

Ah, the GPL. It giveth and it taketh away.

In general, one shouldn’t look a gift horse in the mouth. But what if there are strings attached? (Sorry, but I just love mixed metaphors, even if they are rather fixed idioms; I laugh out loud at the New Yorker “block that metaphor” quotes from news sources.)

We can hardly drop GPL-ed code into LingPipe (in fact, as of many years ago, at the behest of our customers, we removed all code dependencies from LingPipe, except for Java itself). So that means it’s time to saddle up (hard to turn off that metaphor machine) and write some really low-level code.

I actually find this kind of thing more fun than a slap in the face with a wet fish. (Last one — I just had to drop in a bit of the old litotes).

### Programming Pearls is Your Friend

The best book I’ve ever read on designing algorithms for invariants and then profiling and tuning is:

• Bentley, Jon. 2000. Programming Pearls, 2nd Edition. Addison-Wesley.

It’s so good that Josh Bloch used as the basis for the Java collections, as he outlines in this awesome blog post on a related topic, also related to Bentley’s search algorithms and his own experience as a CS student at CMU where Bentley was teaching:

I just went for Bentley’s qsort4, which is dead easy. It took only half the afternoon to write and unit test the whole thing with random tests, leaving plenty of time for this blog entry (enough rope to hang myself, one might say).

### Show, Don’t Tell

How easy is it? Easy peasey isn’t the half of it. Here’s the code for com.aliasi.util.Sort other than the package declaration and imports and doc.

    public static void isort(int[] x, CompareInt compare) {
for (int i = 0; i < x.length; ++i) {
int t = x[i];
int j = i;
for ( ; j > 0 && compare.lessThan(t,x[j-1]); --j)
x[j] = x[j-1];
x[j] = t;
}
}

public static void qsort(int[] x, CompareInt compare) {
Random random = new Random();
qsortPartial(x,0,x.length-1,compare,random);
isort(x,compare);
}

   static void qsortPartial(int[] x, int lower, int upper,
CompareInt compare,
Random random) {
if (upper - lower < MIN_QSORT_SIZE)
return;
swap(x, lower, lower + random.nextInt(upper-lower+1));
int t = x[lower];
int i = lower;
int j = upper + 1;
while (true) {
do {
++i;
} while (i <= upper && compare.lessThan(x[i],t));
do {
--j;
} while (compare.lessThan(t,x[j]));
if (i > j)
break;
swap(x,i,j);
}
}

public static void swap(int[] xs, int i, int j) {
int temp = xs[i];
xs[i] = xs[j];
xs[j] = temp;
}

public interface CompareInt {
public boolean lessThan(int a, int b);
}

static int MIN_QSORT_SIZE = 7;

Thanks, Jon!

I don’t think this needs much explanation. There’s a comparator-like interface CompareInt to implement comparisons. Bentley’s quicksort uses Robert Sedgewick‘s speedups for worst case via randomization of the pivot. It also uses insertion sort, also shown, for small cases, as it’s faster with memory locality. This is more or less a symbol-by-symbol translation of Bentley’s code, with a general plug-in comparator.

Look for it wherever high quality software is sold (or given away).

### Randomized Unit Tests

I’ve also started moving to more large-scale randomized unit tests. Here’s what I did for testing sorts.

@Test
public void testSort() {
Random random = new Random();
for (int i = 0; i < 129; ++i) {
int[] xs = new int[i];
int[] ys = new int[i];
int[] zs = new int[i];
for (int numTests = 1; numTests < 10; ++numTests) {
randomFill(xs,random);
copy(xs,ys);
copy(xs,zs);
Arrays.sort(xs);
Sort.qsort(ys, Sort.NATURAL_INT_COMPARE);
Sort.isort(zs, Sort.NATURAL_INT_COMPARE);
assertArrayEquals(xs,ys);
assertArrayEquals(xs,zs);
}
}
}

static void randomFill(int[] xs, Random random) {
for (int i = 0; i < xs.length; ++i)
xs[i] = random.nextInt();
}

static void copy(int[] xs, int[] ys) {
for (int i = 0; i < xs.length; ++i)
xs[i] = ys[i];
}

The built-in Sort.NATURAL_INT_COMPARE just implements Sort.CompareInt with the natural sort.

 public static final CompareInt NATURAL_INT_COMPARE
= new CompareInt() {
public boolean lessThan(int a, int b) {
return a < b;
}
};

That’s my afternoon in a nutshell (sorry, just one more (idiom) for the road).

June 16, 2011

### Clean and Small

The data’s super clean. I love it when task organizers take the time to release clean and easy to use data.

I was a bit surprised that there was so little of it, but I suppose this is just the dev data. There’s around 10K judgments from around 200 Mechanical Turkers for a single TREC topic (think query) with relevance labels. There appears to be the usual Turker quantity of noise annotations and a hugely skewed distribution of number of judgments per Turker (with the active Turkers looking more spammy, again as usual).

### Mixed in Gold-Standard Data

One nice twist to the data is that there is also NIST gold-standard judgments for a subset of the data. In fact, the HITs (tasks assigned) for the Turkers had 5 relevance judgments, 1 of which was annotated previously by NIST.

As many of you may know, this is (among) the strategy(s) that CrowdFlower advocates for their customers.

### What We Plan to Do

I don’t know how many submissions each team gets, but I’ll at least run the full Bayesian hierarchical model for a single topic (that is, the model Massimo and I described in our LREC tutorial on data annotation models). That’s a fully automatic system. I don’t know if we can remove the spam annotators by hand, but I might run that one, too. And probably something simpler with point estimates and simple voting, but that’d be four submissions. Hopefully they’ll evaluate voting themselves.

### Probabilistic Evaluation

I have posted to their mailing list, but no luck getting anyone interested in log loss-based evaluations. Recall that in log loss, your score is the negation of the sum of the log probabilities your system assigned to the correct answers (it’s thus negated total probability, which is a loss function — I really wish optimization had settled on maximizing gain rather than minimizing loss).

Log loss the metric that’s being minimized by my (and any other statistical) model over the training data (that’s the M in maximum a posterior estimation, only we’re dealing with loss, not gain). This evaluation gets at how well calibrated a system’s probabilistic predictions are.

I’ll at least do that for our submissions once we get the “official gold standard” evaluation labels.

Hopefully, they’ll do the usual TREC bangup job of presenting things like precision-recall curves.

### Pro Bono Projects and Internships with LingPipe

April 4, 2011

We have initiated a pro bono program that teams a lingpipe employee with a programmer wanting to learn about LingPipe to serve a non-profit or researcher needing help with a text analytics/NLP/computational linguistics project.

So far is is going pretty well with one classification project underway. The way it went was that I worked with an intern, a solid NLP programmer, to help a Ga Tech researcher get a classification system up and running. Now the intern is running the project with some feedback from me but not much is required at this point.

We are taking applications for interns wanting to learn how to code with LingPipe. We also will take applications for projects. Non-profits or academic research only please. Just send breck@lingpipe.com an email outlining your skills/needs and we will see what we can do.

Breck


text:
# Measure Coil Resistance of a Large Transformer

I have a large transformer and I want to measure its coil resistance to find the primary and secondary. I set my multimeter in the 2000 ohm setting and measure. At first, it reads 500 something, and then the resistance slowly dies off to 0. What am I doing wrong? Why can't I make a steady measurement?

My multimeter: Craftsman 82141 My transformer: TKP0278-E142Z

• Maybe the coil has inductance? Use a lower ohms range like 200 ohms or 20 ohms and take the (low) value when it has settled. Nov 11, 2020 at 15:51
• Curious what you are measuring the resistance for? It won't tell you much about the transformer other than it's "probably good" or "probably bad". It definitely won't give you information such as turns ratio or power handling capability. Nov 11, 2020 at 16:35

What am I doing wrong?

Nothing. This is actually the expected result. You have discovered inductance. Congratulations*. Had you done it about 200 years ago you'd be famous. But you can call yourself Joe or Mike for the day with my permission.

Why can't I make a steady measurement?

You can, if you're patient. The transformer is an inductor, which resists sudden changes in current. Most ohmmeters are really voltmeters that put a constant current** into the device under test and then read the resulting voltage.

So when you hook up the thing, it tries to force the current through and can't -- that "force" is the voltage which it reads. As you continue to force current through, the effect decays depending on the meter characteristics and the inductance of the transformer winding.

To get an accurate reading, wait a while until the inductive response fades.

As a fun experiment, do the measurement on the primary with the secondary coil open and note how long it takes to settle. Then do it again with the secondary coil shorted. It should take significantly less time to settle. Repeat this while measuring the secondary, with the primary open and then shorted.

The reason this effect happens is because the short circuit is "reflected" back to the opposite coil, by the same mechanism that makes a transformer primary draw power when you draw power from its secondary.

* I can never tell with the written word if I'm coming off as snide or not -- I don't mean to in this case. Inductance is pretty cool.

** As constant as they can, up to the limit of the voltage the designer is willing to put on the wires.

• So basically, I just wait for the value to settle down, and then eventually it will go back up from 0 to the actual reading? Nov 11, 2020 at 16:41
• It's an inexpensive meter that only goes down to a 200$\Omega$ range -- when it says "0" it could be anything below an ohm or so. If you really need to know you need to put a healthy, known current through it (I'd go with about 1/10 the rated AC current for the winding), then measure the voltage, then do some math. Or you need a tester that's specifically designed to measure low resistances (which will do the same thing, just more conveniently). Nov 11, 2020 at 17:36

It's not unheard of for even a moderately sized transformer to have a primary inductance of circa 100 henries. It's also quite common for a multimeter to inject 1 mA when testing resistance so, If I simulated 100 henry in parallel with 1 kohm (to ensure my simulator isn't damaged by excess voltage) I would see this graph with time: -

It's taking about a second to properly settle down.

• "to ensure my simulator isn't damaged by excess voltage" Very wise of you. I've lost a few co-workers for this very reason, due to secondary USB port and LCD detonations. Be safe out there. Nov 11, 2020 at 16:30


text:
+1 vote
75 views
How many binary relations are there on a set $A$ with $n$ elements?

Total number of  binary relation from n element set to itself is $2^{n^{2}}$ I.e.n2 entries with two choice take it or not.