Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I don't know where to take on it? #139

Closed
shiG3L opened this issue Dec 3, 2021 · 4 comments
Closed

I don't know where to take on it? #139

shiG3L opened this issue Dec 3, 2021 · 4 comments

Comments

@shiG3L
Copy link

shiG3L commented Dec 3, 2021

I'm sorry that. Could author give us several examples about how to use this package? Thanks very much

@eribean
Copy link
Owner

eribean commented Dec 3, 2021

I will get to it by the end of the day. Can you provide what exactly it is you'd like to see? Do you want reading from a .csv file, using pandas?

@shiG3L

This comment has been minimized.

@eribean
Copy link
Owner

eribean commented Dec 6, 2021

@shiG3L, Here is an example using a trimmed dataset as an excel file. Does this help?

import pandas as pd
from girth import grm_mml

# Read data into pandas dataframe
url = 'https://girth-examples.s3.us-south.cloud-object-storage.appdomain.cloud/subset_trim_example.xlsx'
dataset  = pd.read_excel(url)

# Girth expects numpy arrays, convert and transpose
np_dataset = dataset.to_numpy().T

# Exclude the case number
np_final = np_dataset[1:, :]

# Run the irt
results = grm_mml(np_final.astype('int'))

print(results['Discrimination'])

@shiG3L
Copy link
Author

shiG3L commented Dec 8, 2021

I really appreciate it. @eribean

@eribean eribean closed this as completed Dec 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants