text:
<repo_name>rl-farmer/FarmerLab<file_sep>/content/publication/farmer-is-2020/index.md
---
# Documentation: https://wowchemy.com/docs/managing-content/

title: 'Is the Vineland-3 Comprehensive Interview Form a Multidimensional or Unidimensional
  Scale?: Structural Analysis of Subdomain Scores Across Early Childhood to Adulthood'
subtitle: ''
summary: ''
authors:
- <NAME>
- <NAME>
- <NAME>
tags: []
categories: []
date: '2020-08-01'
lastmod: 2020-12-01T12:29:28-06:00
featured: false
draft: false

# Featured image
# To use, add an image named `featured.jpg/png` to your page's folder.
# Focal points: Smart, Center, TopLeft, Top, TopRight, Left, Right, BottomLeft, Bottom, BottomRight.
image:
  caption: ''
  focal_point: ''
  preview_only: false

# Projects (optional).
#   Associate this post with one or more of your projects.
#   Simply enter your project's folder or file name without extension.
#   E.g. `projects = ["internal-project"]` references `content/project/deep-learning/index.md`.
#   Otherwise, set `projects = []`.
projects: []
publishDate: '2020-12-01T18:29:27.607058Z'
publication_types:
- '2'
abstract: As the Vineland Scales are among the most relevant, well-developed, and
  popular measures of adaptive behavior available for use, this study evaluated the
  factor structure and dimensionality of the Vineland-3 Comprehensive Interview Form.
  Drawing data from 2,560 participants in the norming sample, exploratory and confirmatory
  factor analyses were completed across two independent samples from four age-groups
  ranging from preschool-age children to adults. Results from exploratory factor analysis
  revealed evidence for a unidimensional model across age-groups, but results from
  confirmatory factor analysis indicated that multidimensional models were better
  fitting than unidimensional models for each age-group. Discussion focuses on whether
  the Vineland-3 Comprehensive Interview Form is truly a unidimensional or multidimensional
  measure.
publication: '*Assessment*'
url_pdf: http://journals.sagepub.com/doi/10.1177/1073191120947804
doi: 10.1177/1073191120947804
---
<file_sep>/content/publication/farmer-difference-2020/index.md
---
# Documentation: https://wowchemy.com/docs/managing-content/

title: Difference score reliabilities within the RIAS-2 and WISC-V
subtitle: ''
summary: ''
authors:
- <NAME>
- <NAME>
tags:
- '"difference score"'
- '"evidence-based assessment"'
- '"intelligence test"'
- '"reliability"'
categories: []
date: '2020-01-01'
lastmod: 2020-12-01T12:29:30-06:00
featured: false
draft: false

# Featured image
# To use, add an image named `featured.jpg/png` to your page's folder.
# Focal points: Smart, Center, TopLeft, Top, TopRight, Left, Right, BottomLeft, Bottom, BottomRight.
image:
  caption: ''
  focal_point: ''
  preview_only: false

# Projects (optional).
#   Associate this post with one or more of your projects.
#   Simply enter your project's folder or file name without extension.
#   E.g. `projects = ["internal-project"]` references `content/project/deep-learning/index.md`.
#   Otherwise, set `projects = []`.
projects: []
publishDate: '2020-12-01T18:29:29.630272Z'
publication_types:
- '2'
abstract: Many prominent intelligence tests (e.g., Wechsler Intelligence Scale for
  Children, Fifth Edition [WISC-V] and Reynolds Intellectual Abilities Scale, Second
  Edition [RIAS-2]) offer methods for computing subtest- and composite-level difference
  scores. This study uses data provided in the technical manual of the WISC-V and
  RIAS-2 to calculate reliability coefficients for difference scores. Subtest-level
  difference score reliabilities range from 0.59 to 0.99 for the RIAS-2 and from 0.53
  to 0.87 for the WISC-V. Composite-level difference score reliabilities generally
  range from 0.23 to 0.95 for the RIAS-2 and from 0.36 to 0.87 for the WISC-V. Emphasis
  is placed on comparisons recommended by test publishers and a discussion of minimum
  requirements for interpretation of differences scores is provided.
publication: '*Psychology in the Schools*'
url_pdf: https://psyarxiv.com/73gux/
doi: https://doi.org/10.1002/pits.22369
---
<file_sep>/content/publication/norfolk-norm-2015/index.md
---
# Documentation: https://wowchemy.com/docs/managing-content/

title: 'Norm Block Sample Sizes: A Review of 17 Individually Administered Intelligence
  Tests'
subtitle: ''
summary: ''
authors:
- <NAME>
- <NAME>
- <NAME>
- <NAME>
- <NAME>
- <NAME>
tags: []
categories: []
date: '2015-09-01'
lastmod: 2020-12-01T12:29:33-06:00
featured: false
draft: false

# Featured image
# To use, add an image named `featured.jpg/png` to your page's folder.
# Focal points: Smart, Center, TopLeft, Top, TopRight, Left, Right, BottomLeft, Bottom, BottomRight.
image:
  caption: ''
  focal_point: ''
  preview_only: false

# Projects (optional).
#   Associate this post with one or more of your projects.
#   Simply enter your project's folder or file name without extension.
#   E.g. `projects = ["internal-project"]` references `content/project/deep-learning/index.md`.
#   Otherwise, set `projects = []`.
projects: []
publishDate: '2020-12-01T18:29:32.973520Z'
publication_types:
- '2'
abstract: The representativeness, recency, and size of norm samples strongly influence
  the accuracy of inferences drawn from their scores. Inadequate norm samples may
  lead to inflated or deflated scores for individuals and poorer prediction of developmental
  and academic outcomes. The purpose of this study was to apply Kranzler and Floyd’s
  method for estimating norm block sample sizes via a review of the most prominent,
  individually administered intelligence tests. A rigorous, double-coding process
  was used to obtain these estimated sample sizes for 17 intelligence tests (10 full-length
  multidimensional tests, 4 nonverbal intelligence tests, and 3 brief intelligence
  tests). Overall, 47% of the tests failed to meet the minimum standard of at least
  30 participants per norm block across age groups, and estimated norm block sizes
  were smallest for elementary school–age children. These results can inform intelligence
  test selection by practitioners and researchers, and they should be considered by
  test publishers when developing, revising, and reporting information about their
  tests.
publication: '*Journal of Psychoeducational Assessment*'
url_pdf: https://doi.org/10.1177/0734282914562385
doi: 10.1177/0734282914562385
---
<file_sep>/content/publication/farmer-conducting-2020/index.md
---
# Documentation: https://wowchemy.com/docs/managing-content/

title: 'Conducting Psychoeducational Assessments During the COVID-19 Crisis: the Danger
  of Good Intentions'
subtitle: ''
summary: ''
authors:
- <NAME>
- <NAME>
- <NAME>
- <NAME>
- <NAME>
- <NAME>
- <NAME>
- <NAME>
- <NAME>
tags: []
categories: []
date: '2020-06-01'
lastmod: 2020-12-01T12:29:28-06:00
featured: false
draft: false

# Featured image
# To use, add an image named `featured.jpg/png` to your page's folder.
# Focal points: Smart, Center, TopLeft, Top, TopRight, Left, Right, BottomLeft, Bottom, BottomRight.
image:
  caption: ''
  focal_point: ''
  preview_only: false

# Projects (optional).
#   Associate this post with one or more of your projects.
#   Simply enter your project's folder or file name without extension.
#   E.g. `projects = ["internal-project"]` references `content/project/deep-learning/index.md`.
#   Otherwise, set `projects = []`.
projects: []
publishDate: '2020-12-01T18:29:28.044549Z'
publication_types:
- '2'
abstract: Decision-makers in school psychology are presently engaged in the process
  of determining how to, if possible, move forward with conducting mandated psychoeducational
  evaluations of students in schools during the pandemic. Whereas prominent organizations
  within the profession (e.g., American Psychological Association, National Association
  of School Psychologists) have issued guidance and encouraged practitioners to delay
  testing, it is not clear whether that is a viable option in every jurisdiction.
  Accordingly, professionals are now considering the potential use of telehealth platforms
  to conduct assessments, in some form, as we move forward and deal with this crisis.
  The goal of this brief commentary is to raise some provisional limitations associated
  with the use of telehealth to conduct psychological assessments that we believe
  will have to be considered as use of these platforms is debated. Recommendations
  for professional practice are also provided.
publication: '*Contemp School Psychol*'
url_pdf: http://link.springer.com/10.1007/s40688-020-00293-x
doi: 10.1007/s40688-020-00293-x
---
<file_sep>/content/publication/floyd-are-2013/index.md
---
# Documentation: https://wowchemy.com/docs/managing-content/

title: Are the General Factors From Different Child And Adolescent Intelligence Tests
  the Same? Results From a Five-Sample, Six-Test Analysis
subtitle: ''
summary: ''
authors:
- <NAME>
- <NAME>
- <NAME>
- <NAME>
tags: []
categories: []
date: '2013-12-01'
lastmod: 2020-12-01T12:29:34-06:00
featured: false
draft: false

# Featured image
# To use, add an image named `featured.jpg/png` to your page's folder.
# Focal points: Smart, Center, TopLeft, Top, TopRight, Left, Right, BottomLeft, Bottom, BottomRight.
image:
  caption: ''
  focal_point: ''
  preview_only: false

# Projects (optional).
#   Associate this post with one or more of your projects.
#   Simply enter your project's folder or file name without extension.
#   E.g. `projects = ["internal-project"]` references `content/project/deep-learning/index.md`.
#   Otherwise, set `projects = []`.
projects: []
publishDate: '2020-12-01T18:29:34.116708Z'
publication_types:
- '2'
abstract: Psychometric g is the largest, most general, and most predictive factor
  underlying individual differences across cognitive tasks included in intelligence
  tests. Given that the overall score from intelligence tests is interpreted as an
  index of psychometric g, we examined the correlations between general factors extracted
  from individually administered intelligence tests using data from five samples of
  children and adolescents (n = 83 to n = 200) who completed at least two of six intelligence
  tests. We found strong correlations between the general factors indicating that
  these intelligence tests measure the same construct, psychometric g. A total of
  three general-factor correlations exceeded .95, but two other correlations were
  somewhat lower (.89 and .92). In addition, specific ability factors correlated highly
  across tests in most (but not all) cases. School psychologists and other professionals
  should know that psychometric g and several specific abilities are measured in remarkably
  similar ways across a wide array of intelligence tests.
publication: '*School Psychology Review*'
url_pdf: https://www.tandfonline.com/doi/full/10.1080/02796015.2013.12087461
doi: 10.1080/02796015.2013.12087461
---
<file_sep>/content/publication/farmer-teleassessment-2020/index.md
---
# Documentation: https://wowchemy.com/docs/managing-content/

title: 'Teleassessment with children and adolescents during the coronavirus (COVID-19)
  pandemic and beyond: Practice and policy implications.'
subtitle: ''
summary: ''
authors:
- <NAME>
- <NAME>
- <NAME>
- <NAME>
- <NAME>
- <NAME>
- <NAME>
- <NAME>
- <NAME>
- <NAME>
- <NAME>
- <NAME>
tags: []
categories: []
date: '2020-10-01'
lastmod: 2020-12-01T12:29:27-06:00
featured: false
draft: false

