Giter VIP home page Giter VIP logo

test-decrypt's Introduction

Дешифровка тестов

  1. Определение склонности к отклоняющемуся поведению (А. Н. Орел)

Методика диагностики склонности к отклоняющемуся поведению (Определение склонности к отклоняющемуся поведению по А. Н. Орел) является стандартизированным тест-опросником, предназначенным для измерения готовности (склонности) подростков к реализации различных форм отклоняющегося поведения. Опросник представляет собой набор специализированных психодиагностических шкал, направленных на измерение готовности (склонности к реализации отдельных форм отклоняющегося поведения.

  1. Суицидальная мотивация (Ю.Р.Вагин, 1998)

Тест позволяет выявить и количественно оценить семь основных мотивационных аспектов суицидального поведения

Пример данных для обработки данных для теста №1

[
  {
    "ФИО": "Иван Иванович",
    "gender": "m",
    "answer": [
      {
        "question": "Выберите ваш пол",
        "answer": 1
      },
      {
        "question": "Я стремлюсь в одежде следовать самой современной моде или даже опережать ее",
        "answer": 1
      } 
    ]
  }
]

Пример рабочего кода для обработки результатов для теста №1

import pandas as pd
import json
from social_deviation import SocialDeviation

df = pd.read_csv("./data/api_test1.csv", delimiter=",", header=None)
df.columns = ['id','user_id', 'answer', 'gender']

index_db = 11
answer = df.iloc[index_db]['answer']
gender = df.iloc[index_db]['gender']
answer = json.loads(answer)

sd = SocialDeviation()
sd.process_answer(answer=answer, gender=gender)
results = sd.humanize_result()

for scale in results:
    print(scale['Scale'])
    print(scale['ScaleValue'])
    print(scale['Decryption'])
    print()
    print("="*30)



Пример данных для обработки данных для теста №2

[
  {
    "ФИО": "Иван Иванович",
    "gender": "m",
    "answer": [
      {
        "question": "Совершали ли вы попытку/попытки самоубийства?",
        "answer": 1
      },
      {
        "question": "Думал, что если умру, то всем будет только лучше",
        "answer": 0
      } 
    ]
  }
]

Пример рабочего кода для обработки результатов для теста №2

from suicidal_motivation import SuicidalMotivation
import pandas as pd
import json

df = pd.read_csv("./data/api_test2.csv", delimiter=",", header=None)
df.columns = ['id','user_id', 'answer', ]

index_db = 0
print(df.iloc[index_db])
answer = df.iloc[index_db]['answer']
answer = json.loads(answer)

sm = SuicidalMotivation()
sm.process_answer(answer=answer)
results = sm.humanize_result()

for scale in results:
    print(scale['Scale'])
    print(scale['ScaleValue'])
    print()
    print("="*30)

test-decrypt's People

Contributors

mr8bit avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.