Форум врачей-аспирантов

Здравствуйте, гость ( Вход | Регистрация )

> Как грамотно поделить выборку на несколько сегментов перед предсказанием?, Деление выборки по неизвестным критериям
smeilz
сообщение 7.07.2020 - 16:18
Сообщение #1





Группа: Пользователи
Сообщений: 7
Регистрация: 2.07.2020
Пользователь №: 39533



Добрый день.
Есть очень большая выборка для бинарной классификации. Нужно предсказать 2 класса(0/1)
Есть огромная куча предикторов(независимых переменных), все они категориальные, и известно, что выборка содержит в себе несколько сегментов, в которых поведение предсказываемых классов будет существенно отличаться. Количество сегментов неизвестно.
Как грамотно найти эти сегменты и поделить выборку для дальнейшего предсказания?

Сообщение отредактировал smeilz - 7.07.2020 - 16:19
Вернуться в начало страницы
 
+Ответить с цитированием данного сообщения
 
 
Открыть тему
Ответов
comisora
сообщение 10.07.2020 - 15:28
Сообщение #2





Группа: Пользователи
Сообщений: 107
Регистрация: 27.12.2015
Пользователь №: 27815



Всем добрый день.

Самая первая/последняя книга по данной тематике, которую читал - Mair P. Modern Psychometrics with R (Use R!). 2018, https://doi.org/10.1007/978-3-319-93177-7 . В книге есть картинка (в приложении), примеры получения результатов PCA при помощи Gifi на интервальных данных. Объяснение математики там коротенькое:

"First of all, Gifi models involve dimension reduction, just as principal component analysis (PCA) and correspondence analysis (CA). Let p be the number of dimensions which needs to be fixed a priori. Let H be an n × m data matrix. Correspondingly, hj represents the column vector for variable j with kj as the number of categories. For each variable we define an indicator matrix Gj of dimension n×kj, consisting of 0s and 1s in the case of categorical data. These indicator matrices can be then collected in an indicator supermatrix G = (G1| . . . |Gm). Each variable is associated with a matrix Yj of dimension kj × p containing the category quantifications. The final component we need is the matrix X. It contains the so-called object scores and is of dimension n × p. At the end of the day, each person gets a score in the p-dimensional space, and each category of variable j gets an optimally scaled category quantification in p dimensions. Since we scale both the objects and the variables, these methods are sometimes referred to as dual scaling methods. Putting all these ingredients together, Gifi establishes the following loss function:

σ(X, Y1, . . . , Ym) = m ЗНАК СУММЫ j=1 tr(X − Gj Yj )(X − Gj Yj )

The right-hand side of the equation represents a sum-of-squares (SS) expression that needs to be minimized. This can be achieved by an alternating least squares (ALS) algorithm. This loss formulation is very general, and, depending on the particular Gifi model we fit, it simplifies correspondingly, or, for some versions, it can even get more complicated (see De Leeuw and Mair, 2009a)."

По моему опыту использования движок в пакете Gifi делает оптимальное шкалирование лучше функции lineals пакета {aspect}. Настроек там много, лучший вариант трансформации приходится искать перебором. К сожалению в пакете нет отдельной возможности получить просто трансформацию данных без последующего выполнения PCA. В этой связи приходится трансформированные данные извлекать из большого контейнера с данными. Есть ещё пакеты {optiscale}, {bestNormalize} и {smacof}, которые могут быть полезны при решении вопроса трансформации данных.

Ссылки из книги:
De Leeuw, J. (1988). Multivariate analysis with linearizable regressions. Psychometrika, 53, 437?454.
De Leeuw, J., & Mair, P. (2009a). Gifi methods for optimal scaling in R: The package homals. Journal of Statistical Software, 31(1), 1?21. https://www.jstatsoft.org/index.php/jss/article/view/v031i04
De Leeuw, J., & Mair, P. (2009b). Simple and canonical correspondence analysis using the R package anacor. Journal of Statistical Software, 31(5), 1?18. http://www.jstatsoft.org/v31/i05/
De Leeuw, J., Mair, P., & Groenen, P. J. F. (2017). Multivariate analysis with optimal scaling. http://gifi.stat.ucla.edu/gifi/_book/
Gifi, A. (1990). Nonlinear multivariate analysis. Chichester: Wiley.
Haegeli, P., Gunn, M., & Haider, W. (2012). Identifying a high-risk cohort in a complex and dynamic risk environment: Out-of-bounds skiing?An example from avalanche safety. Prevention Science, 13, 562?573.
Hoyle, R. H., Stephenson, M. T., Palmgreen, P., Pugzles Lorch, E., & Donohew, R. L. (2002). Reliability and validity of a brief measure of sensation seeking. Personality and Individual Differences, 32, 401?414.
Jacoby, W. G. (1991). Data theory and dimensional analysis. Thousand Oaks: Sage.
Jacoby, W. G. (1999). Levels of measurement and political research: An optimistic view. American Journal of Political Science, 43, 271?301.
Koller, I., Levenson, M. R., & Glück, J. (2017). What do you think you are measuring? A mixedmethods procedure for assessing the content validity of test items and theory-based scaling. Frontiers in Psychology, 8(126), 1?20.
Linting, M., Meulman, J. J., Groenen, P. J. F., & van der Kooij, A. J. (2007). Nonlinear principal components analysis: Introduction and application. Psychological Methods, 12, 336?358.

Профили авторов пакета {Gifi} с их публикациями:
https://www.researchgate.net/profile/Jan_De_Leeuw
https://www.researchgate.net/profile/Patrick_Mair

Может кому-то пригодится.

Эскизы прикрепленных изображений
Прикрепленное изображение
 
Вернуться в начало страницы
 
+Ответить с цитированием данного сообщения
 

Сообщений в этой теме
- smeilz   Как грамотно поделить выборку на несколько сегментов перед предсказанием?   7.07.2020 - 16:18
- - ogurtsov   Кластеризацию нужно сделать, а уж какую - тут мног...   7.07.2020 - 20:07
- - passant   Уважаемый smeilz. Что-то вы начинаете "путат...   8.07.2020 - 11:30
|- - 100$   ЦитатаКроме того, вы так и не пояснили, что означа...   8.07.2020 - 19:41
|- - smeilz   Цитата(passant @ 8.07.2020 - 11:30) ...   10.07.2020 - 15:09
|- - ogurtsov   Цитата(smeilz @ 10.07.2020 - 15:09) ...   10.07.2020 - 18:23
|- - smeilz   Цитата(ogurtsov @ 10.07.2020 - 18:23...   10.07.2020 - 22:23
- - 100$   А мне очень интересно, как скоро в этой теме появ...   8.07.2020 - 18:42
|- - ogurtsov   Цитата(100$ @ 8.07.2020 - 18:42...   8.07.2020 - 19:05
- - passant   Нет, коллеги. В данном случае - вы ошибаетесь. Это...   8.07.2020 - 21:31
|- - 100$   passant, поскольку Андрей (Огурцов) ничего ошибо...   9.07.2020 - 00:17
- - passant   Цитата(100$ @ 9.07.2020 - 00:17...   9.07.2020 - 10:55
- - nokh   Цитата(smeilz @ 7.07.2020 - 18:18) Д...   9.07.2020 - 21:11
|- - 100$   Цитата(nokh @ 9.07.2020 - 21:11) Бол...   9.07.2020 - 21:50
||- - nokh   Цитата(100$ @ 9.07.2020 - 23:50...   10.07.2020 - 08:10
||- - 100$   Цитата(nokh @ 10.07.2020 - 08:10) Да...   10.07.2020 - 10:48
|- - smeilz   Цитата(nokh @ 9.07.2020 - 21:11) Ваш...   10.07.2020 - 15:13
- - comisora   Всем добрый день. Самая первая/последняя книга по...   10.07.2020 - 15:28
- - 100$   Ну вот, господа кластеризаторы и примкнувшие к ним...   10.07.2020 - 18:32
|- - ogurtsov   Цитата(100$ @ 10.07.2020 - 18:3...   10.07.2020 - 19:14
||- - 100$   Цитата(ogurtsov @ 10.07.2020 - 19:14...   10.07.2020 - 20:30
||- - smeilz   Цитата(ogurtsov @ 10.07.2020 - 19:14...   10.07.2020 - 21:57
|- - smeilz   Цитата(100$ @ 10.07.2020 - 18:3...   10.07.2020 - 21:53
||- - 100$   Цитата(smeilz @ 10.07.2020 - 21:53) ...   10.07.2020 - 22:56
|- - smeilz   Цитата(100$ @ 10.07.2020 - 18:3...   10.07.2020 - 22:42
- - passant   Цитата(smeilz @ 10.07.2020 - 22:42) ...   10.07.2020 - 23:18


Добавить ответ в эту темуОткрыть тему