# Featured image
# To use, add an image named `featured.jpg/png` to your page's folder.
# Focal points: Smart, Center, TopLeft, Top, TopRight, Left, Right, BottomLeft, Bottom, BottomRight.
image:
  caption: ''
  focal_point: ''
  preview_only: false

# Projects (optional).
#   Associate this post with one or more of your projects.
#   Simply enter your project's folder or file name without extension.
#   E.g. `projects = ["internal-project"]` references `content/project/deep-learning/index.md`.
#   Otherwise, set `projects = []`.
projects: []
publishDate: '2020-12-01T18:29:26.302866Z'
publication_types:
- '2'
abstract: ''
publication: '*Professional Psychology: Research and Practice*'
url_pdf: http://doi.apa.org/getdoi.cfm?doi=10.1037/pro0000349
doi: 10.1037/pro0000349
---
<file_sep>/content/publication/farmer-iqs-2014/index.md
---
# Documentation: https://wowchemy.com/docs/managing-content/

title: 'IQs are very strong but imperfect indicators of psychometric g: Results from
  joint confirmatory factor analysis'
subtitle: ''
summary: ''
authors:
- <NAME>
- <NAME>
- <NAME>
- <NAME>
tags: []
categories: []
date: '2014-01-01'
lastmod: 2020-12-01T12:29:34-06:00
featured: false
draft: false

# Featured image
# To use, add an image named `featured.jpg/png` to your page's folder.
# Focal points: Smart, Center, TopLeft, Top, TopRight, Left, Right, BottomLeft, Bottom, BottomRight.
image:
  caption: ''
  focal_point: ''
  preview_only: false

# Projects (optional).
#   Associate this post with one or more of your projects.
#   Simply enter your project's folder or file name without extension.
#   E.g. `projects = ["internal-project"]` references `content/project/deep-learning/index.md`.
#   Otherwise, set `projects = []`.
projects: []
publishDate: '2020-12-01T18:29:33.428043Z'
publication_types:
- '2'
abstract: The most global score yielded by intelligence tests, IQs, are supported
  by substantial validity evidence and have historically been central to the identification
  of intellectual disabilities, learning disabilities, and giftedness. This study
  examined the extent to which IQs measure the ability they target, psychometric g.
  Data from three samples of children and adolescents (Ns = 200, 150, and 135) who
  completed varying pairs of individually administered, multidimensional intelligence
  tests were analyzed using a joint confirmatory factor analysis to generate correlations
  between IQs and general factors representing psychometric g. The resulting values,
  expressed as g loadings, for the six IQs ranged from .88 to .95 (M = .92). The accuracy
  of IQs in measuring psychometric g, the meaning of reliable specific ability variance
  in IQs not accounted for by psychometric g, and the use of IQs in schools and related
  settings are discussed.
publication: '*Psychology in the Schools*'
url_pdf: https://onlinelibrary.wiley.com/doi/abs/10.1002/pits.21785
doi: https://doi.org/10.1002/pits.21785
---
<file_sep>/content/publication/farmer-use-2018/index.md
---
# Documentation: https://wowchemy.com/docs/managing-content/

title: Use of intelligence tests in the identification of children and adolescents
  with intellectual disability
subtitle: ''
summary: ''
authors:
- <NAME>
- <NAME>
tags:
- '"Psychometrics"'
- '"Measurement"'
- '"Adaptive Behavior"'
- '"Best Practices"'
- '"Cognitive Ability"'
- '"Differential Diagnosis"'
- '"Intellectual Development Disorder"'
- '"Intelligence Measures"'
- '"Sociocultural Factors"'
categories: []
date: '2018-01-01'
lastmod: 2020-12-01T12:29:31-06:00
featured: false
draft: false

# Featured image
# To use, add an image named `featured.jpg/png` to your page's folder.
# Focal points: Smart, Center, TopLeft, Top, TopRight, Left, Right, BottomLeft, Bottom, BottomRight.
image:
  caption: ''
  focal_point: ''
  preview_only: false

# Projects (optional).
#   Associate this post with one or more of your projects.
#   Simply enter your project's folder or file name without extension.
#   E.g. `projects = ["internal-project"]` references `content/project/deep-learning/index.md`.
#   Otherwise, set `projects = []`.
projects: []
publishDate: '2020-12-01T18:29:31.267158Z'
publication_types:
- '6'
abstract: 'Intellectual disability (ID) is a disabling condition associated with deficits
  in intellectual functioning and adaptive behavior. Those involved in the assessment
  of children and adolescents with ID should consider recent changes in diagnostic
  criteria for the condition, as well as best practices in assessment. The American
  Association on Intellectual and Developmental Disabilities provides a multidimensional
  framework of human functioning encompassing five domains: intellectual abilities,
  adaptive behavior, health, participation, and context of the individual. Those engaged
  in assessment of ID should be aware of psychometric considerations when they are
  selecting and completing cognitive ability test batteries. The chapter reviews some
  controversies associated with ID assessment and offers informed opinions to guide
  the application of research to practice. The accurate assessment of ID is of utmost
  importance, and thus clinicians should act purposefully to ensure that their test
  results are valid. When a clinician is considering ID as a diagnosis, a number of
  factors may confound the assessment process. These factors fit into two broad categories:
  competing hypotheses regarding the appropriate diagnosis, and construct-irrelevant
  influences that reduce the validity of the assessment results. In addition to considering
  competing hypotheses and construct-irrelevant influences, clinicians should consider
  the influence of culture and language. (PsycINFO Database Record (c) 2019 APA, all
  rights reserved)'
publication: '*Contemporary intellectual assessment: Theories, tests, and issues,
  4th ed*'
---
<file_sep>/content/home/experience.md
+++
# Experience widget.
widget = "experience"  # See https://sourcethemes.com/academic/docs/page-builder/
headless = true  # This file represents a page section.
active = true  # Activate this widget? true/false
weight = 40  # Order that this section will appear.

title = "Experience"
subtitle = ""

# Date format for experience
#   Refer to https://sourcethemes.com/academic/docs/customization/#date-format
date_format = "Jan 2006"

# Experiences.
#   Add/remove as many `[[experience]]` blocks below as you like.
#   Required fields are `title`, `company`, and `date_start`.
#   Leave `date_end` empty if it's your current employer.
#   Begin/end multi-line descriptions with 3 quotes `"""`.
[[experience]]
  title = "Assistant Professor"
  company = "Oklahoma State Univeristy"
  company_url = ""
  location = "Stillwater, OK"
  date_start = "2019-06-01"
  date_end = ""
  description = """Teaches coursework in school psychology, conducts research consistent with his research agenda, and supervises students in conducting individual research projects.

  Courses Taught:

  * Introduction to School Psychology
  * Advanced Research Methods
  * Cognitive Assessment I & II
  * First-year Observation Practicum
  """

[[experience]]
  title = "Assistant Professor"
  company = "Western Kentucky University"
  company_url = ""
  location = "Bowling Green, KY"
  date_start = "2016-07-01"
  date_end = "2019-05-31"
  description = """Taught undergraduate psychology and graduate school psychology coursework."""

+++

<file_sep>/content/publication/woods-what-2019/index.md
---
# Documentation: https://wowchemy.com/docs/managing-content/

title: What Is in a Name? A Historical Review of Intelligence Test Score Labels
subtitle: ''
summary: ''
authors:
- <NAME>
- <NAME>
- <NAME>
- <NAME>
- <NAME>
- <NAME>
tags: []
categories: []
date: '2019-01-01'
lastmod: 2020-12-01T12:29:30-06:00
featured: false
draft: false

# Featured image
# To use, add an image named `featured.jpg/png` to your page's folder.
# Focal points: Smart, Center, TopLeft, Top, TopRight, Left, Right, BottomLeft, Bottom, BottomRight.
image:
  caption: ''
  focal_point: ''
  preview_only: false

# Projects (optional).
#   Associate this post with one or more of your projects.
#   Simply enter your project's folder or file name without extension.
#   E.g. `projects = ["internal-project"]` references `content/project/deep-learning/index.md`.
#   Otherwise, set `projects = []`.
projects: []
publishDate: '2020-12-01T18:29:30.173452Z'
publication_types:
- '2'
abstract: Labels for scores stemming from intelligence tests have been employed since
  their inception in the United States. The purpose of this study was to systematically
  identify and document score labels for IQs used during the past 102 years. Using
  pairs of reviewers, score labels from 40 tests were reviewed, and 61 unique labels
  were identified. Comparative analyses by score range and decade were completed.
  Results indicate a paradigm shift beginning in the 1980s that has slowly resulted
  in more common, but not universal, use of terminology that focuses on the statistical
  aspect of scores, rather than employing value-laden and potentially stigmatizing
  terms. A universal score label system would help to avoid confusion, miscommunication,
  and biased decision making.
publication: ''
url_pdf: https://journals.sagepub.com/doi/abs/10.1177/0734282918786651
doi: https://doi.org/10.1177/0734282918786651
---
<file_sep>/content/authors/admin/_index.md
---
# Display name
title: <NAME>

# Is this the primary user of the site?
superuser: true

# Role/position
role: Assistant Professor of School Psychology

# Organizations/Affiliations
organizations:
- name: Oklahoma State University
  url: "https://go.okstate.edu/"

# Short bio (displayed in user profile at end of posts)
bio: <NAME>mer's areas of professional interest include evidence-based practices, assessment processes, and meta-science in school psychology. He is the coordinator of Evidence Based School Psychology, and is a research associate with the <a href="https://education.okstate.edu/research/center-family-resilience/index.html">Center for Family Resilience</a>.

interests:
- Evidence-based practices
- Assessment processes
- Meta-science in school psychology

education:
  courses:
  - course: PhD in Psychology
    institution: The University of Memphis
    year: 2015
  - course: M.A. of School Psychology
    institution: The University of Memphis
    year: 2010
  - course: B.A. in Psychology
    institution: Appalachian State Univeristy
    year: 2007

# Social/Academic Networking
# For available icons, see: https://sourcethemes.com/academic/docs/page-builder/#icons
#   For an email link, use "fas" icon pack, "envelope" icon, and a link in the
#   form "mailto:<EMAIL>" or "#contact" for contact widget.
social:
- icon: envelope
  icon_pack: fas
  link: '/#contact'  # For a direct email link, use "mailto:<EMAIL>".
- icon: twitter
  icon_pack: fab
  link: https://twitter.com/rfarmer27
- icon: google-scholar
  icon_pack: ai
  link: https://scholar.google.com/citations?user=vkyvNP0AAAAJ&hl=en
- icon: osf
  icon_pack: ai
  link: https://osf.io/2765c/
- icon: orcid
  icon_pack: ai
  link: http://orcid.org/0000-0003-1409-7555

# Enter email to display Gravatar (if Gravatar enabled in Config)
email: "<EMAIL>"

# Highlight the author in author lists? (true/false)
highlight_name: true

# Organizational groups that you belong to (for People widget)
#   Set this to `[]` or comment out if you are not using People widget.
#user_groups:
#- Researchers
#- Visitors
---

