subject

package
v0.0.0-...-547a5e9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 29, 2016 License: MIT Imports: 3 Imported by: 0

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

func (l Level) GradeEquivalent(points float64) string

GradeEquivalent returns the nearest grade

func (Level) SortedGrades

func (l Level) SortedGrades() []string

SortedGrades produces a list of grade names, sorted by points score.

type List

type List []Subject

A List allows subjects to be sorted by name and then level.

func (List) Len

func (l List) Len() int

func (List) Less

func (l List) Less(i, j int) bool

func (List) Swap

func (l List) Swap(i, j int)

type Result

type Result struct {
	*Subject
	Grade
	Effort  int
	Class   string
	Teacher string
}

A Result brings together a subject and the grade achieved in that subject.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL