Documentation
¶
Overview ¶
Package subject pulls together all of the
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Grade ¶
type Grade struct { // Name of the grade Grd string // Grade with +/- SubGrade string // QCA points Pts int // Attainment 8 points Att8 float64 // Whether the grade counts as a pass at levels 1/2 L1Pass bool L2Pass bool }
A Grade contains the details of a grade and its associated points scores etc.
type Level ¶
type Level struct { // Name Lvl string // Does the qualification count as a GCSE IsGCSE bool // Possible grades achievable at that level Gradeset map[string]Grade }
A Level brings together the details and grades of a particular qualification level.
func (Level) GradeEquivalent ¶
GradeEquivalent returns the nearest grade
func (Level) SortedGrades ¶
SortedGrades produces a list of grade names, sorted by points score.
type Subject ¶
type Subject struct { // Name of the subject Subj string // Short identifier Code string // Unique ID of the subject SubjID int // The Level of the subject Level // Which EBacc Basket the Subject falls in: // M: Maths // En: English Language, El: English Lit // S: Science // H: Humanities // L: Languages // Empty for non-EBacc subjects EBacc string // Which KS2 score the subject TM is based on: // En, Ma, Av KS2Prior string // tms for the subject TMs map[string]TransitionMatrix }
A Subject contains subject details.
type TransitionMatrix ¶
type TransitionMatrix struct { Rows map[string](map[string]float64) // contains filtered or unexported fields }
A TransitionMatrix contains the probabilities of achieving each grade, at each KS2 starting point. Probabilities are indexed by KS2 then Grade
func NewTM ¶
func NewTM(lvl Level) TransitionMatrix
NewTM creates a new Transition Matrix for a subject at a given level.
func (TransitionMatrix) Expected ¶
func (tm TransitionMatrix) Expected(ks2 string) (float64, error)
Expected calculates the expected Attainment 8 points for a given KS2 score.
func (TransitionMatrix) ValueAdded ¶
func (tm TransitionMatrix) ValueAdded(ks2, grade string) (float64, error)
ValueAdded calculates the value added score for an individual student, based on their KS2 and Grade achieved.