<NAME> is an assistant professor of school psychology within the College of Education & Human Sciences at Oklahoma State University. His areas of professional interest include evidence-based practices, assessment processes, and meta-science in school psychology. He is the coordinator of Evidence Based School Psychology, and is a research associate with the <a href="https://education.okstate.edu/research/center-family-resilience/index.html">Center for Family Resilience</a>.<file_sep>/content/publication/farmer-evidence-driven-2016/index.md
---
# Documentation: https://wowchemy.com/docs/managing-content/

title: An Evidence-Driven, Solution-Focused Approach to Functional Behavior Assessment
  Report Writing
subtitle: ''
summary: ''
authors:
- <NAME>
- <NAME>
tags: []
categories: []
date: '2016-01-01'
lastmod: 2020-12-01T12:29:32-06:00
featured: false
draft: false

# Featured image
# To use, add an image named `featured.jpg/png` to your page's folder.
# Focal points: Smart, Center, TopLeft, Top, TopRight, Left, Right, BottomLeft, Bottom, BottomRight.
image:
  caption: ''
  focal_point: ''
  preview_only: false

# Projects (optional).
#   Associate this post with one or more of your projects.
#   Simply enter your project's folder or file name without extension.
#   E.g. `projects = ["internal-project"]` references `content/project/deep-learning/index.md`.
#   Otherwise, set `projects = []`.
projects: []
publishDate: '2020-12-01T18:29:32.330617Z'
publication_types:
- '2'
abstract: School-based practitioners are to implement and report functional behavior
  assessments (FBAs) that are consistent with both the research literature and the
  law, both federal and state. However, the literature regarding how best to document
  the FBA process is underdeveloped. A review of applied behavior analytic and school
  psychology literature as well as legislation and case law informs FBA reporting
  practices regarding (a) required content, (b) graphing of data, (c) organization
  of reports, and (d) clarity of language. The purpose of FBA reports is discussed,
  and this discussion explicitly informs the use of a solution-focused approach to
  improve clarity in report writing. Recommendations for best practices in FBA report
  writing are provided, and future research needs are highlighted.
publication: '*Psychology in the Schools*'
url_pdf: https://onlinelibrary.wiley.com/doi/abs/10.1002/pits.21972
doi: https://doi.org/10.1002/pits.21972
---
<file_sep>/content/publication/gross-evidence-based-2019/index.md
---
# Documentation: https://wowchemy.com/docs/managing-content/

title: 'Evidence-Based Assessment: Best Practices, Customary Practices, and Recommendations
  for Field-Based Assessment'
subtitle: ''
summary: ''
authors:
- <NAME>
- <NAME>
- <NAME>
tags: []
categories: []
date: '2019-09-01'
lastmod: 2020-12-01T12:29:32-06:00
featured: false
draft: false

# Featured image
# To use, add an image named `featured.jpg/png` to your page's folder.
# Focal points: Smart, Center, TopLeft, Top, TopRight, Left, Right, BottomLeft, Bottom, BottomRight.
image:
  caption: ''
  focal_point: ''
  preview_only: false

# Projects (optional).
#   Associate this post with one or more of your projects.
#   Simply enter your project's folder or file name without extension.
#   E.g. `projects = ["internal-project"]` references `content/project/deep-learning/index.md`.
#   Otherwise, set `projects = []`.
projects: []
publishDate: '2020-12-01T18:29:31.799384Z'
publication_types:
- '2'
abstract: 'The purpose of the current review is to examine three frequently employed
  types of assessment: (a) standardized tests, (b) screening, and (c) behavioral assessment.
  The aims are to advocate for best practices with evidence-based assessments (EBAs)
  and provide guidance to implement EBAs within applied settings. Information regarding
  the current best practices, customary field-based practices, and recommendations
  for improved practices are provided for each assessment type. Further, a framework
  is provided for using standardized tests, screening, and behavioral assessment within
  best practices to determine student intervention needs and potential for disability.'
publication: '*Contemp School Psychol*'
url_pdf: https://doi.org/10.1007/s40688-018-0186-x
doi: 10.1007/s40688-018-0186-x
---
<file_sep>/content/publication/farmer-how-2020/index.md
---
# Documentation: https://wowchemy.com/docs/managing-content/

title: How Can General Intelligence Composites Most Accurately Index Psychometric
  g and What Might Be Good Enough?
subtitle: ''
summary: ''
authors:
- <NAME>
- <NAME>
- <NAME>
- <NAME>
tags: []
categories: []
date: '2020-03-01'
lastmod: 2020-12-01T12:29:29-06:00
featured: false
draft: false

# Featured image
# To use, add an image named `featured.jpg/png` to your page's folder.
# Focal points: Smart, Center, TopLeft, Top, TopRight, Left, Right, BottomLeft, Bottom, BottomRight.
image:
  caption: ''
  focal_point: ''
  preview_only: false

# Projects (optional).
#   Associate this post with one or more of your projects.
#   Simply enter your project's folder or file name without extension.
#   E.g. `projects = ["internal-project"]` references `content/project/deep-learning/index.md`.
#   Otherwise, set `projects = []`.
projects: []
publishDate: '2020-12-01T18:29:29.104018Z'
publication_types:
- '2'
abstract: Intelligence tests produce composite scores that are interpreted as indexes
  of psychometric g. Like all measures, general intelligence composites are not pure
  representations of their intended construct, so it is important to evaluate the
  score characteristics that affect accuracy in measurement. In this study, we identified
  three characteristics of general intelligence composite scores that vary across
  intelligence tests, including the number, the g loadings, and the heterogeneity
  of contributing subtests. We created 77 composite scores to test the influence of
  these characteristics in measuring psychometric g. Internal consistency reliability
  coefficients and g loadings were calculated for the composites. General intelligence
  composites most accurately index psychometric using numerous highly g-loaded subtests.
  Considering confidence intervals, composites stemming from four subtests produced
  scores as highly g loaded as those composites that stem from additional subtests.
  Discussion focuses on what methods should be use to optimally measure psychometric
  g and how standards in constructing composites should balance psychometric and practical
  considerations.
publication: '*Contemp School Psychol*'
url_pdf: http://link.springer.com/10.1007/s40688-019-00244-1
doi: 10.1007/s40688-019-00244-1
---
<file_sep>/content/publication/johnson-determining-2020/index.md
---
# Documentation: https://wowchemy.com/docs/managing-content/

title: Determining Growth Sensitivity of Star Math With a Latent Growth Curve Model
subtitle: ''
summary: ''
authors:
- <NAME>
- <NAME>
- <NAME>
tags: []
categories: []
date: '2020-09-01'
lastmod: 2020-12-01T12:29:29-06:00
featured: false
draft: false

# Featured image
# To use, add an image named `featured.jpg/png` to your page's folder.
# Focal points: Smart, Center, TopLeft, Top, TopRight, Left, Right, BottomLeft, Bottom, BottomRight.
image:
  caption: ''
  focal_point: ''
  preview_only: false

# Projects (optional).
#   Associate this post with one or more of your projects.
#   Simply enter your project's folder or file name without extension.
#   E.g. `projects = ["internal-project"]` references `content/project/deep-learning/index.md`.
#   Otherwise, set `projects = []`.
projects: []
publishDate: '2020-12-01T18:29:28.555851Z'
publication_types:
- '2'
abstract: Repeated measurements of student ability (i.e., progressing monitoring)
  is an essential element of informed decision-making when adjusting instruction.
  An important characteristic of progress monitoring measures is frequent administration
  to identify areas of concern and to evaluate academic growth. The purpose of this
  study was to determine if STAR Math is sensitive to small incremental growth across
  a semester. Within two southern school districts, 114 fifth grade students’ progress
  monitoring data were collected weekly, and a latent growth curve was used to estimate
  students’ change in math ability. Results indicated STAR Math is sensitive to small
  incremental growth, with a statistically significant and positive slope, suggesting
  students using STAR Math showed improvement in ability over the semester.
publication: '*Canadian Journal of School Psychology*'
url_pdf: http://journals.sagepub.com/doi/10.1177/0829573520922678
doi: 10.1177/0829573520922678
---
<file_sep>/content/publication/lockwood-huber-2019/index.md
---
# Documentation: https://wowchemy.com/docs/managing-content/

title: 'Huber Inventory of Trainee Self-efficacy: Assessment of measurement models'
subtitle: ''
summary: ''
authors:
- <NAME>
- <NAME>
- <NAME>
- <NAME>
tags:
- '"assessment"'
- '"program evaluation"'
- '"school psychology"'
- '"self-efficacy"'
- '"trainees"'
categories: []
date: '2019-01-01'
lastmod: 2020-12-01T12:29:31-06:00
featured: false
draft: false

# Featured image
# To use, add an image named `featured.jpg/png` to your page's folder.
# Focal points: Smart, Center, TopLeft, Top, TopRight, Left, Right, BottomLeft, Bottom, BottomRight.
image:
  caption: ''
  focal_point: ''
  preview_only: false

# Projects (optional).
#   Associate this post with one or more of your projects.
#   Simply enter your project's folder or file name without extension.
#   E.g. `projects = ["internal-project"]` references `content/project/deep-learning/index.md`.
#   Otherwise, set `projects = []`.
projects: []
publishDate: '2020-12-01T18:29:30.727606Z'
publication_types:
- '2'
abstract: The purpose of this study was to further examine the factor structure of
  the Huber Inventory of Trainee Self-Efficacy (HITS), a measure of school psychology
  trainee self-efficacy. Lockwood et al. (2017, Psychol. Sch., Vol. 54, pp. 655–670)
  extant data set, collected from 520 school psychology trainees, was utilized. Four
  measurement models were examined for model fit and factor loadings. Of the four
  models, a bifactor model with a single latent general self-efficacy (GSE) and latent
  domain-specific factors (i.e., Multidimensional Assessment Skills, Counseling Skills,
  Professional Interpersonal Skills, and Research Skills) was the most parsimonious.
  However, standardized loadings indicated that all practice-related items loaded
  more significantly onto GSE than their domain-specific factors, indicating the utility
  of GSE for practice-related skills. Of note, the Research Skills factor displayed
  greater domain-specific loadings than general loadings. These findings suggest that
  GSE may be the best indicator of trainee self-efficacy, though a two-factor model
  that represents practical skills versus research skills may also be appropriate.
  Additionally, reliability scores indicate that subscale interpretation may also
  be reasonable. Limitations, implications for trainers of school psychologists, and
  for future research directions are discussed.
publication: '*Psychology in the Schools*'
url_pdf: https://onlinelibrary.wiley.com/doi/abs/10.1002/pits.22230
doi: https://doi.org/10.1002/pits.22230
---
<file_sep>/content/publication/lockwood-cognitive-2020/index.md
---
# Documentation: https://wowchemy.com/docs/managing-content/

title: 'The cognitive assessment course: Two decades later'
subtitle: ''
summary: ''
authors:
- <NAME>
- <NAME>
tags:
- '"cognitive assessment"'
- '"intelligence test"'
- '"interpretation"'
- '"school psychology"'
- '"training"'
categories: []
date: '2020-01-01'
lastmod: 2020-12-01T12:29:35-06:00
featured: false
draft: false

# Featured image
# To use, add an image named `featured.jpg/png` to your page's folder.
# Focal points: Smart, Center, TopLeft, Top, TopRight, Left, Right, BottomLeft, Bottom, BottomRight.
image:
  caption: ''
  focal_point: ''
  preview_only: false

# Projects (optional).
#   Associate this post with one or more of your projects.
#   Simply enter your project's folder or file name without extension.
#   E.g. `projects = ["internal-project"]` references `content/project/deep-learning/index.md`.
#   Otherwise, set `projects = []`.
projects: []
publishDate: '2020-12-01T18:29:34.536308Z'
publication_types:
- '2'
abstract: Given significant changes to legislation, practice, research, and instrumentation,
  the purpose of this study was to examine the course on cognitive assessment in school
  psychology programs and to describe the (a) structure, (b) instructional strategies,
  (c) content, and (d) interpretative strategies taught to school psychology graduate
  students. One hundred and twenty-seven instructors were surveyed, and results suggest
  that over the last 20 years support for teaching cognitive assessment has decreased
  while the content and instructional strategies have remained largely the same. Results
  of this study also indicate that the interpretation strategies taught to rely heavily
  on Cattell–Horn–Carroll theory and related interpretive frameworks (e.g., cross-battery
  assessment). Additionally, instructors are placing greater emphasis on multicultural
  sensitivity/culturally and linguistically diverse assessment than in previous decades.
  Implications for future research, training, and practice are discussed.
publication: '*Psychology in the Schools*'
url_pdf: https://psyarxiv.com/v3tds/
doi: https://doi.org/10.1002/pits.22298
---

repo_name: rl-farmer/FarmerLab


text:
<file_sep># Energy-Problem
Using linear programming to solve an energy production and transmission problem

branch_name: refs/heads/master

repo_language: Markdown

repo_name: nandozanutto/Energy-Problem


text:
<repo_name>JenniferKuo/homework-0<file_sep>/README.md
# homework-0

## Brief self-introduction
Hi, my name is 郭庭妤. I'm a first year student in ISA department.
I was major in Information Ststem when I was an undergraduate, so it's very exciting and challenging after I came to NTHU!

## Why Computer Vision?
My advisor's research field is computer graphic and multimedia.
Recently, computer vision and machine learning is also related and become very important in this area.
However, it's difficult for me to understand those paper when our lab doing paper reading since I have no background knowledge.
But I do have Python programming experience.
That's why I want to take this course.
I want to know more about computer vision.

## What do you want to achieve in the course?
I wish I can not only use some CV framework but also understand the theory and technology behind it.


text:
<repo_name>Nodrik777/Passion-Project-Final-Version<file_sep>/README.md
# Passion-Project-Final-Version


text:
<repo_name>00f2ff/dadss-final<file_sep>/model2.py
import json, csv, itertools

info = {
	"assumptions": {
		"Natural Light": {
			"Basement": 0,
			"First": 0.95,
			"Second": 0.15,
			"Third": 0.9,
			"Fourth": 0.25
		},
		"Close to Outlet": {
			"Basement": 0.3,
			"First": 0.35,
			"Second": 0.45,
			"Third": 0.95,
			"Fourth": 0.6
		},
		"Quietness": {
			"Basement": 0.05,
			"First": 0.05,
			"Second": 0.15,
			"Third": 1,
			"Fourth": 0.4
		},
		"Close to Food": {
			"Basement": 0.7,
			"First": 1,
			"Second": 0.7,
			"Third": 0.35,
			"Fourth": 0
		},
		"Working Alone": {
			"Basement": 0.1,
			"First": 0.1,
			"Second": 0.15,
			"Third": 1,
			"Fourth": 0.45
		},
		"Total Chairs": {
			"Basement": 33.0,
			"First": 70.0,
			"Second": 72.0,
			"Third": 146.0,
			"Fourth": 76.0
		}
	},
	"availability": {
		"Monday": {
			"10:30 AM": {
				"Basement": 24,
				"First": 41,
				"Second": 29,
				"Third": 51,
				"Fourth": 32
			},
			"1:30 PM": {
				"Basement": 18,
				"First": 38,
				"Second": 28,
				"Third": 43,
				"Fourth": 20
			},
			"4:30 PM": {
				"Basement": 8,
				"First": 21,
				"Second": 18,
				"Third": 14,
				"Fourth": 17
			},
			"7:30 PM": {
				"Basement": 16,
				"First": 30,
				"Second": 20,
				"Third": 30,
				"Fourth": 21
			},
			"10:30 PM": {
				"Basement": 23,
				"First": 13,
				"Second": 13,
				"Third": 9,
				"Fourth": 14
			}
		},
		"Tuesday": {
			"10:30 AM": {
				"Basement": 19,
				"First": 45,
				"Second": 21,
				"Third": 42,
				"Fourth": 23
			},
			"1:30 PM": {
				"Basement": 15,
				"First": 30,
				"Second": 16,
				"Third": 30,
				"Fourth": 15
			},
			"4:30 PM": {
				"Basement": 14,
				"First": 16,
				"Second": 17,
				"Third": 18,
				"Fourth": 13
			},
			"7:30 PM": {
				"Basement": 18,
				"First": 13,
				"Second": 15,
				"Third": 20,
				"Fourth": 18
			},
			"10:30 PM": {
				"Basement": 17,
				"First": 33,
				"Second": 19,
				"Third": 39,
				"Fourth": 17
			}
		},
		"Wednesday": {
			"10:30 AM": {
				"Basement": 28,
				"First": 25,
				"Second": 41,
				"Third": 64,
				"Fourth": 43
			},
			"1:30 PM": {
				"Basement": 14,
				"First": 32,
				"Second": 11,
				"Third": 38,
				"Fourth": 15
			},
			"4:30 PM": {
				"Basement": 17,
				"First": 17,
				"Second": 11,
				"Third": 21,
				"Fourth": 13
			},
			"7:30 PM": {
				"Basement": 14,
				"First": 16,
				"Second": 29,
				"Third": 42,
				"Fourth": 12
			},
			"10:30 PM": {
				"Basement": 18,
				"First": 22,
				"Second": 24,
				"Third": 44,
				"Fourth": 16
			}
		},
		"Thursday": {
			"10:30 AM": {
				"Basement": 21,
				"First": 39,
				"Second": 26,
				"Third": 55,
				"Fourth": 27
			},
			"1:30 PM": {
				"Basement": 15,
				"First": 20,
				"Second": 16,
				"Third": 38,
				"Fourth": 18
			},
			"4:30 PM": {
				"Basement": 17,
				"First": 14,
				"Second": 15,
				"Third": 24,
				"Fourth": 14
			},
			"7:30 PM": {
				"Basement": 17,
				"First": 51,
				"Second": 30,
				"Third": 61,
				"Fourth": 28
			},
			"10:30 PM": {
				"Basement": 21,
				"First": 30,
				"Second": 20,
				"Third": 49,
				"Fourth": 24
			}
		},
		"Friday": {
			"10:30 AM": {
				"Basement": 18,
				"First": 25,
				"Second": 37,
				"Third": 44,
				"Fourth": 32
			},
			"1:30 PM": {
				"Basement": 22,
				"First": 41,
				"Second": 41,
				"Third": 42,
				"Fourth": 27
			},
			"4:30 PM": {
				"Basement": 20,
				"First": 20,
				"Second": 34,
				"Third": 37,
				"Fourth": 31
			},
			"7:30 PM": {
				"Basement": 28,
				"First": 38,
				"Second": 39,
				"Third": 42,
				"Fourth": 20
			},
			"10:30 PM": {
				"Basement": 30,
				"First": 43,
				"Second": 40,
				"Third": 44,
				"Fourth": 34
			}
		}
	}
}

class Simulation(object):
	def __init__(self, info, weight, rank, day, time):
		self.assumptions = info["assumptions"]
		self.total_chairs = info["assumptions"]["Total Chairs"]
		self.availability = info["availability"][day][time]
		self.day = day
		self.time = time
		self.weight = weight
		self.rank = rank
		self.preferences = ['Close to Outlet','Working Alone','Natural Light','Close to Food','Quietness']
		self.floors = ['Basement','First','Second','Third','Fourth']
		self.initial_calculations()
		self.define_options()
		self.calculate_options()
		self.find_best_results()

	# Converts all initial values into what our multipliers rely on
	def initial_calculations(self):
		# Adjust weight to scoring standard (opposite scale than rank)
		self.adjusted_weight = {}
		for p in self.preferences:
			if self.weight[p] == 5: # least important
				self.adjusted_weight[p] = 1
			elif self.weight[p] == 4:
				self.adjusted_weight[p] = 0.75
			elif self.weight[p] == 3:
				self.adjusted_weight[p] = 0.5
			elif self.weight[p] == 2:
				self.adjusted_weight[p] = 0.25
			elif self.weight[p] == 1: # most important
				self.adjusted_weight[p] = 0

		# Adjust rank to scoring standard
		self.adjusted_rank = {}
		# add adjusted ranks
		for r in self.rank.keys():
			self.adjusted_rank[r] = 6 - self.rank[r] # 5 turns into multiplier of 1; 1 turns into multiplier of 5

		# Turn availabilities into probabilities
		for t in self.total_chairs:
			self.availability[t] /= self.total_chairs[t]

	# Reads a default options file to create a starter dict
	def define_options(self):
		with open('tree2.json','r') as f:
			tree = f.read()
		tree = json.loads(tree)
		self.options = tree['paths']

	# Find utility given a assumption, rank, weight, availability, and if a 'no' path is followed
	def utility(self, p, r, w, a, invert):
		if invert: return (1-p)*r*(1-w)*a
		else: return p*r*w*a

	# Calculates all utilities in decision tree and writes new options to disk
	def calculate_options(self):
		# iterate through options
		for o in self.options:
			# iterate through choice node indexes
			for c in xrange(len(o['path'])):
				# see if inverse is needed
				if o['path'][c] == "no": i = True
				else: i = False
				# iterate through preferences in adjusted_rank dict
				for p in self.adjusted_rank.keys():
					# check that rank apself.plies to correct node
					if 5 - self.adjusted_rank[p] == c: # ex. c = 0 means first node; assign multiplier then
						r_mult = self.adjusted_rank[p]
						w_mult = self.adjusted_weight[p]
						# iterate through floors
						for f in self.floors:
							# calculate utility
							u = self.utility(self.assumptions[p][f], r_mult, w_mult, self.availability[f], i)
							# add utility to this option's floor's utility
							o[f] += u

		# with open("tree_results.json","w") as f:
		#     f.write(str(json.dumps(self.options, indent=2)))

	# Returns a list of the best path(s) and floor(s) in the entire tree. If more than one floor has the same utility, both will be listed.
	def find_best_overall(self):
		# calculate best option(s)
		self.best_paths = []
		self.best_floors = []
		self.best_utility = 0
		# iterate through options
		for o in self.options:
			# iterate through floors
			for f in self.floors:
				# if utility is highest, change values
				if o[f] > self.best_utility:
					self.best_utility = o[f]
					self.best_paths = [o['path']]
					self.best_floors = [f]
				# if utility is tied, add floor to values
				elif o[f] == self.best_utility:
					self.best_paths.append(o['path'])
					self.best_floors.append(f)

	# Finds the best four results for users per our Excel model
	def find_best_results(self):
		# Initialize variables with [path, floor, utility]
		self.forgo_none = [['yes','yes','yes','yes','yes'], '', 0]
		self.forgo_5 = [['yes','yes','yes','yes','no'], '', 0]
		self.forgo_45 = [['yes','yes','yes','no','no'], '', 0]
		self.forgo_345 = [['yes','yes','no','no','no'], '', 0]
		endings = [self.forgo_none, self.forgo_5, self.forgo_45, self.forgo_345]
		# Iterate through options
		for o in self.options:
			# Iterate through endings
			for e in endings:
				# Check if path matches
				if e[0] == o['path']:
					best_utility = 0
					best_floor = ''
					# Iterate through floors
					for f in self.floors: # For the sake of time I'm avoiding duplicates
						# Find best utility
						if o[f] > best_utility:
							best_utility = o[f]
							best_floor = f
					e[1] = best_floor
					e[2] = round(best_utility, 3)

# These will change according to simulations
weight = {'Close to Outlet': 4, 'Working Alone': 1, 'Natural Light': 4, 'Close to Food': 4, 'Quietness': 1}
# rank = {'Close to Outlet': 1, 'Working Alone': 2, 'Natural Light': 5, 'Close to Food': 3, 'Quietness': 4} # 1 is most important, so rank * of 5
rank = {'Close to Food': 4, 'Quietness': 2, 'Natural Light': 5, 'Close to Outlet': 1, 'Working Alone': 3}
day = 'Monday'
time = '10:30 AM'
# a = Simulation(info, weight, rank, day, time)
# print a.forgo_345

# This generates the 5! different rank permutations available
def rank_combos():
	ranks = []
	# Create a list of all possible permutations
	permutations = list(itertools.permutations([1,2,3,4,5]))
	# Append a rank dict for each permutation to ranks
	for p in permutations:
		rank = {'Close to Outlet': p[0], 'Working Alone': p[1], 'Natural Light': p[2], 'Close to Food': p[3], 'Quietness': p[4]}
		ranks.append(rank)
	return ranks

# This generates 3! * 2 different rank permutations based on survey data for what students find important
def informed_ranks():
	ranks = []
	permutations = list(itertools.permutations([1,2,3]))
	# Append a rank dict for each permutation to ranks
	for p in permutations:
		rank = {'Close to Outlet': p[0], 'Working Alone': p[1], 'Natural Light': 0, 'Close to Food': 0, 'Quietness': p[2]}
		ranks.append(rank)
	# Go through ranks and add 4 or 5 to the remaining preferences
	for i in xrange(len(ranks)):
		if i % 2 == 0:
			ranks[i]['Natural Light'] = 4
			ranks[i]['Close to Food'] = 5
		else:
			ranks[i]['Natural Light'] = 5
			ranks[i]['Close to Food'] = 4
	return ranks

# This simulates all possible days and times given weights and ranks
def simulate_datetime(info, weight, rank, file_ending):
	# Basic input options
	days = ['Monday', 'Tuesday','Wednesday', 'Thursday', 'Friday']
	times = ['10:30 AM', '1:30 PM', '4:30 PM', '7:30 PM', '10:30 PM']
	# Advanced input options

	# ranks = informed_ranks()
	# aaa = Simulation(info, weight, ranks[1], 'Monday', '10:30 AM')
	# print aaa.forgo_none
	sim = []
	for d in days:
		for t in times:
			# for r in ranks:
			si = Simulation(info, weight, rank, d, t)
			# print s.forgo_none
			sim.append(si)
			# del si
			# si = ''

	# Write the data to a CSV file
	# Keep rank unadjusted for presentation purposes
	headers = ['day', 'time', 'rank', 'forgo none floor', 'forgo none u', 'forgo one floor', 'forgo one u', 'forgo two floor', 'forgo two u', 'forgo three floor', 'forgo three u']
	with open('results_{0}.csv'.format(file_ending),'wb') as f:
		writer = csv.writer(f)
		writer.writerow(headers)
		for s in sim:
			data = [s.day, s.time, s.rank, s.forgo_none[1], s.forgo_none[2], s.forgo_5[1], s.forgo_5[2], s.forgo_45[1], s.forgo_45[2], s.forgo_345[1], s.forgo_345[2]]
			writer.writerow(data)
	return sim

# simulate_datetime(info, weight, rank)

# Even the following doesn't really work...
# ranks = informed_ranks()
# all_sims = []
# for i in xrange(len(ranks)):
# 	sim = simulate_datetime(info, weight, ranks[i], i)
	# all_sims += sim
# all_sims = []
rank = {'Close to Food': 4, 'Quietness': 1, 'Natural Light': 5, 'Close to Outlet': 2, 'Working Alone': 3}
# simulate_datetime(info, weight, rank, 0)
rank = {'Close to Food': 4, 'Quietness': 1, 'Natural Light': 5, 'Close to Outlet': 3, 'Working Alone': 2}
# simulate_datetime(info, weight, rank, 1)
rank = {'Close to Food': 4, 'Quietness': 2, 'Natural Light': 5, 'Close to Outlet': 1, 'Working Alone': 3}
# simulate_datetime(info, weight, rank, 2)
rank = {'Close to Food': 4, 'Quietness': 2, 'Natural Light': 5, 'Close to Outlet': 3, 'Working Alone': 1}
# simulate_datetime(info, weight, rank, 3)
rank = {'Close to Food': 4, 'Quietness': 3, 'Natural Light': 5, 'Close to Outlet': 1, 'Working Alone': 2}
# simulate_datetime(info, weight, rank, 4)
rank = {'Close to Food': 4, 'Quietness': 3, 'Natural Light': 5, 'Close to Outlet': 2, 'Working Alone': 1}
# simulate_datetime(info, weight, rank, 5)

rank = {'Close to Food': 5, 'Quietness': 1, 'Natural Light': 4, 'Close to Outlet': 2, 'Working Alone': 3}
# simulate_datetime(info, weight, rank, 6)
rank = {'Close to Food': 5, 'Quietness': 1, 'Natural Light': 4, 'Close to Outlet': 3, 'Working Alone': 2}
# simulate_datetime(info, weight, rank, 7)
rank = {'Close to Food': 5, 'Quietness': 2, 'Natural Light': 4, 'Close to Outlet': 1, 'Working Alone': 3}
# simulate_datetime(info, weight, rank, 8)
rank = {'Close to Food': 5, 'Quietness': 2, 'Natural Light': 4, 'Close to Outlet': 3, 'Working Alone': 1}
# simulate_datetime(info, weight, rank, 9)
rank = {'Close to Food': 5, 'Quietness': 3, 'Natural Light': 4, 'Close to Outlet': 1, 'Working Alone': 2}
# simulate_datetime(info, weight, rank, 10)
rank = {'Close to Food': 5, 'Quietness': 3, 'Natural Light': 4, 'Close to Outlet': 2, 'Working Alone': 1}
simulate_datetime(info, weight, rank, 11)

# Write the data to a CSV file
# Keep rank unadjusted for presentation purposes
# headers = ['day', 'time', 'rank', 'forgo none floor', 'forgo none u', 'forgo one floor', 'forgo one u', 'forgo two floor', 'forgo two u', 'forgo three floor', 'forgo three u']
# with open('results.csv','wb') as f:
# 	writer = csv.writer(f)
# 	writer.writerow(headers)
# 	for s in all_sims:
# 		data = [s.day, s.time, s.rank, s.forgo_none[1], s.forgo_none[2], s.forgo_5[1], s.forgo_5[2], s.forgo_45[1], s.forgo_45[2], s.forgo_345[1], s.forgo_345[2]]
# 		writer.writerow(data)

"""
Next:
It would be cool if I could simulate every single possible rank, weight, day and time.
This might be too computationally intensive, so why don't I start out with:
1. Refactor code into functions within a class and test
2. Given the current ranks and weights, generate a file with the results for all possible days and times
3. Do 2 but go through all possible ranks
4. Do 3 but go through all possible weights
5. Figure out how to analyze this data

finding: I think the only way I can make this work is by running the file at separate times with different ranks writing to different files, and then doing a big copy-paste at the end. This is really annoying though, and I have no idea what's wrong

"""

"""
Notes:
Although it may be too early to tell if there are common results since this isn't integrating the proper data yet, we may want to consider a function governing option for alternative solutions based on user rankings. For example, although we ask for 5 preferences, we can assume the first three are the most important, and later ones are less so (We should analyze user surveys to see the probability of each preference being in the top 3). Based on this assumption, students will be seeking out those things specifically, so we can eliminate the alternatives in those cases (i.e. get rid of the "no" branch). That leaves alternatives ("no" branch) for the remaining two preferences. This may be a good approach because it reduces the overall complexity of the tree, as well as alternatives students may not care for.
A different way to do this would be to analyze the following alternatives: yyyyn, yyyny, yynyy, ynyyy, nyyyy

"""
	<file_sep>/README.md
This code was developed as part of a Decision Analysis and Decision Support Systems (DADSS) Spring 2015 project at Carnegie Mellon University. Given a day and time, as well as rankings and weightings for various preferences, our model returns where a student should sit in Hunt Library. Our Excel model had too many variables to simulate easily in Excel (and Excel is slow when it comes to calculating anything complicated), so we wrote this code as a simulator.

languages: Markdown Python


text:
<file_sep>using System;
using System.Collections.Generic;
using System.Text;

namespace ClassLibrary
{
    class Viewer
    {
        public double Grade;
    }
}
<file_sep>using ClassLibrary;
using System;

namespace Display
{
    class Display
    {

        static void Main(string[] args)
        {
            Episode ep1, ep2;

            ep1 = new Episode();
            ep2 = new Episode(2.45,6.78,3.45);
            int i;
            int viewers = 10;

            for (i = 0; i < viewers; i++)
            {
                ep1.AddView(ep1.RandViewerScore());

            }

            Console.WriteLine("Max score: " + ep1.MaxScore());

            if (ep1.AverageScore() > ep2.AverageScore())
            {
                Console.WriteLine($"Viewers: {ep1.ViewerCount()}");   //Ovaj dio ako možete pojasniti kako da mi izbacuje ViewerCount jer mi prikazuje samo 0.
            }
            else
            {
                Console.WriteLine($"Viewers: {ep2.ViewerCount()}");  //Ovaj dio ako možete pojasniti kako da mi izbacuje ViewerCount jer mi prikazuje samo 0.
            }

        }
    }
}

<file_sep>using System;
using System.Collections.Generic;
using System.Text;

namespace ClassLibrary
{
    public class Episode
    {

        public double Scores;
        public int Views = 0;
        public double SumScore;
        public double AvgScore;

        public Episode()
        {

        }
        public Episode(double Views, double SumScore, double AvgScore)
        {

        }

        public double RandViewerScore()
        {

            Random rnd = new Random();
            double MIN_VALUE = 0.0;
            double MAX_VALUE = 10.0;

            double random_num = rnd.NextDouble() * (MAX_VALUE - MIN_VALUE) + MIN_VALUE;

            return random_num;
        }

        public void AddView (double score)
        {
            Views++;

            SumScore += score;
        }

        public double MaxScore()
        {
            return SumScore;
        }

        public double AverageScore()
        {
            AvgScore = SumScore / Views;

            return AvgScore;
        }

        public int ViewerCount()
        {
            return Views;
        }

    }

}

branch_name: refs/heads/main

repo_language: C#


text:
<file_sep>cmake_minimum_required(VERSION 3.6)
project(COMP_3270)

set(CMAKE_CXX_STANDARD 11)

set(SOURCE_FILES main.cpp src/AbstractStrategy.h src/strat_1/Strat1.cpp src/strat_1/Strat1.h src/strat_2/Strat2.cpp src/strat_2/Strat2.h src/strat_3/Strat3.cpp src/strat_3/Strat3.h src/FileHandler.cpp src/FileHandler.h src/ArgParser.cpp src/ArgParser.h src/err_codes.h src/err_codes.cpp src/ValueGenerator.cpp src/ValueGenerator.h src/StrategyTester.cpp src/StrategyTester.h src/Logger.cpp src/Logger.h)
add_executable(COMP_3270 ${SOURCE_FILES})<file_sep>//
// Created by <NAME> on 11/15/16.
//

#ifndef COMP_3270_STRATEGYTESTER_H
#define COMP_3270_STRATEGYTESTER_H

#include <map>
#include "AbstractStrategy.h"
#include "Logger.h"
#include "ValueGenerator.h"

typedef std::map<AbstractStrategy *, std::vector<double>> strategy_time_map;

class StrategyTester {
	const int RUN_COUNT = 5000;

private:
	Logger *logger;
	ValueGenerator *vg;

	std::vector<AbstractStrategy *> strats;
	std::map<AbstractStrategy *, std::string> strat_names;
	strategy_time_map time;

public:
	StrategyTester(Logger *logger, ValueGenerator * vg);

	void addStrategy(AbstractStrategy *strategy, const std::string strat_name);

	void runTest(int size, int run_times);

	void runTest(int size);

	std::vector<AbstractStrategy *> getStrategies();

	strategy_time_map getTimeValues();

	std::string getStrategyName(AbstractStrategy *strategy);
};

#endif //COMP_3270_STRATEGYTESTER_H
<file_sep>//
// Created by <NAME> on 10/24/16.
//

#include <cstdlib>
#include "Strat1.h"
#include "../err_codes.h"

int Strat1::run(std::vector<int> values, size_t &index_l, size_t &index_r) {
	if (values.size() == 0) {
		printErrorAndExit(INVALID_VALUE_ARRAY);
	}

	int smallest = values[0], current = 0;
	size_t ind_l = 0, ind_r = values.size() - 1;

	if (values.size() == 1) {
		return smallest;
	}

	for (size_t i = 0; i < values.size(); i++) {
		for (size_t j = i; j < values.size(); j++) {
			for (size_t k = i; k <= j; k++) {
				current += values[k];
			}

			if (smallest > current) {
				smallest = current;
				ind_l = i;
				ind_r = j;
			}

			current = 0;
		}
	}

	index_l = ind_l;
	index_r = ind_r;

	return smallest;
}
<file_sep>//
// Created by <NAME> on 11/14/16.
//

#include "ArgParser.h"

ArgParser::ArgParser(int argc, char *argv[]) {
	this->file_name_input = "input.txt";
	this->file_name_output = "output.txt";
	this->file_name_time = "time.txt";
}

const std::string &ArgParser::getFileNameInput() const {
	return file_name_input;
}

const std::string &ArgParser::getFileNameOutput() const {
	return file_name_output;
}

const std::string &ArgParser::getFileNameTime() const {
	return file_name_time;
}
<file_sep># Strategy 3 - [\(Reverse of Kadane's Algorithm\)](https://en.wikipedia.org/wiki/Maximum_subarray_problem)

Walk through the array and find the first negative value, set the starting point
to this index and the end point to the same. Add the next value to it. If the
sum of the two numbers is less than 0, then increment the end point and change
the current smallest sum to the most recently calculated one. If the sum were
greater than or equal to 0, do not change anything but step through the array
until a new negative number is found and perform the same steps, only changing
the value of smallest if the current sum is smaller.

## Pseudo-code

    algorithm-3 (A: Array [l ... r] of integer)
    1       smallest_ending_here := 0
    2       ind_l_ending_here := nil
    3       smallest := 0
    4       ind_l := nil
    5       ind_r := nil
    6       has_negative := false
    7       for i := 1 to (n-1)
    8           if A[i] < 0
    9               has_negative := true
    10              break
    11          if A[i] < smallest
    12              smallest := A[i]
    13              ind_l := i
    14              ind_r := i
    15      if !has_negative
    16          return (smallest, ind_l, ind_r)
    17      for i := 1 to (n-1)
    18          smallest_ending_here = smallest_ending_here + A[i]
    19          if smallest_ending_here > 0
    20              smallest_ending_here = 0
    21              ind_l_ending_here = i + 1
    22          if smallest > smallest_ending_here
    23              smallest := smallest_ending_here
    24              ind_l := ind_l_ending_here
    25              ind_r := i
    26          if smallest > A[i]
    27              smallest := A[i]
    28      return (smallest, ind_l, ind_r)

## Time Complexity

| Step   | Cost | Runs  | Total |
| ------:| ----:|:-----:|:-----:|
| **1**  | 1    | 1     | 1     |
| **2**  | 1    | 1     | 1     |
| **3**  | 1    | 1     | 1     |
| **4**  | 1    | 1     | 1     |
| **5**  | 1    | 1     | 1     |
| **6**  | 1    | 1     | 1     |
| **7**  | 1    | n + 1 | n + 1 |
| **8**  | 4    | n     | 4n    |
| **9**  | 1    | n     | n     |
| **10** | 1    | n     | n     |
| **11** | 5    | n     | 5n    |
| **12** | 4    | n     | 4n    |
| **13** | 2    | n     | 2n    |
| **14** | 2    | n     | 2n    |
| **15** | 2    | 1     | 2     |
| **16** | 1    | 1     | 1     |
| **17** | 1    | n + 1 | n + 1 |
| **18** | 6    | n     | 6n    |
| **19** | 2    | n     | 2n    |
| **20** | 1    | n     | n     |
| **21** | 3    | n     | 3n    |
| **22** | 3    | n     | 3n    |
| **23** | 2    | n     | 2n    |
| **24** | 2    | n     | 2n    |
| **25** | 2    | n     | 2n    |
| **26** | 5    | n     | 5n    |
| **27** | 4    | n     | 4n    |
| **28** | 1    | 1     | 1     |

T(n) = 12 + 51n<file_sep>CC = g++
CXXFLAGS  = -g -std=c++0x -Wall

MKDIR_P = mkdir -p
OUT_DIR = build_dir

.PHONY: directories

all: directories strats

directories: ${OUT_DIR}

${OUT_DIR}:
	${MKDIR_P} ${OUT_DIR}

strats: main.cpp ${OUT_DIR}/err_codes.o ${OUT_DIR}/Strat3.o ${OUT_DIR}/Strat2.o ${OUT_DIR}/Strat1.o ${OUT_DIR}/Logger.o ${OUT_DIR}/ValueGenerator.o ${OUT_DIR}/StrategyTester.o ${OUT_DIR}/FileHandler.o ${OUT_DIR}/ArgParser.o
	$(CC) $(CXXFLAGS) -o strats main.cpp ${OUT_DIR}/err_codes.o ${OUT_DIR}/Strat3.o ${OUT_DIR}/Strat2.o ${OUT_DIR}/Strat1.o ${OUT_DIR}/Logger.o ${OUT_DIR}/ValueGenerator.o ${OUT_DIR}/StrategyTester.o ${OUT_DIR}/FileHandler.o ${OUT_DIR}/ArgParser.o

${OUT_DIR}/Strat3.o: src/strat_3/Strat3.cpp
	$(CC) $(CXXFLAGS) -o ${OUT_DIR}/Strat3.o -c src/strat_3/Strat3.cpp

${OUT_DIR}/Strat2.o: src/strat_2/Strat2.cpp
	$(CC) $(CXXFLAGS) -o ${OUT_DIR}/Strat2.o -c src/strat_2/Strat2.cpp

${OUT_DIR}/Strat1.o: src/strat_1/Strat1.cpp
	$(CC) $(CXXFLAGS) -o ${OUT_DIR}/Strat1.o -c src/strat_1/Strat1.cpp

${OUT_DIR}/Logger.o: src/Logger.cpp
	$(CC) $(CXXFLAGS) -o ${OUT_DIR}/Logger.o -c src/Logger.cpp

${OUT_DIR}/ValueGenerator.o: src/ValueGenerator.cpp
	$(CC) $(CXXFLAGS) -o ${OUT_DIR}/ValueGenerator.o -c src/ValueGenerator.cpp

${OUT_DIR}/StrategyTester.o: src/StrategyTester.cpp
	$(CC) $(CXXFLAGS) -o ${OUT_DIR}/StrategyTester.o -c src/StrategyTester.cpp

${OUT_DIR}/FileHandler.o: src/FileHandler.cpp
	$(CC) $(CXXFLAGS) -o ${OUT_DIR}/FileHandler.o -c src/FileHandler.cpp

${OUT_DIR}/ArgParser.o: src/ArgParser.cpp
	$(CC) $(CXXFLAGS) -o ${OUT_DIR}/ArgParser.o -c src/ArgParser.cpp

${OUT_DIR}/err_codes.o: src/err_codes.cpp
	$(CC) $(CXXFLAGS) -o ${OUT_DIR}/err_codes.o -c src/err_codes.cpp

clean:
	rm -rf ${OUT_DIR}/ strats *.dSYM
<file_sep>//
// Created by <NAME> on 11/15/16.
//

#include <iostream>
#include <sstream>
#include <fstream>
#include "Logger.h"

void Logger::emergency(const std::string message) {
	this->log(LL_EMERGENCY, message);
}

void Logger::alert(const std::string message) {
	this->log(LL_ALERT, message);
}

void Logger::critical(const std::string message) {
	this->log(LL_CRITICAL, message);
}

void Logger::error(const std::string message) {
	this->log(LL_ERROR, message);
}

void Logger::warning(const std::string message) {
	this->log(LL_WARNING, message);
}

void Logger::notice(const std::string message) {
	this->log(LL_NOTICE, message);
}

void Logger::info(const std::string message) {
	this->log(LL_INFO, message);
}

void Logger::debug(const std::string message) {
	this->log(LL_DEBUG, message);
}

const std::string Logger::getLogString(LOG_LEVEL level, std::string message) {
	std::stringstream st;

	st << getDateString() << " | ";

	st << getLevelText(level) << ": ";

	st << message;

	return st.str();
}

const std::string Logger::getDateString() const {
	char date[80];
	time_t t = time(0);
	strftime(date, sizeof(date), "%F %T %z", localtime(&t));
	std::stringstream s;
	s << date;
	return s.str();
}

const std::string Logger::getLevelText(LOG_LEVEL &level) const {
	switch (level) {
		case LL_EMERGENCY:
			return "EMERGENCY";
		case LL_ALERT:
			return "ALERT";
		case LL_CRITICAL:
			return "CRITICAL";
		case LL_ERROR:
			return "ERROR";
		case LL_WARNING:
			return "WARNING";
		case LL_NOTICE:
			return "NOTICE";
		case LL_INFO:
			return "INFO";
		case LL_DEBUG:
			return "DEBUG";
		default:
			return "LOG";
	}
}

void ConsoleLogger::log(LOG_LEVEL level, const std::string message) {
	std::cout << this->getLogString(level, message) << std::endl;
}

FileLogger::FileLogger(const std::string &file_name) {
	this->file_name = file_name;

	std::ofstream log_file;
	log_file.open(this->file_name, std::ofstream::out | std::ofstream::trunc);
	log_file.close();
}

void FileLogger::log(LOG_LEVEL level, const std::string message) {
	std::ofstream log_file;
	log_file.open(this->file_name, std::ofstream::out | std::ofstream::app);

	log_file << this->getLogString(level, message) << std::endl;

	log_file.close();
}

FileConsoleLogger::FileConsoleLogger(const std::string &file_name) : FileLogger(file_name) {

}

void FileConsoleLogger::log(LOG_LEVEL level, const std::string message) {
	FileLogger::log(level, message);
	ConsoleLogger::log(level, message);
}
<file_sep>//
// Created by <NAME> on 10/24/16.
//

#ifndef COMP_3270_ABSTRACT_STRATEGY_H
#define COMP_3270_ABSTRACT_STRATEGY_H

#include <utility>
#include <vector>

class AbstractStrategy {
public:
	virtual int run(std::vector<int> values, size_t &index_l, size_t &index_r) = 0;
};

#endif //COMP_3270_ABSTRACT_STRATEGY_H
<file_sep>#include <iostream>
#include <sstream>
#include "src/strat_1/Strat1.h"
#include "src/strat_2/Strat2.h"
#include "src/strat_3/Strat3.h"
#include "src/ArgParser.h"
#include "src/FileHandler.h"
#include "src/ValueGenerator.h"
#include "src/StrategyTester.h"

int main(int argc, char *argv[]) {
	ArgParser *ap = new ArgParser(argc, argv);
	FileHandler *fh = new FileHandler(ap->getFileNameInput(), ap->getFileNameOutput(), ap->getFileNameTime());
	ValueGenerator *vg = new ValueGenerator();
	Logger *logger = new FileConsoleLogger("log.txt");

	std::stringstream s;

	std::vector<int> values = fh->getInputValues();

	int smallest;
	size_t ind_l;
	size_t ind_r;

	AbstractStrategy *s1 = new Strat1();
	AbstractStrategy *s2 = new Strat2();
	AbstractStrategy *s3 = new Strat3();

	StrategyTester *st = new StrategyTester(logger, vg);
	st->addStrategy(s1, "Strat1");
	st->addStrategy(s2, "Strat2");
	st->addStrategy(s3, "Strat3");

	std::vector<AbstractStrategy *> strats = st->getStrategies();

	for (std::vector<AbstractStrategy *>::iterator iter = strats.begin(); iter != strats.end(); iter++) {
		s << "Running file test: " << st->getStrategyName(*iter);
		logger->info(s.str());
		s.str("");

		smallest = (*iter)->run(values, ind_l, ind_r);
		fh->addOutputValues(smallest, ind_l, ind_r);
	}

	std::vector<int> size_set = { 100, 500, 1000,
	                              1500, 2000, 2500,
	                              3000, 3500, 4000,
	                              4500, 5000, 5500,
	                              6000, 6500, 7000,
	                              7500, 8000, 8500,
	                              9000, 9500, 10000
	};

	for (std::vector<int>::iterator iter = size_set.begin(); iter != size_set.end(); iter++) {
		s << "Running Set Size: " << *iter;
		logger->info(s.str());
		s.str("");

		st->runTest(*iter);

		s << "Finished Set Size: " << *iter;
		logger->info(s.str());
		s.str("");
	}

	strategy_time_map times = st->getTimeValues();

	for (strategy_time_map::iterator iter = times.begin(); iter != times.end(); iter++) {
		fh->addTimeValues((*iter).second);
	}

	return 0;
}<file_sep>//
// Created by <NAME> on 11/14/16.
//

#include <cstdlib>
#include "Strat2.h"
#include "../err_codes.h"

int Strat2::run(std::vector<int> values, size_t &index_l, size_t &index_r) {
	if (values.size() == 0) {
		printErrorAndExit(INVALID_VALUE_ARRAY);
	}

	int smallest = values[0], current = 0;
	size_t ind_l = 0, ind_r = values.size() - 1;

	if (values.size() == 1) {
		return smallest;
	}

	std::vector<size_t> negative_indices;

	for (size_t i = 0; i < values.size(); i++) {
		if (values[i] < 0) {
			negative_indices.push_back(i);
		}

		if (values[i] < smallest) {
			smallest = values[i];
			ind_l = i;
			ind_r = i;
		}
	}

	for (size_t i = 0; i < negative_indices.size(); i++) {
		for (size_t j = i; j < negative_indices.size(); j++) {
			size_t temp_ind_l = negative_indices[i],
					temp_ind_r = negative_indices[j];

			for (size_t k = temp_ind_l; k <= temp_ind_r; k++) {
				current += values[k];
			}

			if (smallest > current) {
				smallest = current;
				ind_l = temp_ind_l;
				ind_r = temp_ind_r;
			}

			current = 0;
		}
	}

	index_l = ind_l;
	index_r = ind_r;

	return smallest;
}
<file_sep>//
// Created by <NAME> on 11/14/16.
//

#include "err_codes.h"

void printErrorAndExit(ERR_CODE err_code) {
	std::cout << "ERROR:\t";

	switch (err_code) {
		case INVALID_VALUE_ARRAY:
			std::cout << "INVALID_VALUE_ARRAY";
			break;
		case FILE_FORMAT_INVALID:
			std::cout << "FILE_FORMAT_INVALID";
			break;
		case INPUT_FILE_NOT_FOUND:
			std::cout << "INPUT_FILE_NOT_FOUND";
			break;
	}

	std::cout << std::endl;

	std::exit(err_code);
}<file_sep>//
// Created by <NAME> on 11/14/16.
//

#ifndef COMP_3270_STRAT3_H
#define COMP_3270_STRAT3_H

#include <vector>
#include "../AbstractStrategy.h"

class Strat3 : public AbstractStrategy {
public:
	int run(std::vector<int> values, size_t &index_l, size_t &index_r) override;
};

#endif //COMP_3270_STRAT3_H
<file_sep>//
// Created by <NAME> on 11/14/16.
//

#ifndef COMP_3270_ARGPARSER_H
#define COMP_3270_ARGPARSER_H

#include <string>

class ArgParser {
private:
	std::string file_name_input;
	std::string file_name_output;
	std::string file_name_time;
public:
	ArgParser(int argc, char *argv[]);

	const std::string &getFileNameInput() const;

	const std::string &getFileNameOutput() const;

	const std::string &getFileNameTime() const;
};

#endif //COMP_3270_ARGPARSER_H
<file_sep>//
// Created by <NAME> on 11/15/16.
//

#ifndef COMP_3270_LOGGER_H
#define COMP_3270_LOGGER_H

#include <string>

enum LOG_LEVEL {
	LL_EMERGENCY,
	LL_ALERT,
	LL_CRITICAL,
	LL_ERROR,
	LL_WARNING,
	LL_NOTICE,
	LL_INFO,
	LL_DEBUG,
};

class Logger {
public:
	void emergency(const std::string message);

	void alert(const std::string message);

	void critical(const std::string message);

	void error(const std::string message);

	void warning(const std::string message);

	void notice(const std::string message);

	void info(const std::string message);

	void debug(const std::string message);

	virtual void log(LOG_LEVEL level, const std::string message)= 0;

protected:
	const std::string getLogString(LOG_LEVEL level, std::string message);

	const std::string getLevelText(LOG_LEVEL &level) const;

	const std::string getDateString() const;
};

class ConsoleLogger : virtual public Logger {
public:
	void log(LOG_LEVEL level, const std::string message) override;
};

class FileLogger : virtual public Logger {
protected:
	std::string file_name;
public:
	FileLogger(const std::string &file_name);

public:
	void log(LOG_LEVEL level, const std::string message) override;
};

class FileConsoleLogger : virtual public FileLogger, virtual public ConsoleLogger {
public:
	FileConsoleLogger(const std::string &file_name);

	void log(LOG_LEVEL level, const std::string message) override;
};

#endif //COMP_3270_LOGGER_H
<file_sep>//
// Created by <NAME> on 11/14/16.
//

#ifndef COMP_3270_FILEHANDLER_H
#define COMP_3270_FILEHANDLER_H

#include <string>
#include <vector>

class FileHandler {
public:
	FileHandler(const std::string &fn_input, const std::string &fn_output, const std::string &fn_time);

	std::vector<int> getInputValues();

	void addOutputValues(int smallest, size_t index_l, size_t index_r);

	void addTimeValues(std::vector<double> strat_time);

private:
	std::string file_name_input;
	std::string file_name_output;
	std::string file_name_time;

};

#endif //COMP_3270_FILEHANDLER_H
<file_sep># Strategy 2 - (Self Designed)

Pass over the array one time and add the index of any negative integers into
an array. Iterate over these indices using the process from strategy 1 using
the indices that are in the array since adding a positive number as the last
or first number in the series will not yield a lower result.

## Pseudo-code

    algorithm-2 (A: Array [1 ... n] of integer)
    1       negatives := []
    2       m = 0
    3       for i := 1 to (n-1)
    4           if A[i] < 0
    5               negatives.append(i)
    6               m = m + 1
    7           if A[i] < smallest
    8               smallest := A[i]
    9               ind_l := i
    10              ind_r := i
    11      smallest := nil
    12      ind_l := nil
    13      ind_r := nil
    14      current := 0
    15      for i := 1 to (m-1)
    16          for j := i to (m-1)
    17              for k := negatives[i] to negatives[j]
    18                  current := current + A[k]
    19              if smallest = nil or smallest > current
    20                  smallest := current
    21                  ind_l := i
    22                  ind_r := j
    23              current := 0
    24      return (smallest, ind_l, ind_r)

## Time Complexity

This strategies time complexity is difficult to calculate since the size of `m` is relative
to the amount of negative integers in `A`. Since this can be anywhere from 0 to `n`, I calculated
the worst case. This will likely be different from the curve actually calculated since the average
case (on a random set of integers) will likely have `n/2` negative numbers in it. Due to this,
I have included the upper and lower bounds below.

Ω(n) = n
O(n) = n^3

| Step   | Cost | Runs                     | Total                      |
| ------:| ----:|:------------------------:|:--------------------------:|
| **1**  | 1    | 1                        | 1                          |
| **2**  | 1    | 1                        | 1                          |
| **3**  | 1    | n                        | n                          |
| **4**  | 4    | n - 1                    | 4n - 4                     |
| **5**  | 1    | n - 1                    | n - 1                      |
| **6**  | 3    | n - 1                    | 3n - 3                     |
| **7**  | 5    | n - 1                    | 5n - 5                     |
| **8**  | 4    | n - 1                    | 4n - 4                     |
| **9**  | 2    | n - 1                    | 2n - 2                     |
| **10** | 2    | n - 1                    | 2n - 2                     |
| **11** | 1    | 1                        | 1                          |
| **12** | 1    | 1                        | 1                          |
| **13** | 1    | 1                        | 1                          |
| **14** | 1    | 1                        | 1                          |
| **15** | 1    | n                        | n                          |
| **16** | 1    | n(n + 1)/2 - 1           | n(n + 1)/2 - 1             |
| **17** | 1    | 2*n^3 - 3*n^2 + n        | 2*n^3 - 3*n^2 + n          |
| **18** | 6    | 2*n^3 - 7/2*n^2 + 3/2n   | 6 (2*n^3 - 7/2*n^2 + 3/2n) |
| **19** | 5    | 2*n^3 - 3*n^2 + n        | 5 (2*n^3 - 3*n^2 + n)      |
| **20** | 2    | 2*n^3 - 3*n^2 + n        | 2 (2*n^3 - 3*n^2 + n)      |
| **21** | 2    | 2*n^3 - 3*n^2 + n        | 2 (2*n^3 - 3*n^2 + n)      |
| **22** | 1    | 2*n^3 - 3*n^2 + n        | 2*n^3 - 3*n^2 + n          |
| **23** | 1    | 2*n^3 - 3*n^2 + n        | 2*n^3 - 3*n^2 + n          |
| **24** | 1    | 1                        | 1                          |

### Worst Case
T(n) = 1/2 * (72*n^3 - 113*n^2 + 89*n - 28)

### Expected Average Case
T(n) = 1/2 * (72*(n/2)^3 - 113*(n/2)^2 + 89*(n/2) - 28)<file_sep>//
// Created by <NAME> on 11/14/16.
//

#ifndef COMP_3270_ERR_CODES_H
#define COMP_3270_ERR_CODES_H

#include <cstdlib>
#include <iostream>

enum ERR_CODE {
	INVALID_VALUE_ARRAY,
	FILE_FORMAT_INVALID,
	INPUT_FILE_NOT_FOUND
};

void printErrorAndExit(ERR_CODE err_code);

#endif //COMP_3270_ERR_CODES_H
<file_sep>//
// Created by <NAME> on 11/14/16.
//

#include <sstream>
#include <fstream>
#include "FileHandler.h"
#include "err_codes.h"

FileHandler::FileHandler(const std::string &fn_input, const std::string &fn_output, const std::string &fn_time) {
	this->file_name_input = fn_input;
	this->file_name_output = fn_output;
	this->file_name_time = fn_time;

	std::ofstream out_file;
	out_file.open(this->file_name_output, std::ofstream::out | std::ofstream::trunc);
	out_file.close();

	out_file.open(this->file_name_time, std::ofstream::out | std::ofstream::trunc);
	out_file.close();
}

std::vector<int> FileHandler::getInputValues() {
	std::ifstream in_file(this->file_name_input);

	if (!in_file.is_open()) {
		printErrorAndExit(INPUT_FILE_NOT_FOUND);
	}

	std::vector<int> result;
	std::string line;
	std::getline(in_file, line);

	int length = std::stoi(line);

	std::getline(in_file, line);
	in_file.close();

	std::stringstream line_stream(line);
	std::string value;

	while (std::getline(line_stream, value, ',')) {
		result.push_back(std::stoi(value));
	}

	if (length != result.size()) {
		printErrorAndExit(FILE_FORMAT_INVALID);
	}

	return result;
}

void FileHandler::addOutputValues(int smallest, size_t index_l, size_t index_r) {
	std::ofstream out_file;
	out_file.open(this->file_name_output, std::ofstream::out | std::ofstream::app);

	out_file << smallest << ", " << index_l << ", " << index_r << std::endl;

	out_file.close();
}

void FileHandler::addTimeValues(std::vector<double> strat_time) {
	std::ofstream out_file;
	out_file.open(this->file_name_time, std::ofstream::out | std::ofstream::app);

	for (std::vector<double>::iterator iter_st = strat_time.begin(); iter_st != strat_time.end(); iter_st++) {
		out_file << std::fixed << *iter_st << std::scientific;

		if (iter_st + 1 != strat_time.end()) {
			out_file << ", ";
		}
	}

	out_file << std::endl;

	out_file.close();
}
<file_sep>//
// Created by <NAME> on 11/15/16.
//

#include "StrategyTester.h"
#include <chrono>
#include <sstream>

void StrategyTester::addStrategy(AbstractStrategy *strategy, const std::string strat_name) {
	std::stringstream s;

	s << "Adding strategy: " << strat_name;
	logger->info(s.str());
	s.str("");

	this->strats.push_back(strategy);
	this->strat_names[strategy] = strat_name;

	this->time[strategy] = std::vector<double>();
}

void StrategyTester::runTest(int size, int run_times) {
	std::stringstream s;

	std::vector<int> values = this->vg->genRandomValues(size);

	for (std::vector<AbstractStrategy*>::iterator iter = this->strats.begin(); iter != this->strats.end(); iter++) {
		size_t ind_l = 0, ind_r = 0;
		double total_time = 0;

		s << "Running: " << this->strat_names[*iter];
		logger->info(s.str());
		s.str("");

		for (int i = 0; i < run_times; i++) {
			std::chrono::high_resolution_clock::time_point t1 = std::chrono::high_resolution_clock::now();

			(*iter)->run(values, ind_l, ind_r);

			std::chrono::high_resolution_clock::time_point t2 = std::chrono::high_resolution_clock::now();

			total_time += std::chrono::duration_cast<std::chrono::microseconds>(t2 - t1).count();
		}

		s << "Finished: " << this->strat_names[*iter];
		logger->info(s.str());
		s.str("");

		total_time /= run_times;

		this->time[*iter].push_back(total_time);
	}
}

void StrategyTester::runTest(int size) {
	this->runTest(size, this->RUN_COUNT);
}

strategy_time_map StrategyTester::getTimeValues() {
	return this->time;
}

StrategyTester::StrategyTester(Logger *logger, ValueGenerator *vg) {
	this->logger = logger;
	this->vg = vg;
}

std::vector<AbstractStrategy *> StrategyTester::getStrategies() {
	return this->strats;
}

std::string StrategyTester::getStrategyName(AbstractStrategy *strategy) {
	return this->strat_names[strategy];
}
<file_sep>//
// Created by <NAME> on 11/14/16.
//

#include <cstdlib>
#include "Strat3.h"
#include "../err_codes.h"

int Strat3::run(std::vector<int> values, size_t &index_l, size_t &index_r) {
	if (values.size() == 0) {
		printErrorAndExit(INVALID_VALUE_ARRAY);
	}

	bool has_negative = false;

	int smallest = values[0];
	size_t ind_l = 0, ind_r = values.size() - 1;

	if (values.size() == 1) {
		return smallest;
	}

	for (size_t i = 0; i < values.size(); i++) {
		if (values[i] < 0) {
			has_negative = true;
			break;
		}

		if (values[i] < smallest) {
			smallest = values[i];
			ind_l = i;
			ind_r = i;
		}
	}

	if (!has_negative) {
		return smallest;
	}

	int smallest_ending_here = 0;
	size_t ind_l_ending_here = 0;

	for (size_t i = 0; i < values.size(); i++) {
		smallest_ending_here += values[i];

		if (smallest_ending_here > 0) {
			smallest_ending_here = 0;
			ind_l_ending_here = i + 1;
		}

		if (smallest > smallest_ending_here) {
			smallest = smallest_ending_here;
			ind_l = ind_l_ending_here;
			ind_r = i;
		}

		if (smallest > values[i]) {
			smallest = values[i];
			ind_l = i;
			ind_r = i;
		}
	}

	index_l = ind_l;
	index_r = ind_r;

	return smallest;
}
<file_sep>//
// Created by <NAME> on 11/14/16.
//

#ifndef COMP_3270_VALUEGENERATOR_H
#define COMP_3270_VALUEGENERATOR_H

#include <vector>

class ValueGenerator {
public:
	std::vector<int> genRandomValues(int size, int value_min, int value_max);

	std::vector<int> genRandomValues(int size);
};

#endif //COMP_3270_VALUEGENERATOR_H
<file_sep>//
// Created by <NAME> on 11/14/16.
//

#include <cstdlib>
#include "ValueGenerator.h"

std::vector<int> ValueGenerator::genRandomValues(int size, int value_min, int value_max) {
	std::vector<int> values;

	int top = value_max + 1 - value_min;

	for (int i = 0; i < size; i++) {
		values.push_back(std::rand() % top + value_min);
	}

	return values;
}

std::vector<int> ValueGenerator::genRandomValues(int size) {
	return this->genRandomValues(size, -1000, 1000);
}
<file_sep># Strategy 1 - (Self Designed)

Iterate over the list of integers starting from the first value in the array
to the last value. Using two loops, start by pointing them both at the first
value and then incrementing the inner loop by one until the end of the array
is reached. When a sum is calculated, compare it to the current value of the
smallest known sum and if it is smaller, overwrite it and update the indices
of the range.

## Pseudo-code

    algorithm-1 (A: Array [1 ... n] of integer)
    1       smallest := A[0]
    2       ind_l := 0
    3       ind_r := 0
    4       current := 0
    5       for i := 1 to (n-1)
    6           for j := i to (n-1)
    7               for k := i to j
    8                   current := current + A[k]
    9               if smallest = nil or smallest > current
    10                  smallest := current
    11                  ind_l := i
    12                  ind_r := j
    13              current := 0
    14      return (smallest, ind_l, ind_r)

## Time Complexity

| Step   | Cost | Runs                   | Total                     |
| ------:| ----:|:----------------------:|:-------------------------:|
| **1**  | 1    | 1                      | 1                         |
| **2**  | 1    | 1                      | 1                         |
| **3**  | 1    | 1                      | 1                         |
| **4**  | 1    | 1                      | 1                         |
| **5**  | 1    | n                      | n                         |
| **6**  | 1    | n(n + 1) / 2 - 1       | n(n + 1)/2 - 1            |
| **7**  | 1    | 2*n^3 - 3*n^2 + n      | 2*n^3 - 3*n^2 + n         |
| **8**  | 6    | 2*n^3 - 7/2*n^2 + 3/2n | 6(2*n^3 - 7/2*n^2 + 3/2n) |
| **9**  | 5    | 2*n^3 - 3*n^2 + n      | 5(2*n^3 - 3*n^2 + n)      |
| **10** | 2    | 2*n^3 - 3*n^2 + n      | 2(2*n^3 - 3*n^2 + n)      |
| **11** | 2    | 2*n^3 - 3*n^2 + n      | 2(2*n^3 - 3*n^2 + n)      |
| **12** | 2    | 2*n^3 - 3*n^2 + n      | 2(2*n^3 - 3*n^2 + n)      |
| **13** | 1    | 2*n^3 - 3*n^2 + n      | 2*n^3 - 3*n^2 + n         |
| **14** | 1    | 1                      | 1                         |

T(n) = 1/2 * (76*n^3 - 119*n^2 + 47*n + 8)

languages: Makefile Markdown C++ CMake

repo_language: Makefile


text:
<file_sep># hello-world
This is just another repo
I love to work on and learn programming languages. They could be quite tasking and time consuming but they are very worth it.