| 1 |
/* praat_MDS_init.cpp |
| 2 |
* |
| 3 |
* Copyright (C) 1992-2021 David Weenink |
| 4 |
* |
| 5 |
* This code is free software; you can redistribute it and/or modify |
| 6 |
* it under the terms of the GNU General Public License as published by |
| 7 |
* the Free Software Foundation; either version 2 of the License, or (at |
| 8 |
* your option) any later version. |
| 9 |
* |
| 10 |
* This code is distributed in the hope that it will be useful, but |
| 11 |
* WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 |
* General Public License for more details. |
| 14 |
* |
| 15 |
* You should have received a copy of the GNU General Public License |
| 16 |
* along with this work. If not, see <http://www.gnu.org/licenses/>. |
| 17 |
*/ |
| 18 |
|
| 19 |
/* |
| 20 |
djmw 20020408 GPL |
| 21 |
djmw 20020408 Added MDS-tutorial |
| 22 |
djmw 20020603 Changes due to TableOfReal dynamic menu changes. |
| 23 |
djmw 20040415 Forms texts. |
| 24 |
djmw 20040513 More forms text changes |
| 25 |
djmw 20041027 Orhogonal transform parameter for Configurations_to_Procrustes |
| 26 |
djmw 20050406 classProcrustus -> classProcrustes. |
| 27 |
djmw 20050426 Removed "Procrustus.h" |
| 28 |
djmw 20050630 Better name of Procrustes object after Configurations_to_Procrustes. |
| 29 |
djmw 20061218 Introduction of Melder_information<12...9> |
| 30 |
djmw 20070902 Melder_new<1...> |
| 31 |
djmw 20071011 REQUIRE requires U"". |
| 32 |
djmw 20090818 Thing_recognizeClassesByName: added classAffineTransform, classScalarProduct, classWeight |
| 33 |
*/ |
| 34 |
|
| 35 |
#include "NUM2.h" |
| 36 |
#include "MDS.h" |
| 37 |
#include "ContingencyTable.h" |
| 38 |
#include "TableOfReal_extensions.h" |
| 39 |
#include "Configuration_and_Procrustes.h" |
| 40 |
#include "Configuration_AffineTransform.h" |
| 41 |
#include "Proximity_and_Distance.h" |
| 42 |
#include "Confusion.h" |
| 43 |
#include "Formula.h" |
| 44 |
|
| 45 |
#include "praatM.h" |
| 46 |
|
| 47 |
void praat_TableOfReal_init2 (ClassInfo klas); |
| 48 |
|
| 49 |
static const conststring32 QUERY_BUTTON = U"Query -"; |
| 50 |
static const conststring32 DRAW_BUTTON = U"Draw -"; |
| 51 |
static const conststring32 ANALYSE_BUTTON = U"Analyse -"; |
| 52 |
static const conststring32 CONFIGURATION_BUTTON = U"To Configuration -"; |
| 53 |
|
| 54 |
/* Tests */ |
| 55 |
|
| 56 |
/************************* examples ***************************************/ |
| 57 |
|
| 58 |
FORM (CREATE_ONE__Dissimilarity_createLetterRExample, U"Create letter R example", U"Create letter R example...") { |
| 59 |
COMMENT (U"For the monotone transformation on the distances") |
| 60 |
REAL (noiseRange, U"Noise range", U"32.5") |
| 61 |
OK |
| 62 |
DO |
| 63 |
CREATE_ONE |
| 64 |
autoDissimilarity result = Dissimilarity_createLetterRExample (noiseRange); |
| 65 |
CREATE_ONE_END (U"R") |
| 66 |
} |
| 67 |
|
| 68 |
FORM (CREATE_MULTIPLE_INDSCAL_createCarrollWishExample, U"Create INDSCAL Carroll & Wish example...", U"Create INDSCAL Carroll & Wish example...") { |
| 69 |
REAL (noiseStandardDeviation, U"Noise standard deviation", U"0.0") |
| 70 |
OK |
| 71 |
DO |
| 72 |
CREATE_MULTIPLE |
| 73 |
praat_new (INDSCAL_createCarrollWishExample (noiseStandardDeviation), U""); |
| 74 |
CREATE_MULTIPLE_END |
| 75 |
} |
| 76 |
|
| 77 |
FORM (CREATE_ONE__Configuration_create, U"Create Configuration", U"Create Configuration...") { |
| 78 |
WORD (name, U"Name", U"uniform") |
| 79 |
NATURAL (numberOfPoints, U"Number of points", U"10") |
| 80 |
NATURAL (numberOfDimensions, U"Number of dimensions", U"2") |
| 81 |
FORMULA (formula, U"Formula", U"randomUniform (-1.5, 1.5)") |
| 82 |
OK |
| 83 |
DO |
| 84 |
CREATE_ONE |
| 85 |
autoConfiguration result = Configuration_create (numberOfPoints, numberOfDimensions); |
| 86 |
TableOfReal_formula (result.get(), formula, interpreter, nullptr); |
| 87 |
CREATE_ONE_END (name) |
| 88 |
} |
| 89 |
|
| 90 |
FORM (GRAPHICS_NONE__drawSplines, U"Draw splines", U"spline") { |
| 91 |
REAL (xmin, U"left Horizontal range", U"0.0") |
| 92 |
REAL (xmax, U"right Horizontal range", U"1.0") |
| 93 |
REAL (ymin, U"left Vertical range", U"0.0") |
| 94 |
REAL (ymax, U"right Vertical range", U"20.0") |
| 95 |
OPTIONMENU_ENUM (kMDS_splineType, splineType, U"Spline type", kMDS_splineType::DEFAULT) |
| 96 |
INTEGER (order, U"Order", U"3") |
| 97 |
SENTENCE (interiorKnots_string, U"Interior knots", U"0.3 0.5 0.6") |
| 98 |
BOOLEAN (garnish, U"Garnish", true) |
| 99 |
OK |
| 100 |
DO |
| 101 |
Melder_require (xmin < xmax, |
| 102 |
U"For the horizontal range the minimum value needs to be smaller than the maximum value."); |
| 103 |
Melder_require (xmin < xmax, |
| 104 |
U"For the verticalal range the minimum value needs to be smaller than the maximum value."); |
| 105 |
GRAPHICS_NONE |
| 106 |
drawSplines (GRAPHICS, xmin, xmax, ymin, ymax, splineType,order, interiorKnots_string, garnish); |
| 107 |
GRAPHICS_NONE_END |
| 108 |
} |
| 109 |
|
| 110 |
DIRECT (GRAPHICS_NONE__drawMDSClassRelations) { |
| 111 |
GRAPHICS_NONE |
| 112 |
drawMDSClassRelations (GRAPHICS); |
| 113 |
GRAPHICS_NONE_END |
| 114 |
} |
| 115 |
|
| 116 |
|
| 117 |
/***************** AffineTransform ***************************************/ |
| 118 |
|
| 119 |
|
| 120 |
DIRECT (HELP__AffineTransform_help) { |
| 121 |
HELP (U"AffineTransform"); |
| 122 |
} |
| 123 |
|
| 124 |
DIRECT (CONVERT_EACH_TO_ONE__AffineTransform_invert) { |
| 125 |
CONVERT_EACH_TO_ONE (AffineTransform) |
| 126 |
autoAffineTransform result = AffineTransform_invert (me); |
| 127 |
CONVERT_EACH_TO_ONE_END (my name.get(), U"_inv") |
| 128 |
} |
| 129 |
|
| 130 |
FORM (QUERY_ONE_FOR_REAL__AffineTransform_getTransformationElement, U"AffineTransform: Get transformation element", U"Procrustes") { |
| 131 |
NATURAL (irow, U"Row number", U"1") |
| 132 |
NATURAL (icol, U"Column number", U"1") |
| 133 |
OK |
| 134 |
DO |
| 135 |
QUERY_ONE_FOR_REAL (AffineTransform) |
| 136 |
Melder_require (irow <= my dimension, |
| 137 |
U"Row number should not exceed the dimension of the transform."); |
| 138 |
Melder_require (icol <= my dimension, |
| 139 |
U"Column number should not exceed the dimension of the transform."); |
| 140 |
const double result = my r [irow] [icol]; |
| 141 |
QUERY_ONE_FOR_REAL_END (U" r [", irow, U"] [", icol, U"]") |
| 142 |
} |
| 143 |
|
| 144 |
FORM (QUERY_ONE_FOR_REAL__AffineTransform_getTranslationElement, U"AffineTransform: Get translation element", U"Procrustes") { |
| 145 |
NATURAL (index, U"Index", U"1") |
| 146 |
OK |
| 147 |
DO |
| 148 |
QUERY_ONE_FOR_REAL (AffineTransform) |
| 149 |
Melder_require (index <= my dimension, |
| 150 |
U"Index should not exceed the dimension of the transform."); |
| 151 |
const double result = my t [index]; |
| 152 |
QUERY_ONE_FOR_REAL_END (U"") |
| 153 |
} |
| 154 |
|
| 155 |
DIRECT (CONVERT_EACH_TO_ONE__AffineTransform_extractMatrix) { |
| 156 |
CONVERT_EACH_TO_ONE (AffineTransform) |
| 157 |
autoTableOfReal result = AffineTransform_extractMatrix (me); |
| 158 |
CONVERT_EACH_TO_ONE_END (my name.get()) |
| 159 |
} |
| 160 |
|
| 161 |
DIRECT (CONVERT_EACH_TO_ONE__AffineTransform_extractTranslationVector) { |
| 162 |
CONVERT_EACH_TO_ONE (AffineTransform) |
| 163 |
autoTableOfReal result = AffineTransform_extractTranslationVector (me); |
| 164 |
CONVERT_EACH_TO_ONE_END (my name.get()) |
| 165 |
} |
| 166 |
|
| 167 |
/***************** Configuration ***************************************/ |
| 168 |
|
| 169 |
DIRECT (HELP__Configuration_help) { |
| 170 |
HELP (U"Configuration") |
| 171 |
} |
| 172 |
|
| 173 |
#define praat_Configuration_draw_commonFields(horizontalDimension,verticalDimension,xmin,xmax,ymin,ymax) \ |
| 174 |
NATURAL (horizontalDimension, U"Horizontal dimension", U"1") \ |
| 175 |
NATURAL (verticalDimension, U"Vertical dimension", U"2") \ |
| 176 |
REAL (xmin, U"left Horizontal range", U"0.0") \ |
| 177 |
REAL (xmax, U"right Horizontal range", U"0.0") \ |
| 178 |
REAL (ymin, U"left Vertical range", U"0.0") \ |
| 179 |
REAL (ymax, U"right Vertical range", U"0.0") |
| 180 |
|
| 181 |
FORM (GRAPHICS_EACH__Configuration_draw, U"Configuration: Draw", U"Configuration: Draw...") { |
| 182 |
praat_Configuration_draw_commonFields(horizontalDimension,verticalDimension,xmin,xmax,ymin,ymax) |
| 183 |
NATURAL (labelSize, U"Label size", U"12") |
| 184 |
BOOLEAN (useRowLables, U"Use row labels", false) |
| 185 |
WORD (label, U"Label", U"+") |
| 186 |
BOOLEAN (garnish, U"Garnish", true) |
| 187 |
OK |
| 188 |
DO |
| 189 |
GRAPHICS_EACH (Configuration) |
| 190 |
Configuration_draw ( |
| 191 |
me, GRAPHICS, horizontalDimension, verticalDimension, xmin, xmax, ymin, ymax, |
| 192 |
labelSize, useRowLables, label, garnish |
| 193 |
); |
| 194 |
GRAPHICS_EACH_END |
| 195 |
} |
| 196 |
|
| 197 |
FORM (GRAPHICS_EACH__Configuration_drawSigmaEllipses, U"Configuration: Draw sigma ellipses", U"Configuration: Draw sigma ellipses...") { |
| 198 |
POSITIVE (numberOfSigmas, U"Number of sigmas", U"1.0") |
| 199 |
praat_Configuration_draw_commonFields(horizontalDimension,verticalDimension,xmin,xmax,ymin,ymax) |
| 200 |
POSITIVE (labelSize, U"Label size", U"12") |
| 201 |
BOOLEAN (garnish, U"Garnish", true) |
| 202 |
OK |
| 203 |
DO |
| 204 |
GRAPHICS_EACH (Configuration) |
| 205 |
Configuration_drawConcentrationEllipses ( |
| 206 |
me, GRAPHICS, numberOfSigmas, false, nullptr, horizontalDimension, verticalDimension, |
| 207 |
xmin, xmax, ymin, ymax, labelSize, garnish |
| 208 |
); |
| 209 |
GRAPHICS_EACH_END |
| 210 |
} |
| 211 |
|
| 212 |
FORM (GRAPHICS_EACH__Configuration_drawOneSigmaEllipse, U"Configuration: Draw one sigma ellipse", U"Configuration: Draw sigma ellipses...") { |
| 213 |
SENTENCE (label, U"Label", U"") |
| 214 |
POSITIVE (numberOfSigmas, U"Number of sigmas", U"1.0") |
| 215 |
praat_Configuration_draw_commonFields(horizontalDimension,verticalDimension,xmin,xmax,ymin,ymax) |
| 216 |
POSITIVE (labelSize, U"Label size", U"12") |
| 217 |
BOOLEAN (garnish, U"Garnish", true) |
| 218 |
OK |
| 219 |
DO |
| 220 |
GRAPHICS_EACH (Configuration) |
| 221 |
Configuration_drawConcentrationEllipses ( |
| 222 |
me, GRAPHICS, numberOfSigmas,false, label, horizontalDimension, verticalDimension, |
| 223 |
xmin, xmax, ymin, ymax, labelSize, garnish |
| 224 |
); |
| 225 |
GRAPHICS_EACH_END |
| 226 |
} |
| 227 |
|
| 228 |
|
| 229 |
FORM (GRAPHICS_EACH__Configuration_drawConfidenceEllipses, U"Configuration: Draw confidence ellipses", nullptr) { |
| 230 |
POSITIVE (confidenceLevel, U"Confidence level (0-1)", U"0.95") |
| 231 |
praat_Configuration_draw_commonFields(horizontalDimension,verticalDimension,xmin,xmax,ymin,ymax) |
| 232 |
POSITIVE (labelSize, U"Label size", U"12") |
| 233 |
BOOLEAN (garnish, U"Garnish", true) |
| 234 |
OK |
| 235 |
DO |
| 236 |
GRAPHICS_EACH (Configuration) |
| 237 |
Configuration_drawConcentrationEllipses ( |
| 238 |
me, GRAPHICS, confidenceLevel, true /* confidence */, nullptr, |
| 239 |
horizontalDimension, verticalDimension, xmin, xmax, ymin, ymax, labelSize, garnish) |
| 240 |
; |
| 241 |
GRAPHICS_EACH_END |
| 242 |
} |
| 243 |
|
| 244 |
FORM (GRAPHICS_EACH__Configuration_drawOneConfidenceEllipse, U"Configuration: Draw one confidence ellipse", nullptr) { |
| 245 |
SENTENCE (label, U"Label", U"") |
| 246 |
POSITIVE (confidenceLevel, U"Confidence level (0-1)", U"0.95") |
| 247 |
praat_Configuration_draw_commonFields(horizontalDimension,verticalDimension,xmin,xmax,ymin,ymax) |
| 248 |
POSITIVE (labelSize, U"Label size", U"12") |
| 249 |
BOOLEAN (garnish, U"Garnish", true) |
| 250 |
OK |
| 251 |
DO |
| 252 |
GRAPHICS_EACH (Configuration) |
| 253 |
Configuration_drawConcentrationEllipses ( |
| 254 |
me, GRAPHICS, confidenceLevel, true, label, horizontalDimension, verticalDimension, |
| 255 |
xmin, xmax, ymin, ymax, labelSize, garnish); |
| 256 |
GRAPHICS_EACH_END |
| 257 |
} |
| 258 |
|
| 259 |
DIRECT (MODIFY_Configuration_randomize) { |
| 260 |
MODIFY_EACH (Configuration) |
| 261 |
Configuration_randomize (me); |
| 262 |
MODIFY_EACH_END |
| 263 |
} |
| 264 |
|
| 265 |
FORM (MODIFY_Configuration_normalize, U"Configuration: Normalize", U"Configuration: Normalize...") { |
| 266 |
REAL (sumOfSquares, U"Sum of squares", U"0.0") |
| 267 |
COMMENT (U"On (INDSCAL), Off (Kruskal)") |
| 268 |
BOOLEAN (separateDimensions, U"Each dimension separately", true) |
| 269 |
OK |
| 270 |
DO |
| 271 |
MODIFY_EACH (Configuration) |
| 272 |
Configuration_normalize (me, sumOfSquares, separateDimensions); |
| 273 |
MODIFY_EACH_END |
| 274 |
} |
| 275 |
|
| 276 |
DIRECT (MODIFY_Configuration_centralize) { |
| 277 |
MODIFY_EACH (Configuration) |
| 278 |
TableOfReal_centreColumns (me); |
| 279 |
MODIFY_EACH_END |
| 280 |
} |
| 281 |
|
| 282 |
FORM (MODIFY_Configuration_rotate, U"Configuration: Rotate", U"Configuration: Rotate...") { |
| 283 |
NATURAL (dimension1, U"Dimension 1", U"1") |
| 284 |
NATURAL (dimension2, U"Dimension 2", U"2") |
| 285 |
REAL (angle_degrees, U"Angle (degrees)", U"60.0") |
| 286 |
OK |
| 287 |
DO |
| 288 |
MODIFY_EACH (Configuration) |
| 289 |
Configuration_rotate (me, dimension1, dimension2, angle_degrees); |
| 290 |
MODIFY_EACH_END |
| 291 |
} |
| 292 |
|
| 293 |
DIRECT (MODIFY_Configuration_rotateToPrincipalDirections) { |
| 294 |
MODIFY_EACH (Configuration) |
| 295 |
Configuration_rotateToPrincipalDirections (me); |
| 296 |
MODIFY_EACH_END |
| 297 |
} |
| 298 |
|
| 299 |
FORM (MODIFY_Configuration_invertDimension, U"Configuration: Invert dimension", U"Configuration: Invert dimension...") { |
| 300 |
NATURAL (dimension, U"Dimension", U"1") |
| 301 |
OK |
| 302 |
DO |
| 303 |
MODIFY_EACH (Configuration) |
| 304 |
Configuration_invertDimension (me, dimension); |
| 305 |
MODIFY_EACH_END |
| 306 |
} |
| 307 |
|
| 308 |
DIRECT (CONVERT_EACH_TO_ONE__Configuration_to_Distance) { |
| 309 |
CONVERT_EACH_TO_ONE (Configuration) |
| 310 |
autoDistance result = Configuration_to_Distance (me); |
| 311 |
CONVERT_EACH_TO_ONE_END (my name.get()) |
| 312 |
} |
| 313 |
|
| 314 |
FORM (CONVERT_EACH_TO_ONE__Configuration_varimax, U"Configuration: To Configuration (varimax)", U"Configuration: To Configuration (varimax)...") { |
| 315 |
BOOLEAN (normalizeRows, U"Normalize rows", true) |
| 316 |
BOOLEAN (useQuartimax, U"Quartimax", false) |
| 317 |
NATURAL (maximumNumberOfIterations, U"Maximum number of iterations", U"50") |
| 318 |
POSITIVE (tolerance, U"Tolerance", U"1e-6") |
| 319 |
OK |
| 320 |
DO |
| 321 |
CONVERT_EACH_TO_ONE (Configuration) |
| 322 |
autoConfiguration result = Configuration_varimax (me, normalizeRows, useQuartimax, maximumNumberOfIterations, tolerance); |
| 323 |
CONVERT_EACH_TO_ONE_END (my name.get(), U"_varimax") |
| 324 |
} |
| 325 |
|
| 326 |
DIRECT (COMBINE_ALL_LISTED_TO_ONE__Configurations_to_Similarity_cc) { |
| 327 |
COMBINE_ALL_LISTED_TO_ONE (Configuration, ConfigurationList) |
| 328 |
autoSimilarity result = ConfigurationList_to_Similarity_cc (list.get(), nullptr); |
| 329 |
COMBINE_ALL_LISTED_TO_ONE_END (U"congruence") |
| 330 |
} |
| 331 |
|
| 332 |
FORM (CONVERT_TWO_TO_ONE__Configurations_to_Procrustes, U"Configuration & Configuration: To Procrustes", U"Configuration & Configuration: To Procrustes...") { |
| 333 |
BOOLEAN (useOrthogonalTransform, U"Use orthogonal transform", false) |
| 334 |
OK |
| 335 |
DO |
| 336 |
CONVERT_TWO_TO_ONE (Configuration) |
| 337 |
autoProcrustes result = Configurations_to_Procrustes (me, you, useOrthogonalTransform); |
| 338 |
CONVERT_TWO_TO_ONE_END (your name.get(), U"_to_", my name.get()) |
| 339 |
} |
| 340 |
|
| 341 |
FORM (CONVERT_TWO_TO_ONE__Configurations_to_AffineTransform_congruence, U"Configurations: To AffineTransform (congruence)", U"Configurations: To AffineTransform (congruence)...") { |
| 342 |
NATURAL (maximumNumberOfIterations, U"Maximum number of iterations", U"50") |
| 343 |
POSITIVE (tolerance, U"Tolerance", U"1e-6") |
| 344 |
OK |
| 345 |
DO |
| 346 |
CONVERT_TWO_TO_ONE (Configuration) |
| 347 |
autoAffineTransform result = Configurations_to_AffineTransform_congruence (me, you, maximumNumberOfIterations, tolerance); |
| 348 |
CONVERT_TWO_TO_ONE_END (your name.get(), U"_to_", my name.get()) |
| 349 |
} |
| 350 |
|
| 351 |
DIRECT (CONVERT_ONE_AND_ALL_LISTED_TO_ONE__Configuration_Weight_to_Similarity_cc) { |
| 352 |
CONVERT_ONE_AND_ALL_LISTED_TO_ONE (Weight, Configuration, ConfigurationList) |
| 353 |
autoSimilarity result = ConfigurationList_to_Similarity_cc (list.get(), me); |
| 354 |
CONVERT_ONE_AND_ALL_LISTED_TO_ONE_END (U"congruence") |
| 355 |
} |
| 356 |
|
| 357 |
DIRECT (CONVERT_ONE_AND_ONE_TO_ONE__Configuration_AffineTransform_to_Configuration) { |
| 358 |
CONVERT_ONE_AND_ONE_TO_ONE (Configuration, AffineTransform) |
| 359 |
autoConfiguration result = Configuration_AffineTransform_to_Configuration (me, you); |
| 360 |
CONVERT_ONE_AND_ONE_TO_ONE_END (my name.get(), U"_", your name.get()) |
| 361 |
} |
| 362 |
|
| 363 |
DIRECT (CONVERT_ONE_AND_ONE_TO_ONE__Configuration_Procrustes_to_Configuration) { |
| 364 |
CONVERT_ONE_AND_ONE_TO_ONE (Configuration, Procrustes) |
| 365 |
autoConfiguration result = Configuration_AffineTransform_to_Configuration (me, you); |
| 366 |
CONVERT_ONE_AND_ONE_TO_ONE_END (my name.get(), U"_", your name.get()) |
| 367 |
} |
| 368 |
|
| 369 |
/*************** Confusion *********************************/ |
| 370 |
|
| 371 |
FORM (CONVERT_EACH_TO_ONE__Confusion_to_Dissimilarity_pdf, U"Confusion: To Dissimilarity (pdf)", U"Confusion: To Dissimilarity (pdf)...") { |
| 372 |
POSITIVE (minimumConfusionLevel, U"Minimum confusion level", U"0.5") |
| 373 |
OK |
| 374 |
DO |
| 375 |
CONVERT_EACH_TO_ONE (Confusion) |
| 376 |
autoDissimilarity result = Confusion_to_Dissimilarity_pdf (me, minimumConfusionLevel); |
| 377 |
CONVERT_EACH_TO_ONE_END (my name.get(), U"_pdf") |
| 378 |
} |
| 379 |
|
| 380 |
FORM (CONVERT_EACH_TO_ONE__Confusion_to_Similarity, U"Confusion: To Similarity", U"Confusion: To Similarity...") { |
| 381 |
BOOLEAN (normalize, U"Normalize", true) |
| 382 |
CHOICE (symmetrizeMethod, U"Symmetrization", 1) |
| 383 |
OPTION (U"no symmetrization") |
| 384 |
OPTION (U"average (s[i][j] = (c[i][j]+c[j][i])/2)") |
| 385 |
OPTION (U"Houtgast (s[i][j]= sum (min(c[i][k],c[j][k])))") |
| 386 |
OK |
| 387 |
DO |
| 388 |
CONVERT_EACH_TO_ONE (Confusion) |
| 389 |
autoSimilarity result = Confusion_to_Similarity (me, normalize, symmetrizeMethod); |
| 390 |
CONVERT_EACH_TO_ONE_END (my name.get()) |
| 391 |
} |
| 392 |
|
| 393 |
DIRECT (COMBINE_ALL_LISTED_TO_ONE__Confusions_sum) { |
| 394 |
COMBINE_ALL_LISTED_TO_ONE (Confusion, ConfusionList) |
| 395 |
autoConfusion result = ConfusionList_sum (list.get()); |
| 396 |
COMBINE_ALL_LISTED_TO_ONE_END (U"sum") |
| 397 |
} |
| 398 |
|
| 399 |
DIRECT (CONVERT_EACH_TO_ONE__Confusion_to_ContingencyTable) { |
| 400 |
CONVERT_EACH_TO_ONE (Confusion) |
| 401 |
autoContingencyTable result = Confusion_to_ContingencyTable (me); |
| 402 |
CONVERT_EACH_TO_ONE_END (my name.get()) |
| 403 |
} |
| 404 |
|
| 405 |
/*************** ContingencyTable *********************************/ |
| 406 |
|
| 407 |
|
| 408 |
FORM (CONVERT_EACH_TO_ONE__ContingencyTable_to_Configuration_ca, U"ContingencyTable: To Configuration (ca)", U"ContingencyTable: To Configuration (ca)...") { |
| 409 |
NATURAL (numberOfDimensions, U"Number of dimensions", U"2") |
| 410 |
CHOICE (scalingType, U"Scaling of final configuration", 3) |
| 411 |
OPTION (U"row points in centre of gravity of column points") |
| 412 |
OPTION (U"column points in centre of gravity of row points") |
| 413 |
OPTION (U"row points and column points symmetric") |
| 414 |
OK |
| 415 |
DO |
| 416 |
CONVERT_EACH_TO_ONE (ContingencyTable) |
| 417 |
autoConfiguration result = ContingencyTable_to_Configuration_ca (me, numberOfDimensions, scalingType); |
| 418 |
CONVERT_EACH_TO_ONE_END (my name.get()) |
| 419 |
} |
| 420 |
|
| 421 |
DIRECT (QUERY_ONE_FOR_REAL__ContingencyTable_chisqProbability) { |
| 422 |
QUERY_ONE_FOR_REAL (ContingencyTable) |
| 423 |
const double result = ContingencyTable_chisqProbability (me); |
| 424 |
QUERY_ONE_FOR_REAL_END (U" (probability)") |
| 425 |
} |
| 426 |
|
| 427 |
DIRECT (QUERY_ONE_FOR_REAL__ContingencyTable_cramersStatistic) { |
| 428 |
QUERY_ONE_FOR_REAL (ContingencyTable) |
| 429 |
const double result = ContingencyTable_cramersStatistic (me); |
| 430 |
QUERY_ONE_FOR_REAL_END (U" (cramer)") |
| 431 |
} |
| 432 |
|
| 433 |
DIRECT (QUERY_ONE_FOR_REAL__ContingencyTable_contingencyCoefficient) { |
| 434 |
QUERY_ONE_FOR_REAL (ContingencyTable) |
| 435 |
const double result = ContingencyTable_contingencyCoefficient (me); |
| 436 |
QUERY_ONE_FOR_REAL_END (U" (contingency coefficient)") |
| 437 |
} |
| 438 |
|
| 439 |
/************************* Correlation ***********************************/ |
| 440 |
|
| 441 |
FORM (CONVERT_EACH_TO_ONE__Correlation_to_Configuration, U"Correlation: To Configuration", nullptr) { |
| 442 |
NATURAL (numberOfDimensions, U"Number of dimensions", U"2") |
| 443 |
OK |
| 444 |
DO |
| 445 |
CONVERT_EACH_TO_ONE (Correlation) |
| 446 |
autoConfiguration result = Correlation_to_Configuration (me, numberOfDimensions); |
| 447 |
CONVERT_EACH_TO_ONE_END (my name.get()) |
| 448 |
} |
| 449 |
|
| 450 |
|
| 451 |
/************************* Similarity ***************************************/ |
| 452 |
|
| 453 |
DIRECT (HELP__Similarity_help) { |
| 454 |
HELP (U"Similarity") |
| 455 |
} |
| 456 |
|
| 457 |
FORM (CONVERT_EACH_TO_ONE__Similarity_to_Dissimilarity, U"Similarity: To Dissimilarity", U"Similarity: To Dissimilarity...") { |
| 458 |
REAL (maximumDissimilarity, U"Maximum dissimilarity", U"0.0 (= from data)") |
| 459 |
OK |
| 460 |
DO |
| 461 |
CONVERT_EACH_TO_ONE (Similarity) |
| 462 |
autoDissimilarity result = Similarity_to_Dissimilarity (me, maximumDissimilarity); |
| 463 |
CONVERT_EACH_TO_ONE_END (my name.get()) |
| 464 |
} |
| 465 |
|
| 466 |
/**************** Dissimilarity ***************************************/ |
| 467 |
|
| 468 |
#define praat_Dissimilarity_to_Configuration_commonFields(tolerance,maximumNumberOfIterations,numberOfRepetitions) \ |
| 469 |
COMMENT (U"Minimization parameters") \ |
| 470 |
REAL (tolerance, U"Tolerance", U"1e-5") \ |
| 471 |
NATURAL (maximumNumberOfIterations, U"Maximum number of iterations", U"50 (= each repetition)") \ |
| 472 |
NATURAL (numberOfRepetitions, U"Number of repetitions", U"1") |
| 473 |
|
| 474 |
#define praat_Dissimilarity_Configuration_drawing_commonFields(fromProximity,toProximity,fromDistance,toDistance,markSize,markString,garnish) \ |
| 475 |
REAL (fromProximity, U"left Proximity range", U"0.0") \ |
| 476 |
REAL (toProximity, U"right Proximity range", U"0.0") \ |
| 477 |
REAL (fromDistance, U"left Distance range", U"0.0") \ |
| 478 |
REAL (toDistance, U"right Distance range", U"0.0") \ |
| 479 |
POSITIVE (markSize, U"Mark size (mm)", U"1.0") \ |
| 480 |
SENTENCE (markString, U"Mark string (+xo.)", U"+") \ |
| 481 |
BOOLEAN (garnish, U"Garnish", true) |
| 482 |
|
| 483 |
DIRECT (HELP__Dissimilarity_help) { |
| 484 |
HELP (U"Dissimilarity") |
| 485 |
} |
| 486 |
|
| 487 |
DIRECT (QUERY_ONE_FOR_REAL__Dissimilarity_getAdditiveConstant) { |
| 488 |
QUERY_ONE_FOR_REAL (Dissimilarity) |
| 489 |
const double result = Dissimilarity_getAdditiveConstant (me); |
| 490 |
QUERY_ONE_FOR_REAL_END (U"") |
| 491 |
} |
| 492 |
|
| 493 |
FORM (CONVERT_ONE_AND_ONE_TO_ONE__Dissimilarity_Configuration_kruskal, U"Dissimilarity & Configuration: To Configuration (kruskal)", U"Dissimilarity & Configuration: To Configuration (kruskal)...") { |
| 494 |
OPTIONMENU_ENUM (kMDS_TiesHandling, tiesHandling, U"Handling of ties", kMDS_TiesHandling::DEFAULT) |
| 495 |
OPTIONMENU_ENUM (kMDS_KruskalStress, stressMeasure, U"Stress measure", kMDS_KruskalStress::KRUSKAL_1) |
| 496 |
praat_Dissimilarity_to_Configuration_commonFields (tolerance,maximumNumberOfIterations,numberOfRepetitions) |
| 497 |
OK |
| 498 |
DO |
| 499 |
CONVERT_ONE_AND_ONE_TO_ONE (Dissimilarity, Configuration) |
| 500 |
autoConfiguration result = Dissimilarity_Configuration_kruskal ( |
| 501 |
me, you, tiesHandling, stressMeasure, tolerance, maximumNumberOfIterations, numberOfRepetitions |
| 502 |
); |
| 503 |
CONVERT_ONE_AND_ONE_TO_ONE_END (my name.get(), U"_kruskal") |
| 504 |
} |
| 505 |
|
| 506 |
FORM (CONVERT_ONE_AND_ONE_TO_ONE__Dissimilarity_Configuration_absolute_mds, U"Dissimilarity & Configuration: To Configuration (absolute mds)", U"Dissimilarity & Configuration: To Configuration (absolute mds)...") { |
| 507 |
praat_Dissimilarity_to_Configuration_commonFields (tolerance,maximumNumberOfIterations,numberOfRepetitions) |
| 508 |
OK |
| 509 |
DO |
| 510 |
CONVERT_ONE_AND_ONE_TO_ONE (Dissimilarity, Configuration) |
| 511 |
constexpr bool showProgress = true; |
| 512 |
autoConfiguration result = Dissimilarity_Configuration_Weight_absolute_mds ( |
| 513 |
me, you, nullptr, tolerance, maximumNumberOfIterations, numberOfRepetitions, showProgress |
| 514 |
); |
| 515 |
CONVERT_ONE_AND_ONE_TO_ONE_END (my name.get(), U"_absolute") |
| 516 |
} |
| 517 |
|
| 518 |
FORM (CONVERT_ONE_AND_ONE_TO_ONE__Dissimilarity_Configuration_ratio_mds, U"Dissimilarity & Configuration: To Configuration (ratio mds)", U"Dissimilarity & Configuration: To Configuration (ratio mds)...") { |
| 519 |
praat_Dissimilarity_to_Configuration_commonFields (tolerance,maximumNumberOfIterations,numberOfRepetitions) |
| 520 |
OK |
| 521 |
DO |
| 522 |
CONVERT_ONE_AND_ONE_TO_ONE (Dissimilarity, Configuration) |
| 523 |
constexpr bool showProgress = true; |
| 524 |
autoConfiguration result = Dissimilarity_Configuration_Weight_ratio_mds ( |
| 525 |
me, you, nullptr, tolerance, maximumNumberOfIterations, numberOfRepetitions, showProgress |
| 526 |
); |
| 527 |
CONVERT_ONE_AND_ONE_TO_ONE_END (my name.get(), U"_ratio") |
| 528 |
} |
| 529 |
|
| 530 |
FORM (CONVERT_ONE_AND_ONE_TO_ONE__Dissimilarity_Configuration_interval_mds, U"Dissimilarity & Configuration: To Configuration (interval mds)", U"Dissimilarity & Configuration: To Configuration (interval mds)...") { |
| 531 |
praat_Dissimilarity_to_Configuration_commonFields (tolerance,maximumNumberOfIterations,numberOfRepetitions) |
| 532 |
OK |
| 533 |
DO |
| 534 |
CONVERT_ONE_AND_ONE_TO_ONE (Dissimilarity, Configuration) |
| 535 |
constexpr bool showProgress = true; |
| 536 |
autoConfiguration result = Dissimilarity_Configuration_Weight_interval_mds ( |
| 537 |
me, you, nullptr, tolerance, maximumNumberOfIterations, numberOfRepetitions, showProgress |
| 538 |
); |
| 539 |
CONVERT_ONE_AND_ONE_TO_ONE_END (my name.get(), U"_interval") |
| 540 |
} |
| 541 |
|
| 542 |
FORM (CONVERT_ONE_AND_ONE_TO_ONE__Dissimilarity_Configuration_monotone_mds, U"Dissimilarity & Configuration: To Configuration (monotone mds)", U"Dissimilarity & Configuration: To Configuration (monotone mds)...") { |
| 543 |
OPTIONMENU_ENUM (kMDS_TiesHandling, tiesHandling, U"Handling of ties", kMDS_TiesHandling::DEFAULT) |
| 544 |
praat_Dissimilarity_to_Configuration_commonFields (tolerance,maximumNumberOfIterations,numberOfRepetitions) |
| 545 |
OK |
| 546 |
DO |
| 547 |
CONVERT_ONE_AND_ONE_TO_ONE (Dissimilarity, Configuration) |
| 548 |
constexpr bool showProgress = true; |
| 549 |
autoConfiguration result = Dissimilarity_Configuration_Weight_monotone_mds ( |
| 550 |
me, you, nullptr, tiesHandling, tolerance, maximumNumberOfIterations, numberOfRepetitions, showProgress |
| 551 |
); |
| 552 |
CONVERT_ONE_AND_ONE_TO_ONE_END (my name.get(), U"_monotone") |
| 553 |
} |
| 554 |
|
| 555 |
FORM (CONVERT_ONE_AND_ONE_TO_ONE__Dissimilarity_Configuration_ispline_mds, U"Dissimilarity & Configuration: To Configuration (i-spline mds)", U"Dissimilarity & Configuration: To Configuration (i-spline mds)...") { |
| 556 |
COMMENT (U"Spline smoothing") |
| 557 |
INTEGER (numberOfInteriorKnots, U"Number of interior knots", U"1") |
| 558 |
INTEGER (order, U"Order of I-spline", U"1") |
| 559 |
praat_Dissimilarity_to_Configuration_commonFields (tolerance,maximumNumberOfIterations,numberOfRepetitions) |
| 560 |
OK |
| 561 |
DO |
| 562 |
CONVERT_ONE_AND_ONE_TO_ONE (Dissimilarity, Configuration) |
| 563 |
constexpr bool showProgress = true; |
| 564 |
autoConfiguration result = Dissimilarity_Configuration_Weight_ispline_mds ( |
| 565 |
me, you, nullptr, numberOfInteriorKnots, order, tolerance, maximumNumberOfIterations, |
| 566 |
numberOfRepetitions, showProgress |
| 567 |
); |
| 568 |
CONVERT_ONE_AND_ONE_TO_ONE_END (my name.get(), U"_ispline") |
| 569 |
} |
| 570 |
|
| 571 |
FORM (CONVERT_ONE_AND_ONE_AND_ONE_TO_ONE__Dissimilarity_Configuration_Weight_absolute_mds, U"Dissimilarity & Configuration & Weight: To Configuration (absolute mds)", U"Dissimilarity & Configuration & Weight: To Configuration...") { |
| 572 |
praat_Dissimilarity_to_Configuration_commonFields (tolerance,maximumNumberOfIterations,numberOfRepetitions) |
| 573 |
OK |
| 574 |
DO |
| 575 |
CONVERT_ONE_AND_ONE_AND_ONE_TO_ONE (Dissimilarity, Configuration, Weight) |
| 576 |
constexpr bool showProgress = true; |
| 577 |
autoConfiguration result = Dissimilarity_Configuration_Weight_absolute_mds ( |
| 578 |
me, you, him, tolerance, maximumNumberOfIterations, numberOfRepetitions, showProgress |
| 579 |
); |
| 580 |
CONVERT_ONE_AND_ONE_AND_ONE_TO_ONE_END (my name.get(), U"_w_absolute") |
| 581 |
} |
| 582 |
|
| 583 |
FORM (CONVERT_ONE_AND_ONE_AND_ONE_TO_ONE__Dissimilarity_Configuration_Weight_ratio_mds, U"Dissimilarity & Configuration & Weight: To Configuration (ratio mds)", U"Dissimilarity & Configuration & Weight: To Configuration...") { |
| 584 |
praat_Dissimilarity_to_Configuration_commonFields (tolerance,maximumNumberOfIterations,numberOfRepetitions) |
| 585 |
OK |
| 586 |
DO |
| 587 |
CONVERT_ONE_AND_ONE_AND_ONE_TO_ONE (Dissimilarity, Configuration, Weight) |
| 588 |
constexpr bool showProgress = true; |
| 589 |
autoConfiguration result = Dissimilarity_Configuration_Weight_ratio_mds ( |
| 590 |
me, you, him, tolerance, maximumNumberOfIterations, numberOfRepetitions, showProgress |
| 591 |
); |
| 592 |
CONVERT_ONE_AND_ONE_AND_ONE_TO_ONE_END (my name.get(), U"_w_ratio") |
| 593 |
} |
| 594 |
|
| 595 |
FORM (CONVERT_ONE_AND_ONE_AND_ONE_TO_ONE__Dissimilarity_Configuration_Weight_interval_mds, U"Dissimilarity & Configuration & Weight: To Configuration (interval mds)", U"Dissimilarity & Configuration & Weight: To Configuration...") { |
| 596 |
praat_Dissimilarity_to_Configuration_commonFields (tolerance,maximumNumberOfIterations,numberOfRepetitions) |
| 597 |
OK |
| 598 |
DO |
| 599 |
CONVERT_ONE_AND_ONE_AND_ONE_TO_ONE (Dissimilarity, Configuration, Weight) |
| 600 |
constexpr bool showProgress = true; |
| 601 |
autoConfiguration result = Dissimilarity_Configuration_Weight_interval_mds ( |
| 602 |
me, you, him, tolerance, maximumNumberOfIterations, numberOfRepetitions, showProgress |
| 603 |
); |
| 604 |
CONVERT_ONE_AND_ONE_AND_ONE_TO_ONE_END (my name.get(), U"_w_interval") |
| 605 |
} |
| 606 |
|
| 607 |
FORM (CONVERT_ONE_AND_ONE_AND_ONE_TO_ONE__Dissimilarity_Configuration_Weight_monotone_mds, U"Dissimilarity & Configuration & Weight: To Configuration (monotone mds)", U"Dissimilarity & Configuration & Weight: To Configuration...") { |
| 608 |
OPTIONMENU_ENUM (kMDS_TiesHandling, tiesHandling, U"Handling of ties", kMDS_TiesHandling::DEFAULT) |
| 609 |
praat_Dissimilarity_to_Configuration_commonFields (tolerance,maximumNumberOfIterations,numberOfRepetitions) |
| 610 |
OK |
| 611 |
DO |
| 612 |
CONVERT_ONE_AND_ONE_AND_ONE_TO_ONE (Dissimilarity, Configuration, Weight) |
| 613 |
constexpr bool showProgress = true; |
| 614 |
autoConfiguration result = Dissimilarity_Configuration_Weight_monotone_mds ( |
| 615 |
me, you, him, tiesHandling, tolerance, maximumNumberOfIterations, numberOfRepetitions, showProgress |
| 616 |
); |
| 617 |
CONVERT_ONE_AND_ONE_AND_ONE_TO_ONE_END (my name.get(), U"_sw_monotone") |
| 618 |
} |
| 619 |
|
| 620 |
FORM (CONVERT_ONE_AND_ONE_AND_ONE_TO_ONE__Dissimilarity_Configuration_Weight_ispline_mds, U"Dissimilarity & Configuration & Weight: To Configuration (i-spline mds)", U"Dissimilarity & Configuration & Weight: To Configuration...") { |
| 621 |
COMMENT (U"Spline smoothing") |
| 622 |
INTEGER (numberOfInteriorKnots, U"Number of interior knots", U"1") |
| 623 |
INTEGER (order, U"Order of I-spline", U"1") |
| 624 |
praat_Dissimilarity_to_Configuration_commonFields (tolerance,maximumNumberOfIterations,numberOfRepetitions) |
| 625 |
OK |
| 626 |
DO |
| 627 |
CONVERT_ONE_AND_ONE_AND_ONE_TO_ONE (Dissimilarity, Configuration, Weight) |
| 628 |
constexpr bool showProgress = true; |
| 629 |
autoConfiguration result = Dissimilarity_Configuration_Weight_ispline_mds ( |
| 630 |
me, you, him, numberOfInteriorKnots, order, tolerance, maximumNumberOfIterations, |
| 631 |
numberOfRepetitions, showProgress |
| 632 |
); |
| 633 |
CONVERT_ONE_AND_ONE_AND_ONE_TO_ONE_END (my name.get(), U"_sw_ispline") |
| 634 |
} |
| 635 |
|
| 636 |
FORM (QUERY_ONE_AND_ONE_FOR_REAL__Dissimilarity_Configuration_getStress, U"Dissimilarity & Configuration: Get stress", U"Dissimilarity & Configuration: get stress") { |
| 637 |
OPTIONMENU_ENUM (kMDS_TiesHandling, tiesHandling, U"Handling of ties", kMDS_TiesHandling::DEFAULT) |
| 638 |
OPTIONMENU_ENUM (kMDS_KruskalStress, stressMeasure, U"Stress measure", kMDS_KruskalStress::KRUSKAL_1) |
| 639 |
OK |
| 640 |
DO |
| 641 |
QUERY_ONE_AND_ONE_FOR_REAL (Dissimilarity, Configuration) |
| 642 |
const double result = Dissimilarity_Configuration_getStress (me, you, tiesHandling, stressMeasure); |
| 643 |
QUERY_ONE_AND_ONE_FOR_REAL_END (U" (stress)") |
| 644 |
} |
| 645 |
|
| 646 |
FORM (QUERY_ONE_AND_ONE_FOR_REAL__Dissimilarity_Configuration_absolute_stress, U"Dissimilarity & Configuration: Get stress (absolute mds)", U"Dissimilarity & Configuration: Get stress (absolute mds)...") { |
| 647 |
OPTIONMENU_ENUM (kMDS_stressMeasure, stressMeasure, U"Stress measure", kMDS_stressMeasure::DEFAULT) |
| 648 |
OK |
| 649 |
DO |
| 650 |
QUERY_ONE_AND_ONE_FOR_REAL (Dissimilarity, Configuration) |
| 651 |
const double result = Dissimilarity_Configuration_Weight_absolute_stress (me, you, nullptr,stressMeasure); |
| 652 |
QUERY_ONE_AND_ONE_FOR_REAL_END (U" (absolute mds stress)") |
| 653 |
} |
| 654 |
|
| 655 |
FORM (QUERY_ONE_AND_ONE_FOR_REAL__Dissimilarity_Configuration_ratio_stress, U"Dissimilarity & Configuration: Get stress (ratio mds)", U"Dissimilarity & Configuration: Get stress (ratio mds)...") { |
| 656 |
OPTIONMENU_ENUM (kMDS_stressMeasure, stressMeasure, U"Stress measure", kMDS_stressMeasure::DEFAULT) |
| 657 |
OK |
| 658 |
DO |
| 659 |
QUERY_ONE_AND_ONE_FOR_REAL (Dissimilarity, Configuration) |
| 660 |
const double result = Dissimilarity_Configuration_Weight_ratio_stress (me, you, nullptr, stressMeasure); |
| 661 |
QUERY_ONE_AND_ONE_FOR_REAL_END (U" (ratio mds stress)") |
| 662 |
} |
| 663 |
|
| 664 |
FORM (QUERY_ONE_AND_ONE_FOR_REAL__Dissimilarity_Configuration_interval_stress, U"Dissimilarity & Configuration: Get stress (interval mds)", U"Dissimilarity & Configuration: Get stress (interval mds)...") { |
| 665 |
OPTIONMENU_ENUM (kMDS_stressMeasure, stressMeasure, U"Stress measure", kMDS_stressMeasure::DEFAULT) |
| 666 |
OK |
| 667 |
DO |
| 668 |
QUERY_ONE_AND_ONE_FOR_REAL (Dissimilarity, Configuration) |
| 669 |
const double result = Dissimilarity_Configuration_Weight_interval_stress (me, you, nullptr, stressMeasure); |
| 670 |
QUERY_ONE_AND_ONE_FOR_REAL_END (U" (interval mds stress)") |
| 671 |
} |
| 672 |
|
| 673 |
FORM (QUERY_ONE_AND_ONE_FOR_REAL__Dissimilarity_Configuration_monotone_stress, U"Dissimilarity & Configuration: Get stress (monotone mds)", U"Dissimilarity & Configuration: Get stress (monotone mds)...") { |
| 674 |
OPTIONMENU_ENUM (kMDS_TiesHandling, tiesHandling, U"Handling of ties", kMDS_TiesHandling::DEFAULT) |
| 675 |
OPTIONMENU_ENUM (kMDS_stressMeasure, stressMeasure, U"Stress measure", kMDS_stressMeasure::DEFAULT) |
| 676 |
OK |
| 677 |
DO |
| 678 |
QUERY_ONE_AND_ONE_FOR_REAL (Dissimilarity, Configuration) |
| 679 |
const double result = Dissimilarity_Configuration_Weight_monotone_stress (me, you, nullptr, tiesHandling,stressMeasure); |
| 680 |
QUERY_ONE_AND_ONE_FOR_REAL_END (U" (monotone mds stress)") |
| 681 |
} |
| 682 |
|
| 683 |
FORM (QUERY_ONE_AND_ONE_FOR_REAL__Dissimilarity_Configuration_ispline_stress, U"Dissimilarity & Configuration: Get stress (i-spline mds)", U"Dissimilarity & Configuration: Get stress (i-spline mds)...") { |
| 684 |
INTEGER (numberOfInteriorKnots, U"Number of interior knots", U"1") |
| 685 |
INTEGER (order, U"Order of I-spline", U"3") |
| 686 |
OPTIONMENU_ENUM (kMDS_stressMeasure, stressMeasure, U"Stress measure", kMDS_stressMeasure::DEFAULT) |
| 687 |
OK |
| 688 |
DO |
| 689 |
QUERY_ONE_AND_ONE_FOR_REAL (Dissimilarity, Configuration) |
| 690 |
const double result = Dissimilarity_Configuration_Weight_ispline_stress ( |
| 691 |
me, you, nullptr, numberOfInteriorKnots, order, stressMeasure |
| 692 |
); |
| 693 |
QUERY_ONE_AND_ONE_FOR_REAL_END (U" (i-spline mds stress)") |
| 694 |
} |
| 695 |
|
| 696 |
FORM (QUERY_ONE_AND_ONE_AND_ONE_FOR_REAL__Dissimilarity_Configuration_Weight_absolute_stress, U"Dissimilarity & Configuration & Weight: Get stress (absolute mds)", U"Dissimilarity & Configuration & Weight: Get stress (absolute mds)...") { |
| 697 |
OPTIONMENU_ENUM (kMDS_stressMeasure, stressMeasure, U"Stress measure", kMDS_stressMeasure::DEFAULT) |
| 698 |
OK |
| 699 |
DO |
| 700 |
QUERY_ONE_AND_ONE_AND_ONE_FOR_REAL (Dissimilarity, Configuration, Weight) |
| 701 |
const double result = Dissimilarity_Configuration_Weight_absolute_stress (me, you, him, stressMeasure); |
| 702 |
QUERY_ONE_AND_ONE_AND_ONE_FOR_REAL_END (U" (absolute mds stress)") |
| 703 |
} |
| 704 |
|
| 705 |
FORM (QUERY_ONE_AND_ONE_AND_ONE_FOR_REAL__Dissimilarity_Configuration_Weight_ratio_stress, U"Dissimilarity & Configuration & Weight: Get stress (ratio mds)", U"Dissimilarity & Configuration & Weight: Get stress (ratio mds)...") { |
| 706 |
OPTIONMENU_ENUM (kMDS_stressMeasure, stressMeasure, U"Stress measure", kMDS_stressMeasure::DEFAULT) |
| 707 |
OK |
| 708 |
DO |
| 709 |
QUERY_ONE_AND_ONE_AND_ONE_FOR_REAL (Dissimilarity, Configuration, Weight) |
| 710 |
const double result = Dissimilarity_Configuration_Weight_ratio_stress (me, you, him, stressMeasure); |
| 711 |
QUERY_ONE_AND_ONE_AND_ONE_FOR_REAL_END (U" (ratio mds stress)") |
| 712 |
} |
| 713 |
|
| 714 |
FORM (QUERY_ONE_AND_ONE_AND_ONE_FOR_REAL__Dissimilarity_Configuration_Weight_interval_stress, U"Dissimilarity & Configuration & Weight: Get stress (interval mds)", U"Dissimilarity & Configuration & Weight: Get stress (interval mds)...") { |
| 715 |
OPTIONMENU_ENUM (kMDS_stressMeasure, stressMeasure, U"Stress measure", kMDS_stressMeasure::DEFAULT) |
| 716 |
OK |
| 717 |
DO |
| 718 |
QUERY_ONE_AND_ONE_AND_ONE_FOR_REAL (Dissimilarity, Configuration, Weight) |
| 719 |
const double result = Dissimilarity_Configuration_Weight_interval_stress (me, you, him, stressMeasure); |
| 720 |
QUERY_ONE_AND_ONE_AND_ONE_FOR_REAL_END (U" (interval mds stress)") |
| 721 |
} |
| 722 |
|
| 723 |
FORM (QUERY_ONE_AND_ONE_AND_ONE_FOR_REAL__Dissimilarity_Configuration_Weight_monotone_stress, U"Dissimilarity & Configuration & Weight: Get stress (monotone mds)", U"Dissimilarity & Configuration & Weight: Get stress (monotone mds)...") { |
| 724 |
OPTIONMENU_ENUM (kMDS_TiesHandling, tiesHandling, U"Handling of ties", kMDS_TiesHandling::DEFAULT) |
| 725 |
OPTIONMENU_ENUM (kMDS_stressMeasure, stressMeasure, U"Stress measure", kMDS_stressMeasure::DEFAULT) |
| 726 |
OK |
| 727 |
DO |
| 728 |
QUERY_ONE_AND_ONE_AND_ONE_FOR_REAL (Dissimilarity, Configuration, Weight) |
| 729 |
const double result = Dissimilarity_Configuration_Weight_monotone_stress (me, you, him, tiesHandling, stressMeasure); |
| 730 |
QUERY_ONE_AND_ONE_AND_ONE_FOR_REAL_END (U" (monotone mds stress)") |
| 731 |
} |
| 732 |
|
| 733 |
FORM (QUERY_ONE_AND_ONE_AND_ONE_FOR_REAL__Dissimilarity_Configuration_Weight_ispline_stress, U"Dissimilarity & Configuration & Weight: Get stress (i-spline mds)", U"Dissimilarity & Configuration & Weight: Get stress (i-spline mds)...") { |
| 734 |
INTEGER (numberOfInteriorKnots, U"Number of interior knots", U"1") |
| 735 |
INTEGER (order, U"Order of I-spline", U"3") |
| 736 |
OPTIONMENU_ENUM (kMDS_stressMeasure, stressMeasure, U"Stress measure", kMDS_stressMeasure::DEFAULT) |
| 737 |
OK |
| 738 |
DO |
| 739 |
QUERY_ONE_AND_ONE_AND_ONE_FOR_REAL (Dissimilarity, Configuration, Weight) |
| 740 |
const double result = Dissimilarity_Configuration_Weight_ispline_stress ( |
| 741 |
me, you, him, numberOfInteriorKnots, order, stressMeasure |
| 742 |
); |
| 743 |
QUERY_ONE_AND_ONE_AND_ONE_FOR_REAL_END (U" (i-spline mds stress)") |
| 744 |
} |
| 745 |
|
| 746 |
FORM (GRAPHICS_ONE_AND_ONE__Dissimilarity_Configuration_drawShepardDiagram, U"Dissimilarity & Configuration: Draw Shepard diagram", U"Dissimilarity & Configuration: Draw Shepard diagram...") { |
| 747 |
praat_Dissimilarity_Configuration_drawing_commonFields(fromProximity,toProximity,fromDistance,toDistance,markSize,markString,garnish) |
| 748 |
OK |
| 749 |
DO |
| 750 |
GRAPHICS_ONE_AND_ONE (Dissimilarity, Configuration) |
| 751 |
Dissimilarity_Configuration_drawShepardDiagram ( |
| 752 |
me, you, GRAPHICS, fromProximity, toProximity, fromDistance, toDistance, markSize, markString, garnish |
| 753 |
); |
| 754 |
GRAPHICS_ONE_AND_ONE_END |
| 755 |
} |
| 756 |
|
| 757 |
FORM (GRAPHICS_ONE_AND_ONE__Dissimilarity_Configuration_drawAbsoluteRegression, U"Dissimilarity & Configuration: Draw regression (absolute mds)", U"Dissimilarity & Configuration: Draw regression (absolute mds)...") { |
| 758 |
praat_Dissimilarity_Configuration_drawing_commonFields(fromProximity,toProximity,fromDistance,toDistance,markSize,markString,garnish) OK |
| 759 |
DO |
| 760 |
GRAPHICS_ONE_AND_ONE (Dissimilarity, Configuration) |
| 761 |
Dissimilarity_Configuration_Weight_drawAbsoluteRegression ( |
| 762 |
me, you, nullptr, GRAPHICS, fromProximity, toProximity, fromDistance, toDistance, markSize, markString, garnish |
| 763 |
); |
| 764 |
GRAPHICS_ONE_AND_ONE_END |
| 765 |
} |
| 766 |
|
| 767 |
FORM (GRAPHICS_ONE_AND_ONE__Dissimilarity_Configuration_drawRatioRegression, U"Dissimilarity & Configuration: Draw regression (ratio mds)", U"Dissimilarity & Configuration: Draw regression (ratio mds)...") { |
| 768 |
praat_Dissimilarity_Configuration_drawing_commonFields(fromProximity,toProximity,fromDistance,toDistance,markSize,markString,garnish) OK |
| 769 |
DO |
| 770 |
GRAPHICS_ONE_AND_ONE (Dissimilarity, Configuration) |
| 771 |
Dissimilarity_Configuration_Weight_drawRatioRegression ( |
| 772 |
me, you, nullptr, GRAPHICS, fromProximity, toProximity, fromDistance, toDistance, markSize, markString, garnish |
| 773 |
); |
| 774 |
GRAPHICS_ONE_AND_ONE_END |
| 775 |
} |
| 776 |
|
| 777 |
FORM (GRAPHICS_ONE_AND_ONE__Dissimilarity_Configuration_drawIntervalRegression, U"Dissimilarity & Configuration: Draw regression (interval mds)", U"Dissimilarity & Configuration: Draw regression (interval mds)...") { |
| 778 |
praat_Dissimilarity_Configuration_drawing_commonFields(fromProximity,toProximity,fromDistance,toDistance,markSize,markString,garnish) OK |
| 779 |
DO |
| 780 |
GRAPHICS_ONE_AND_ONE (Dissimilarity, Configuration) |
| 781 |
Dissimilarity_Configuration_Weight_drawIntervalRegression ( |
| 782 |
me, you, nullptr, GRAPHICS, fromProximity, toProximity, fromDistance, toDistance, markSize, markString, garnish |
| 783 |
); |
| 784 |
GRAPHICS_ONE_AND_ONE_END |
| 785 |
} |
| 786 |
|
| 787 |
FORM (GRAPHICS_ONE_AND_ONE__Dissimilarity_Configuration_drawMonotoneRegression, U"Dissimilarity & Configuration: Draw regression (monotone mds)", U"Dissimilarity & Configuration: Draw regression (monotone mds)...") { |
| 788 |
OPTIONMENU_ENUM (kMDS_TiesHandling, tiesHandling, U"Handling of ties", kMDS_TiesHandling::DEFAULT) |
| 789 |
praat_Dissimilarity_Configuration_drawing_commonFields(fromProximity,toProximity,fromDistance,toDistance,markSize,markString,garnish) OK |
| 790 |
DO |
| 791 |
GRAPHICS_ONE_AND_ONE (Dissimilarity, Configuration) |
| 792 |
Dissimilarity_Configuration_Weight_drawMonotoneRegression ( |
| 793 |
me, you, nullptr, GRAPHICS, tiesHandling, fromProximity, toProximity, fromDistance, toDistance, |
| 794 |
markSize, markString, garnish |
| 795 |
); |
| 796 |
GRAPHICS_ONE_AND_ONE_END |
| 797 |
} |
| 798 |
|
| 799 |
FORM (GRAPHICS_ONE_AND_ONE__Dissimilarity_Configuration_drawISplineRegression, U"Dissimilarity & Configuration: Draw regression (i-spline mds)", U"Dissimilarity & Configuration: Draw regression (i-spline mds)...") { |
| 800 |
INTEGER (numberOfInteriorKnots, U"Number of interior knots", U"1") |
| 801 |
INTEGER (order, U"Order of I-spline", U"3") |
| 802 |
praat_Dissimilarity_Configuration_drawing_commonFields(fromProximity,toProximity,fromDistance,toDistance,markSize,markString,garnish) OK |
| 803 |
DO |
| 804 |
GRAPHICS_ONE_AND_ONE (Dissimilarity, Configuration) |
| 805 |
Dissimilarity_Configuration_Weight_drawISplineRegression ( |
| 806 |
me, you, nullptr, GRAPHICS, numberOfInteriorKnots, order,fromProximity, toProximity, fromDistance, toDistance, |
| 807 |
markSize, markString, garnish |
| 808 |
); |
| 809 |
GRAPHICS_ONE_AND_ONE_END |
| 810 |
} |
| 811 |
|
| 812 |
FORM (CONVERT_EACH_TO_ONE__Dissimilarity_to_Configuration_kruskal, U"Dissimilarity: To Configuration (kruskal)", U"Dissimilarity: To Configuration (kruskal)...") { |
| 813 |
COMMENT (U"Configuration") |
| 814 |
NATURAL (numberOfDimensions, U"Number of dimensions", U"2") |
| 815 |
NATURAL (distanceMetric, U"Distance metric", U"2 (= Euclidean)") |
| 816 |
OPTIONMENU_ENUM (kMDS_TiesHandling, tiesHandling, U"Handling of ties", kMDS_TiesHandling::DEFAULT) |
| 817 |
OPTIONMENU_ENUM (kMDS_KruskalStress, stressMeasure, U"Stress measure", kMDS_KruskalStress::KRUSKAL_1) |
| 818 |
praat_Dissimilarity_to_Configuration_commonFields(tolerance,maximumNumberOfIterations,numberOfRepetitions) |
| 819 |
OK |
| 820 |
DO |
| 821 |
CONVERT_EACH_TO_ONE (Dissimilarity) |
| 822 |
autoConfiguration result = Dissimilarity_to_Configuration_kruskal ( |
| 823 |
me, numberOfDimensions, distanceMetric, tiesHandling, stressMeasure, tolerance, |
| 824 |
maximumNumberOfIterations, numberOfRepetitions |
| 825 |
); |
| 826 |
CONVERT_EACH_TO_ONE_END (my name.get()) |
| 827 |
} |
| 828 |
|
| 829 |
FORM (CONVERT_EACH_TO_ONE__Dissimilarity_to_Configuration_absolute_mds, U"Dissimilarity: To Configuration (absolute mds)", U"Dissimilarity: To Configuration (absolute mds)...") { |
| 830 |
COMMENT (U"Configuration") |
| 831 |
NATURAL (numberOfDimensions, U"Number of dimensions", U"2") |
| 832 |
praat_Dissimilarity_to_Configuration_commonFields(tolerance,maximumNumberOfIterations,numberOfRepetitions) |
| 833 |
OK |
| 834 |
DO |
| 835 |
CONVERT_EACH_TO_ONE (Dissimilarity) |
| 836 |
constexpr bool showProgress = true; |
| 837 |
autoConfiguration result = Dissimilarity_Weight_absolute_mds ( |
| 838 |
me, nullptr, numberOfDimensions, tolerance, maximumNumberOfIterations, numberOfRepetitions, showProgress |
| 839 |
); |
| 840 |
CONVERT_EACH_TO_ONE_END (my name.get(), U"_absolute") |
| 841 |
} |
| 842 |
|
| 843 |
FORM (CONVERT_EACH_TO_ONE__Dissimilarity_to_Configuration_ratio_mds, U"Dissimilarity: To Configuration (ratio mds)", U"Dissimilarity: To Configuration (ratio mds)...") { |
| 844 |
COMMENT (U"Configuration") |
| 845 |
NATURAL (numberOfDimensions, U"Number of dimensions", U"2") |
| 846 |
praat_Dissimilarity_to_Configuration_commonFields(tolerance,maximumNumberOfIterations,numberOfRepetitions) |
| 847 |
OK |
| 848 |
DO |
| 849 |
CONVERT_EACH_TO_ONE (Dissimilarity) |
| 850 |
constexpr bool showProgress = true; |
| 851 |
autoConfiguration result = Dissimilarity_Weight_ratio_mds ( |
| 852 |
me, nullptr, numberOfDimensions, tolerance, maximumNumberOfIterations, numberOfRepetitions, showProgress |
| 853 |
); |
| 854 |
CONVERT_EACH_TO_ONE_END (my name.get(), U"_ratio") |
| 855 |
} |
| 856 |
|
| 857 |
FORM (CONVERT_EACH_TO_ONE__Dissimilarity_to_Configuration_interval_mds, U"Dissimilarity: To Configuration (interval mds)", U"Dissimilarity: To Configuration (interval mds)...") { |
| 858 |
COMMENT (U"Configuration") |
| 859 |
NATURAL (numberOfDimensions, U"Number of dimensions", U"2") |
| 860 |
praat_Dissimilarity_to_Configuration_commonFields(tolerance,maximumNumberOfIterations,numberOfRepetitions) |
| 861 |
OK |
| 862 |
DO |
| 863 |
CONVERT_EACH_TO_ONE (Dissimilarity) |
| 864 |
constexpr bool showProgress = true; |
| 865 |
autoConfiguration result = Dissimilarity_Weight_interval_mds ( |
| 866 |
me, nullptr, numberOfDimensions, tolerance, maximumNumberOfIterations, numberOfRepetitions, showProgress |
| 867 |
); |
| 868 |
CONVERT_EACH_TO_ONE_END (my name.get(), U"_interval") |
| 869 |
} |
| 870 |
|
| 871 |
FORM (CONVERT_EACH_TO_ONE__Dissimilarity_to_Configuration_monotone_mds, U"Dissimilarity: To Configuration (monotone mds)", U"Dissimilarity: To Configuration (monotone mds)...") { |
| 872 |
COMMENT (U"Configuration") |
| 873 |
NATURAL (numberOfDimensions, U"Number of dimensions", U"2") |
| 874 |
OPTIONMENU_ENUM (kMDS_TiesHandling, tiesHandling, U"Handling of ties", kMDS_TiesHandling::DEFAULT) |
| 875 |
praat_Dissimilarity_to_Configuration_commonFields (tolerance, maximumNumberOfIterations, numberOfRepetitions) |
| 876 |
OK |
| 877 |
DO |
| 878 |
CONVERT_EACH_TO_ONE (Dissimilarity) |
| 879 |
constexpr bool showProgress = true; |
| 880 |
autoConfiguration result = Dissimilarity_Weight_monotone_mds ( |
| 881 |
me, nullptr, numberOfDimensions, tiesHandling, tolerance, maximumNumberOfIterations, numberOfRepetitions, showProgress |
| 882 |
); |
| 883 |
CONVERT_EACH_TO_ONE_END (my name.get(), U"_monotone") |
| 884 |
} |
| 885 |
|
| 886 |
FORM (CONVERT_EACH_TO_ONE__Dissimilarity_to_Configuration_ispline_mds, U"Dissimilarity: To Configuration (i-spline mds)", U"Dissimilarity: To Configuration (i-spline mds)...") { |
| 887 |
COMMENT (U"Configuration") |
| 888 |
NATURAL (numberOfDimensions, U"Number of dimensions", U"2") |
| 889 |
COMMENT (U"Spline smoothing") |
| 890 |
INTEGER (numberOfInteriorKnots, U"Number of interior knots", U"1") |
| 891 |
INTEGER (order, U"Order of I-spline", U"1") |
| 892 |
praat_Dissimilarity_to_Configuration_commonFields(tolerance,maximumNumberOfIterations,numberOfRepetitions) |
| 893 |
OK |
| 894 |
DO |
| 895 |
Melder_require (order > 0 || numberOfInteriorKnots > 0, |
| 896 |
U"Order-zero spline must at least have 1 interior knot."); |
| 897 |
CONVERT_EACH_TO_ONE (Dissimilarity) |
| 898 |
constexpr bool showProgress = true; |
| 899 |
autoConfiguration result = Dissimilarity_Weight_ispline_mds ( |
| 900 |
me, nullptr, numberOfDimensions, numberOfInteriorKnots, order, tolerance, maximumNumberOfIterations, |
| 901 |
numberOfRepetitions, showProgress |
| 902 |
); |
| 903 |
CONVERT_EACH_TO_ONE_END (my name.get(), U"_ispline") |
| 904 |
} |
| 905 |
|
| 906 |
FORM (CONVERT_ONE_AND_ONE_TO_ONE__Dissimilarity_Weight_ispline_mds, U"Dissimilarity & Weight: To Configuration (i-spline mds)", U"Dissimilarity & Weight: To Configuration (i-spline mds)...") { |
| 907 |
COMMENT (U"Configuration") |
| 908 |
NATURAL (numberOfDimensions, U"Number of dimensions", U"2") |
| 909 |
COMMENT (U"Spline smoothing") |
| 910 |
INTEGER (numberOfInteriorKnots, U"Number of interior knots", U"1") |
| 911 |
INTEGER (order, U"Order of I-spline", U"1") |
| 912 |
praat_Dissimilarity_to_Configuration_commonFields(tolerance,maximumNumberOfIterations,numberOfRepetitions) |
| 913 |
OK |
| 914 |
DO |
| 915 |
CONVERT_ONE_AND_ONE_TO_ONE (Dissimilarity, Weight) |
| 916 |
constexpr bool showProgress = true; |
| 917 |
Melder_require (order > 0 || numberOfInteriorKnots > 0, |
| 918 |
U"Order-zero spline must at least have 1 interior knot."); |
| 919 |
autoConfiguration result = Dissimilarity_Weight_ispline_mds ( |
| 920 |
me, you, numberOfDimensions, numberOfInteriorKnots, order, tolerance, maximumNumberOfIterations, |
| 921 |
numberOfRepetitions, showProgress |
| 922 |
); |
| 923 |
CONVERT_ONE_AND_ONE_TO_ONE_END (my name.get(), U"_ispline") |
| 924 |
} |
| 925 |
|
| 926 |
FORM (CONVERT_ONE_AND_ONE_TO_ONE__Dissimilarity_Weight_absolute_mds, U"Dissimilarity & Weight: To Configuration (absolute mds)", U"Dissimilarity & Weight: To Configuration (absolute mds)...") { |
| 927 |
COMMENT (U"Configuration") |
| 928 |
NATURAL (numberOfDimensions, U"Number of dimensions", U"2") |
| 929 |
praat_Dissimilarity_to_Configuration_commonFields(tolerance,maximumNumberOfIterations,numberOfRepetitions) |
| 930 |
OK |
| 931 |
DO |
| 932 |
CONVERT_ONE_AND_ONE_TO_ONE (Dissimilarity, Weight) |
| 933 |
constexpr bool showProgress = true; |
| 934 |
autoConfiguration result = Dissimilarity_Weight_absolute_mds ( |
| 935 |
me, you, numberOfDimensions, tolerance, maximumNumberOfIterations, numberOfRepetitions, showProgress |
| 936 |
); |
| 937 |
CONVERT_ONE_AND_ONE_TO_ONE_END (my name.get(), U"_absolute") |
| 938 |
} |
| 939 |
|
| 940 |
FORM (CONVERT_ONE_AND_ONE_TO_ONE__Dissimilarity_Weight_ratio_mds, U"Dissimilarity & Weight: To Configuration (ratio mds)", U"Dissimilarity & Weight: To Configuration (ratio mds)...") { |
| 941 |
COMMENT (U"Configuration") |
| 942 |
NATURAL (numberOfDimensions, U"Number of dimensions", U"2") |
| 943 |
praat_Dissimilarity_to_Configuration_commonFields(tolerance,maximumNumberOfIterations,numberOfRepetitions) |
| 944 |
OK |
| 945 |
DO |
| 946 |
CONVERT_ONE_AND_ONE_TO_ONE (Dissimilarity, Weight) |
| 947 |
constexpr bool showProgress = true; |
| 948 |
autoConfiguration result = Dissimilarity_Weight_ratio_mds ( |
| 949 |
me, you, numberOfDimensions, tolerance, maximumNumberOfIterations, numberOfRepetitions, showProgress |
| 950 |
); |
| 951 |
CONVERT_ONE_AND_ONE_TO_ONE_END (my name.get(), U"_absolute") |
| 952 |
} |
| 953 |
|
| 954 |
FORM (CONVERT_ONE_AND_ONE_TO_ONE__Dissimilarity_Weight_interval_mds, U"Dissimilarity & Weight: To Configuration (interval mds)", U"Dissimilarity & Weight: To Configuration (interval mds)...") { |
| 955 |
COMMENT (U"Configuration") |
| 956 |
NATURAL (numberOfDimensions, U"Number of dimensions", U"2") |
| 957 |
praat_Dissimilarity_to_Configuration_commonFields(tolerance,maximumNumberOfIterations,numberOfRepetitions) |
| 958 |
OK |
| 959 |
DO |
| 960 |
CONVERT_ONE_AND_ONE_TO_ONE (Dissimilarity, Weight) |
| 961 |
constexpr bool showProgress = true; |
| 962 |
autoConfiguration result = Dissimilarity_Weight_interval_mds ( |
| 963 |
me, you, numberOfDimensions, tolerance, maximumNumberOfIterations, numberOfRepetitions, showProgress |
| 964 |
); |
| 965 |
CONVERT_ONE_AND_ONE_TO_ONE_END (my name.get(), U"_absolute") |
| 966 |
} |
| 967 |
|
| 968 |
FORM (CONVERT_ONE_AND_ONE_TO_ONE__Dissimilarity_Weight_monotone_mds, U"Dissimilarity & Weight: To Configuration (monotone mds)", U"Dissimilarity & Weight: To Configuration (monotone mds)...") { |
| 969 |
COMMENT (U"Configuration") |
| 970 |
NATURAL (numberOfDimensions, U"Number of dimensions", U"2") |
| 971 |
OPTIONMENU_ENUM (kMDS_TiesHandling, tiesHandling, U"Handling of ties", kMDS_TiesHandling::DEFAULT) |
| 972 |
praat_Dissimilarity_to_Configuration_commonFields(tolerance,maximumNumberOfIterations,numberOfRepetitions) |
| 973 |
OK |
| 974 |
DO |
| 975 |
CONVERT_ONE_AND_ONE_TO_ONE (Dissimilarity, Weight) |
| 976 |
constexpr bool showProgress = true; |
| 977 |
autoConfiguration result = Dissimilarity_Weight_monotone_mds ( |
| 978 |
me, you, numberOfDimensions, tiesHandling, tolerance, maximumNumberOfIterations, numberOfRepetitions, showProgress |
| 979 |
); |
| 980 |
CONVERT_ONE_AND_ONE_TO_ONE_END (my name.get(), U"_monotone") |
| 981 |
} |
| 982 |
|
| 983 |
FORM (CONVERT_EACH_TO_ONE__Dissimilarity_to_Distance, U"Dissimilarity: To Distance", U"Dissimilarity: To Distance...") { |
| 984 |
BOOLEAN (scale, U"Scale (additive constant)", true) |
| 985 |
OK |
| 986 |
DO |
| 987 |
CONVERT_EACH_TO_ONE (Dissimilarity) |
| 988 |
autoDistance result = Dissimilarity_to_Distance (me, scale ? kMDS_AnalysisScale::ORDINAL : kMDS_AnalysisScale::ABSOLUTE_); |
| 989 |
CONVERT_EACH_TO_ONE_END (my name.get()) |
| 990 |
} |
| 991 |
|
| 992 |
DIRECT (CONVERT_EACH_TO_ONE__Dissimilarity_to_Weight) { |
| 993 |
CONVERT_EACH_TO_ONE (Dissimilarity) |
| 994 |
autoWeight result = Dissimilarity_to_Weight (me); |
| 995 |
CONVERT_EACH_TO_ONE_END (my name.get()) |
| 996 |
} |
| 997 |
|
| 998 |
DIRECT (CONVERT_EACH_TO_ONE__Dissimilarity_to_MDSVec) { |
| 999 |
CONVERT_EACH_TO_ONE (Dissimilarity) |
| 1000 |
autoMDSVec result = Dissimilarity_to_MDSVec (me); |
| 1001 |
CONVERT_EACH_TO_ONE_END (my name.get()) |
| 1002 |
} |
| 1003 |
|
| 1004 |
/************************* Distance(s) ***************************************/ |
| 1005 |
|
| 1006 |
FORM (CONVERT_EACH_TO_ONE__Distance_to_ScalarProduct, U"Distance: To ScalarProduct", U"Distance: To ScalarProduct...") { |
| 1007 |
BOOLEAN (scaleSumOfSquares, U"Make sum of squares equal 1.0", true) |
| 1008 |
OK |
| 1009 |
DO |
| 1010 |
CONVERT_EACH_TO_ONE (Distance) |
| 1011 |
autoScalarProduct result = Distance_to_ScalarProduct (me, scaleSumOfSquares); |
| 1012 |
CONVERT_EACH_TO_ONE_END (my name.get()) |
| 1013 |
} |
| 1014 |
|
| 1015 |
DIRECT (CONVERT_EACH_TO_ONE__Distance_to_Dissimilarity) { |
| 1016 |
CONVERT_EACH_TO_ONE (Distance) |
| 1017 |
autoDissimilarity result = Distance_to_Dissimilarity (me); |
| 1018 |
CONVERT_EACH_TO_ONE_END (my name.get()) |
| 1019 |
} |
| 1020 |
|
| 1021 |
FORM (CONVERT_ALL_TO_MULTIPLE__old_Distances_to_Configuration_indscal, U"Distance: To Configuration (indscal)", U"Distance: To Configuration (indscal)...") { |
| 1022 |
NATURAL (numberOfDimensions, U"Number of dimensions", U"2") |
| 1023 |
BOOLEAN (normalizeScalarProducts, U"Normalize scalar products", true) |
| 1024 |
COMMENT (U"Minimization parameters") |
| 1025 |
REAL (tolerance, U"Tolerance", U"1e-5") |
| 1026 |
NATURAL (maximumNumberOfIterations, U"Maximum number of iterations", U"100 (= each repetition)") |
| 1027 |
NATURAL (numberOfRepetitions, U"Number of repetitions", U"1") |
| 1028 |
OK |
| 1029 |
DO |
| 1030 |
CONVERT_ALL_TO_MULTIPLE (Distance) |
| 1031 |
autoConfiguration configurationResult; |
| 1032 |
autoSalience salienceResult; |
| 1033 |
DistanceList_to_Configuration_indscal ( |
| 1034 |
(DistanceList) & list, numberOfDimensions, normalizeScalarProducts, tolerance, maximumNumberOfIterations, |
| 1035 |
numberOfRepetitions,true /* showProgress */, & configurationResult, & salienceResult |
| 1036 |
); |
| 1037 |
praat_new (configurationResult.move(), U"indscal"); |
| 1038 |
praat_new (salienceResult.move(), U"indscal"); |
| 1039 |
CONVERT_ALL_TO_MULTIPLE_END |
| 1040 |
} |
| 1041 |
|
| 1042 |
FORM (CONVERT_ALL_TO_MULTIPLE__Distances_to_Configuration_indscal, U"Distance: To Configuration (indscal)", U"Distance: To Configuration (indscal)...") { |
| 1043 |
NATURAL (numberOfDimensions, U"Number of dimensions", U"2") |
| 1044 |
BOOLEAN (normalizeScalarProducts, U"Normalize scalar products", true) |
| 1045 |
COMMENT (U"Minimization parameters") |
| 1046 |
REAL (tolerance, U"Tolerance", U"1e-5") |
| 1047 |
NATURAL (maximumNumberOfIterations, U"Maximum number of iterations", U"100 (= each repetition)") |
| 1048 |
NATURAL (numberOfRepetitions, U"Number of repetitions", U"1") |
| 1049 |
BOOLEAN (wantSalience, U"Want Salience", true) |
| 1050 |
BOOLEAN (showProgressInfo, U"Show progress info", false) |
| 1051 |
OK |
| 1052 |
DO_ALTERNATIVE (CONVERT_ALL_TO_MULTIPLE__old_Distances_to_Configuration_indscal) |
| 1053 |
CONVERT_ALL_TO_MULTIPLE (Distance) |
| 1054 |
autoConfiguration configurationResult; |
| 1055 |
autoSalience salienceResult; |
| 1056 |
DistanceList_to_Configuration_indscal ( |
| 1057 |
(DistanceList) & list, numberOfDimensions, normalizeScalarProducts, tolerance, maximumNumberOfIterations, |
| 1058 |
numberOfRepetitions, showProgressInfo, & configurationResult, (wantSalience ? & salienceResult: nullptr) |
| 1059 |
); |
| 1060 |
praat_new (configurationResult.move(), U"indscal"); |
| 1061 |
if (wantSalience) |
| 1062 |
praat_new (salienceResult.move(), U"indscal"); |
| 1063 |
CONVERT_ALL_TO_MULTIPLE_END |
| 1064 |
} |
| 1065 |
|
| 1066 |
FORM (GRAPHICS_ONE_AND_ONE__Distance_Configuration_drawScatterDiagram, U"Distance & Configuration: Draw scatter diagram", U"Distance & Configuration: Draw scatter diagram...") { |
| 1067 |
REAL (xmin, U"Minimum x-distance", U"0.0") |
| 1068 |
REAL (xmax, U"Maximum x-distance", U"0.0") |
| 1069 |
REAL (ymin, U"Minimum y-distance", U"0.0") |
| 1070 |
REAL (ymax, U"Maximum y-distance", U"0.0") |
| 1071 |
POSITIVE (markSize, U"Mark size (mm)", U"1.0") |
| 1072 |
SENTENCE (markString, U"Mark string (+xo.)", U"+") |
| 1073 |
BOOLEAN (garnish, U"Garnish", true) |
| 1074 |
OK |
| 1075 |
DO |
| 1076 |
GRAPHICS_ONE_AND_ONE (Distance, Configuration) |
| 1077 |
Distance_Configuration_drawScatterDiagram (me, you, GRAPHICS, xmin, xmax, ymin, ymax, markSize, markString, garnish); |
| 1078 |
GRAPHICS_ONE_AND_ONE_END |
| 1079 |
} |
| 1080 |
|
| 1081 |
FORM (CONVERT_ONE_AND_ALL_TO_MULTIPLE__Distance_Configuration_indscal, U"Distance & Configuration: To Configuration (indscal)", U"Distance & Configuration: To Configuration (indscal)...") { |
| 1082 |
BOOLEAN (normalizeScalarProducts, U"Normalize scalar products", true) |
| 1083 |
COMMENT (U"Minimization parameters") |
| 1084 |
REAL (tolerance, U"Tolerance", U"1e-5") |
| 1085 |
NATURAL (maximumNumberOfIterations, U"Maximum number of iterations", U"100 (= each repetition)") |
| 1086 |
OK |
| 1087 |
DO |
| 1088 |
CONVERT_ONE_AND_ALL_TO_MULTIPLE (Configuration, Distance) |
| 1089 |
autoConfiguration configurationResult; |
| 1090 |
autoSalience salienceResult; |
| 1091 |
DistanceList_Configuration_indscal ( |
| 1092 |
(DistanceList) & list, me, normalizeScalarProducts, tolerance, maximumNumberOfIterations, true, |
| 1093 |
& configurationResult, & salienceResult |
| 1094 |
); |
| 1095 |
praat_new (configurationResult.move(), U"indscal"); |
| 1096 |
praat_new (salienceResult.move(), U"indscal"); |
| 1097 |
CONVERT_ONE_AND_ALL_TO_MULTIPLE_END |
| 1098 |
} |
| 1099 |
|
| 1100 |
FORM (QUERY_ONE_AND_ONE_FOR_REAL__Distance_Configuration_vaf, U"Distance & Configuration: Get VAF", U"Distance & Configuration: Get VAF...") { |
| 1101 |
BOOLEAN (normalizeScalarProducts, U"Normalize scalar products", true) |
| 1102 |
OK |
| 1103 |
DO |
| 1104 |
QUERY_ONE_AND_ALL_FOR_REAL (Configuration, Distance) |
| 1105 |
double result; |
| 1106 |
DistanceList_Configuration_vaf ((DistanceList) & list, me, normalizeScalarProducts, & result); |
| 1107 |
QUERY_ONE_AND_ALL_FOR_REAL_END (U" (variance accounted for)") |
| 1108 |
} |
| 1109 |
|
| 1110 |
FORM (QUERY_ONE_AND_ONE_AND_ALL_FOR_REAL__Distance_Configuration_Salience_vaf, U"Distance & Configuration & Salience: Get VAF", U"Distance & Configuration & Salience: Get VAF...") { |
| 1111 |
BOOLEAN (normalizeScalarProducts, U"Normalize scalar products", true) |
| 1112 |
OK |
| 1113 |
DO |
| 1114 |
QUERY_ONE_AND_ONE_AND_ALL_FOR_REAL (Configuration, Salience, Distance) |
| 1115 |
double result; |
| 1116 |
DistanceList_Configuration_Salience_vaf ((DistanceList) & list, me, you, normalizeScalarProducts, & result); |
| 1117 |
QUERY_ONE_AND_ONE_AND_ALL_FOR_REAL_END (U" (variance accounted for)") |
| 1118 |
} |
| 1119 |
|
| 1120 |
FORM (QUERY_ONE_AND_ONE_AND_ALL_FOR_REAL__Dissimilarity_Configuration_Salience_vaf, U"Dissimilarity & Configuration & Salience: Get VAF", U"Dissimilarity & Configuration & Salience: Get VAF...") { |
| 1121 |
OPTIONMENU_ENUM (kMDS_TiesHandling, tiesHandling, U"Handling of ties", kMDS_TiesHandling::DEFAULT) |
| 1122 |
BOOLEAN (normalizeScalarProducts, U"Normalize scalar products", true) |
| 1123 |
OK |
| 1124 |
DO |
| 1125 |
QUERY_ONE_AND_ONE_AND_ALL_FOR_REAL (Configuration, Salience, Dissimilarity) |
| 1126 |
double result; |
| 1127 |
DissimilarityList_Configuration_Salience_vaf ((DissimilarityList) & list, me, you ,tiesHandling, normalizeScalarProducts, & result); |
| 1128 |
QUERY_ONE_AND_ONE_AND_ALL_FOR_REAL_END (U" (variance accounted for)"); |
| 1129 |
} |
| 1130 |
|
| 1131 |
FORM (CONVERT_ONE_AND_ONE_AND_ALL_TO_MULTIPLE__Distance_Configuration_Salience_indscal, U"Distance & Configuration & Salience: To Configuration (indscal)", U"Distance & Configuration & Salience: To Configuration (indscal)...") { |
| 1132 |
BOOLEAN (normalizeScalarProducts, U"Normalize scalar products", true) |
| 1133 |
COMMENT (U"Minimization parameters") |
| 1134 |
REAL (tolerance, U"Tolerance", U"1e-5") |
| 1135 |
NATURAL (maximumNumberOfIterations, U"Maximum number of iterations", U"100") |
| 1136 |
OK |
| 1137 |
DO |
| 1138 |
CONVERT_ONE_AND_ONE_AND_ALL_TO_MULTIPLE (Configuration, Salience, Distance) |
| 1139 |
autoConfiguration configurationResult; |
| 1140 |
autoSalience salienceResult; |
| 1141 |
DistanceList_Configuration_Salience_indscal ( |
| 1142 |
(DistanceList) & list, me, you, normalizeScalarProducts, tolerance, maximumNumberOfIterations, |
| 1143 |
true, & configurationResult, & salienceResult, nullptr |
| 1144 |
); |
| 1145 |
praat_new (configurationResult.move(), U"indscal"); |
| 1146 |
praat_new (salienceResult.move(), U"indscal"); |
| 1147 |
CONVERT_ONE_AND_ONE_AND_ALL_TO_MULTIPLE_END |
| 1148 |
} |
| 1149 |
|
| 1150 |
FORM (CONVERT_ALL_TO_MULTIPLE__Distances_to_Configuration_ytl, U"Distance: To Configuration (ytl)", U"Distance: To Configuration (ytl)...") { |
| 1151 |
NATURAL (numberOfDimensions, U"Number of dimensions", U"2") |
| 1152 |
BOOLEAN (normalizeScalarProducts, U"Normalize scalar products", true) |
| 1153 |
BOOLEAN (wantSalience, U"Want Salience", false) |
| 1154 |
OK |
| 1155 |
DO |
| 1156 |
CONVERT_ALL_LISTED_TO_MULTIPLE (Distance, DistanceList) |
| 1157 |
autoConfiguration configurationResult; |
| 1158 |
autoSalience salienceResult; |
| 1159 |
Melder_require (list->size > 1, |
| 1160 |
U"There should me more than one Distance selected."); |
| 1161 |
DistanceList_to_Configuration_ytl (list.get(), numberOfDimensions, normalizeScalarProducts, & configurationResult, & salienceResult); |
| 1162 |
praat_new (configurationResult.move(), U"ytl"); |
| 1163 |
if (wantSalience) |
| 1164 |
praat_new (salienceResult.move(), U"ytl"); |
| 1165 |
CONVERT_ALL_LISTED_TO_MULTIPLE_END |
| 1166 |
} |
| 1167 |
|
| 1168 |
FORM (CONVERT_EACH_TO_ONE__Distance_to_Configuration_torsca, U"Distance: To Configuration (torsca)", U"") { |
| 1169 |
NATURAL (numberOfDimensions, U"Number of dimensions", U"2") |
| 1170 |
OK |
| 1171 |
DO |
| 1172 |
CONVERT_EACH_TO_ONE (Distance) |
| 1173 |
autoConfiguration result = Distance_to_Configuration_torsca (me, numberOfDimensions); |
| 1174 |
CONVERT_EACH_TO_ONE_END (my name.get(), U"_torsca") |
| 1175 |
} |
| 1176 |
|
| 1177 |
FORM (CONVERT_ONE_AND_ONE_TO_ONE__Dissimilarity_Distance_monotoneRegression, U"Dissimilarity & Distance: Monotone regression", nullptr) { |
| 1178 |
OPTIONMENU_ENUM (kMDS_TiesHandling, tiesHandling, U"Handling of ties", kMDS_TiesHandling::DEFAULT) |
| 1179 |
OK |
| 1180 |
DO |
| 1181 |
CONVERT_ONE_AND_ONE_TO_ONE (Dissimilarity, Distance) |
| 1182 |
autoDistance result = Dissimilarity_Distance_monotoneRegression (me, you, tiesHandling); |
| 1183 |
CONVERT_ONE_AND_ONE_TO_ONE_END (my name.get()) |
| 1184 |
} |
| 1185 |
|
| 1186 |
FORM (GRAPHICS_ONE_AND_ONE__Distance_Dissimilarity_drawShepardDiagram, U"Distance & Dissimilarity: Draw Shepard diagram", nullptr) { |
| 1187 |
REAL (fromDissimilarity, U"left dissimilarity range", U"0.0") |
| 1188 |
REAL (toDissimilarity, U"right dissimilarity range", U"0.0") |
| 1189 |
REAL (fromDistance, U"left Distance range", U"0.0") |
| 1190 |
REAL (toDistance, U"right Distance range", U"0.0") |
| 1191 |
POSITIVE (markSize, U"Mark size (mm)", U"1.0") |
| 1192 |
SENTENCE (markString, U"Mark string (+xo.)", U"+") |
| 1193 |
BOOLEAN (garnish, U"Garnish", true) |
| 1194 |
OK |
| 1195 |
DO |
| 1196 |
GRAPHICS_ONE_AND_ONE (Dissimilarity, Distance) |
| 1197 |
Proximity_Distance_drawScatterDiagram ( |
| 1198 |
me, you, GRAPHICS, fromDissimilarity, toDissimilarity, fromDistance, toDistance, markSize, markString, garnish |
| 1199 |
); |
| 1200 |
GRAPHICS_ONE_AND_ONE_END |
| 1201 |
} |
| 1202 |
|
| 1203 |
DIRECT (HELP__MDS_help) { |
| 1204 |
HELP (U"Multidimensional scaling") |
| 1205 |
} |
| 1206 |
|
| 1207 |
/************************* Salience ***************************************/ |
| 1208 |
|
| 1209 |
FORM (GRAPHICS_EACH__Salience_draw, U"Salience: Draw", nullptr) { |
| 1210 |
NATURAL (horizontalDimension, U"Horizontal dimension", U"1") |
| 1211 |
NATURAL (verticalDimension, U"Vertical dimension", U"2") |
| 1212 |
BOOLEAN (garnish, U"Garnish", true) |
| 1213 |
OK |
| 1214 |
DO |
| 1215 |
GRAPHICS_EACH (Salience) |
| 1216 |
Salience_draw (me, GRAPHICS, horizontalDimension, verticalDimension, garnish); |
| 1217 |
GRAPHICS_EACH_END |
| 1218 |
} |
| 1219 |
|
| 1220 |
/************************* ScalarProducts ***************************************/ |
| 1221 |
|
| 1222 |
FORM (CONVERT_ALL_TO_MULTIPLE__ScalarProducts_to_Configuration_ytl, U"ScalarProducts: To Configuration (ytl)", U"") { |
| 1223 |
NATURAL (numberOfDimensions, U"Number of dimensions", U"2") |
| 1224 |
BOOLEAN (wantSalience, U"Want Salience", false) |
| 1225 |
OK |
| 1226 |
DO |
| 1227 |
CONVERT_ALL_TO_MULTIPLE (ScalarProduct) |
| 1228 |
autoConfiguration configuration; |
| 1229 |
autoSalience salience; |
| 1230 |
Melder_require (list.size > 1, |
| 1231 |
U"There should me more than one ScalarProduct selected."); |
| 1232 |
ScalarProductList_to_Configuration_ytl ((ScalarProductList)& list, numberOfDimensions, & configuration, & salience); |
| 1233 |
praat_new (configuration.move(), U"ytl"); |
| 1234 |
if (wantSalience) |
| 1235 |
praat_new (salience.move(), U"ytl"); |
| 1236 |
CONVERT_ALL_TO_MULTIPLE_END |
| 1237 |
} |
| 1238 |
|
| 1239 |
/************************* COVARIANCE & CONFIGURATION ********************/ |
| 1240 |
|
| 1241 |
FORM (CONVERT_EACH_TO_ONE__Covariance_to_Configuration, U"Covariance: To Configuration", nullptr) { |
| 1242 |
NATURAL (numberOfDimensions, U"Number of dimensions", U"2") |
| 1243 |
OK |
| 1244 |
DO |
| 1245 |
CONVERT_EACH_TO_ONE (Covariance) |
| 1246 |
autoConfiguration result = Covariance_to_Configuration (me, numberOfDimensions); |
| 1247 |
CONVERT_EACH_TO_ONE_END (my name.get()) |
| 1248 |
} |
| 1249 |
|
| 1250 |
/********* Procrustes ***************************/ |
| 1251 |
|
| 1252 |
DIRECT (HELP__Procrustes_help) { |
| 1253 |
HELP (U"Procrustes") |
| 1254 |
} |
| 1255 |
|
| 1256 |
DIRECT (QUERY_ONE_FOR_REAL__Procrustes_getScale) { |
| 1257 |
QUERY_ONE_FOR_REAL (Procrustes) |
| 1258 |
const double result = my s; |
| 1259 |
QUERY_ONE_FOR_REAL_END (U"(scale)") |
| 1260 |
} |
| 1261 |
|
| 1262 |
/********* Casts from & to TableOfReal ***************************/ |
| 1263 |
|
| 1264 |
DIRECT (CONVERT_EACH_TO_ONE__TableOfReal_to_Dissimilarity) { |
| 1265 |
CONVERT_EACH_TO_ONE (TableOfReal) |
| 1266 |
autoDissimilarity result = TableOfReal_to_Dissimilarity (me); |
| 1267 |
CONVERT_EACH_TO_ONE_END (my name.get()) |
| 1268 |
} |
| 1269 |
|
| 1270 |
DIRECT (CONVERT_EACH_TO_ONE__TableOfReal_to_Similarity) { |
| 1271 |
CONVERT_EACH_TO_ONE (TableOfReal) |
| 1272 |
autoSimilarity result = TableOfReal_to_Similarity (me); |
| 1273 |
CONVERT_EACH_TO_ONE_END (my name.get()) |
| 1274 |
} |
| 1275 |
|
| 1276 |
DIRECT (CONVERT_EACH_TO_ONE__TableOfReal_to_Distance) { |
| 1277 |
CONVERT_EACH_TO_ONE (TableOfReal) |
| 1278 |
autoTableOfReal result = TableOfReal_to_Distance (me); |
| 1279 |
CONVERT_EACH_TO_ONE_END (my name.get()) |
| 1280 |
} |
| 1281 |
|
| 1282 |
DIRECT (CONVERT_EACH_TO_ONE__TableOfReal_to_Salience) { |
| 1283 |
CONVERT_EACH_TO_ONE (TableOfReal) |
| 1284 |
autoSalience result = TableOfReal_to_Salience (me); |
| 1285 |
CONVERT_EACH_TO_ONE_END (my name.get()) |
| 1286 |
} |
| 1287 |
|
| 1288 |
DIRECT (CONVERT_EACH_TO_ONE__TableOfReal_to_Weight) { |
| 1289 |
CONVERT_EACH_TO_ONE (TableOfReal) |
| 1290 |
autoWeight result = TableOfReal_to_Weight (me); |
| 1291 |
CONVERT_EACH_TO_ONE_END (my name.get()) |
| 1292 |
} |
| 1293 |
|
| 1294 |
DIRECT (CONVERT_EACH_TO_ONE__TableOfReal_to_ScalarProduct) { |
| 1295 |
CONVERT_EACH_TO_ONE (TableOfReal) |
| 1296 |
autoScalarProduct result = TableOfReal_to_ScalarProduct (me); |
| 1297 |
CONVERT_EACH_TO_ONE_END (my name.get()) |
| 1298 |
} |
| 1299 |
|
| 1300 |
DIRECT (CONVERT_EACH_TO_ONE__TableOfReal_to_Configuration) { |
| 1301 |
CONVERT_EACH_TO_ONE (TableOfReal) |
| 1302 |
autoConfiguration result = TableOfReal_to_Configuration (me); |
| 1303 |
CONVERT_EACH_TO_ONE_END (my name.get()) |
| 1304 |
} |
| 1305 |
|
| 1306 |
DIRECT (CONVERT_EACH_TO_ONE__TableOfReal_to_ContingencyTable) { |
| 1307 |
CONVERT_EACH_TO_ONE (TableOfReal) |
| 1308 |
autoContingencyTable result = TableOfReal_to_ContingencyTable (me); |
| 1309 |
CONVERT_EACH_TO_ONE_END (my name.get()) |
| 1310 |
} |
| 1311 |
|
| 1312 |
/********************** TableOfReal ***************************************/ |
| 1313 |
|
| 1314 |
DIRECT (QUERY_ONE_FOR_REAL__TableOfReal_getTableNorm) { |
| 1315 |
QUERY_ONE_FOR_REAL (TableOfReal) |
| 1316 |
const double result = TableOfReal_getTableNorm (me); |
| 1317 |
QUERY_ONE_FOR_REAL_END (U"(norm)") |
| 1318 |
} |
| 1319 |
|
| 1320 |
FORM (MODIFY_EACH__TableOfReal_normalizeTable, U"TableOfReal: Normalize table", U"TableOfReal: Normalize table...") { |
| 1321 |
POSITIVE (norm, U"Norm", U"1.0") |
| 1322 |
OK |
| 1323 |
DO |
| 1324 |
MODIFY_EACH (TableOfReal) |
| 1325 |
TableOfReal_normalizeTable (me, norm); |
| 1326 |
MODIFY_EACH_END |
| 1327 |
} |
| 1328 |
|
| 1329 |
FORM (MODIFY_EACH__TableOfReal_normalizeRows, U"TableOfReal: Normalize rows", U"TableOfReal: Normalize rows...") { |
| 1330 |
POSITIVE (norm, U"Norm", U"1.0") |
| 1331 |
OK |
| 1332 |
DO |
| 1333 |
MODIFY_EACH (TableOfReal) |
| 1334 |
TableOfReal_normalizeRows (me, norm); |
| 1335 |
MODIFY_EACH_END |
| 1336 |
} |
| 1337 |
|
| 1338 |
FORM (MODIFY_EACH__TableOfReal_normalizeColumns, U"TableOfReal: Normalize columns", U"TableOfReal: Normalize columns...") { |
| 1339 |
POSITIVE (norm, U"Norm", U"1.0") |
| 1340 |
OK |
| 1341 |
DO |
| 1342 |
MODIFY_EACH (TableOfReal) |
| 1343 |
TableOfReal_normalizeColumns (me, norm); |
| 1344 |
MODIFY_EACH_END |
| 1345 |
} |
| 1346 |
|
| 1347 |
DIRECT (MODIFY_EACH__TableOfReal_centreRows) { |
| 1348 |
MODIFY_EACH (TableOfReal) |
| 1349 |
TableOfReal_centreRows (me); |
| 1350 |
MODIFY_EACH_END |
| 1351 |
} |
| 1352 |
|
| 1353 |
DIRECT (MODIFY_EACH__TableOfReal_centreColumns) { |
| 1354 |
MODIFY_EACH (TableOfReal) |
| 1355 |
TableOfReal_centreColumns (me); |
| 1356 |
MODIFY_EACH_END |
| 1357 |
} |
| 1358 |
|
| 1359 |
DIRECT (MODIFY_EACH__TableOfReal_doubleCentre) { |
| 1360 |
MODIFY_EACH (TableOfReal) |
| 1361 |
TableOfReal_doubleCentre (me); |
| 1362 |
MODIFY_EACH_END |
| 1363 |
} |
| 1364 |
|
| 1365 |
DIRECT (MODIFY_EACH__TableOfReal_standardizeRows) { |
| 1366 |
MODIFY_EACH (TableOfReal) |
| 1367 |
TableOfReal_standardizeRows (me); |
| 1368 |
MODIFY_EACH_END |
| 1369 |
} |
| 1370 |
|
| 1371 |
DIRECT (MODIFY_EACH__TableOfReal_standardizeColumns) { |
| 1372 |
MODIFY_EACH (TableOfReal) |
| 1373 |
TableOfReal_standardizeColumns (me); |
| 1374 |
MODIFY_EACH_END |
| 1375 |
} |
| 1376 |
|
| 1377 |
DIRECT (CONVERT_EACH_TO_ONE__TableOfReal_to_Confusion) { |
| 1378 |
CONVERT_EACH_TO_ONE (TableOfReal) |
| 1379 |
autoConfusion result = TableOfReal_to_Confusion (me); |
| 1380 |
CONVERT_EACH_TO_ONE_END (my name.get()) |
| 1381 |
} |
| 1382 |
|
| 1383 |
static void praat_AffineTransform_init (ClassInfo klas) { |
| 1384 |
praat_addAction1 (klas, 0, QUERY_BUTTON, nullptr, 0, nullptr); |
| 1385 |
praat_addAction1 (klas, 1, U"Get transformation element...", QUERY_BUTTON, 1, |
| 1386 |
QUERY_ONE_FOR_REAL__AffineTransform_getTransformationElement); |
| 1387 |
praat_addAction1 (klas, 1, U"Get translation element...", QUERY_BUTTON, 1, |
| 1388 |
QUERY_ONE_FOR_REAL__AffineTransform_getTranslationElement); |
| 1389 |
praat_addAction1 (klas, 0, U"Invert", nullptr, 0, |
| 1390 |
CONVERT_EACH_TO_ONE__AffineTransform_invert); |
| 1391 |
} |
| 1392 |
|
| 1393 |
void praat_TableOfReal_extras (ClassInfo klas); |
| 1394 |
void praat_TableOfReal_extras (ClassInfo klas) { |
| 1395 |
praat_addAction1 (klas, 1, U"-- get additional --", U"Get value...", 1, nullptr); |
| 1396 |
praat_addAction1 (klas, 1, U"Get table norm", U"-- get additional --", 1, |
| 1397 |
QUERY_ONE_FOR_REAL__TableOfReal_getTableNorm); |
| 1398 |
praat_addAction1 (klas, 0, U"-- set additional --", U"Set column label (label)...", 1, nullptr); |
| 1399 |
praat_addAction1 (klas, 0, U"Normalize rows...", U"-- set additional --", 1, |
| 1400 |
MODIFY_EACH__TableOfReal_normalizeRows); |
| 1401 |
praat_addAction1 (klas, 0, U"Normalize columns...", U"Normalize rows...", 1, |
| 1402 |
MODIFY_EACH__TableOfReal_normalizeColumns); |
| 1403 |
praat_addAction1 (klas, 0, U"Normalize table...", U"Normalize columns...", 1, |
| 1404 |
MODIFY_EACH__TableOfReal_normalizeTable); |
| 1405 |
praat_addAction1 (klas, 0, U"Standardize rows", U"Normalize table...", 1, |
| 1406 |
MODIFY_EACH__TableOfReal_standardizeRows); |
| 1407 |
praat_addAction1 (klas, 0, U"Standardize columns", U"Standardize rows", 1, |
| 1408 |
MODIFY_EACH__TableOfReal_standardizeColumns); |
| 1409 |
} |
| 1410 |
|
| 1411 |
void praat_MDS_new_init (); |
| 1412 |
void praat_MDS_new_init () { |
| 1413 |
Thing_recognizeClassesByName (classAffineTransform, classProcrustes, classContingencyTable, classDissimilarity, classMDSVec, |
| 1414 |
classSimilarity, classConfiguration, classDistance, classSalience, classScalarProduct, classWeight); |
| 1415 |
Thing_recognizeClassByOtherName (classProcrustes, U"Procrustus"); |
| 1416 |
|
| 1417 |
praat_addMenuCommand (U"Objects", U"New", U"Multidimensional scaling", nullptr, 1, nullptr); |
| 1418 |
praat_addMenuCommand (U"Objects", U"New", U"Multidimensional scaling tutorial", nullptr, GuiMenu_DEPTH_2 | GuiMenu_NO_API, |
| 1419 |
HELP__MDS_help); |
| 1420 |
praat_addMenuCommand (U"Objects", U"New", U"-- MDS --", nullptr, 2, nullptr); |
| 1421 |
praat_addMenuCommand (U"Objects", U"New", U"Create letter R example...", nullptr, 2, |
| 1422 |
CREATE_ONE__Dissimilarity_createLetterRExample); |
| 1423 |
praat_addMenuCommand (U"Objects", U"New", U"Create INDSCAL Carroll Wish example...", nullptr, 2, |
| 1424 |
CREATE_MULTIPLE_INDSCAL_createCarrollWishExample); |
| 1425 |
praat_addMenuCommand (U"Objects", U"New", U"Create Configuration...", nullptr, 2, |
| 1426 |
CREATE_ONE__Configuration_create); |
| 1427 |
praat_addMenuCommand (U"Objects", U"New", U"Draw splines...", nullptr, 2, |
| 1428 |
GRAPHICS_NONE__drawSplines); |
| 1429 |
praat_addMenuCommand (U"Objects", U"New", U"Draw MDS class relations", nullptr, 2, |
| 1430 |
GRAPHICS_NONE__drawMDSClassRelations); |
| 1431 |
|
| 1432 |
INCLUDE_MANPAGES (manual_MDS_init) |
| 1433 |
} |
| 1434 |
|
| 1435 |
void praat_MDS_actions_init (); |
| 1436 |
void praat_MDS_actions_init () { |
| 1437 |
|
| 1438 |
/****** 1 class ********************************************************/ |
| 1439 |
|
| 1440 |
praat_addAction1 (classAffineTransform, 0, U"AffineTransform help", nullptr, 0, |
| 1441 |
HELP__AffineTransform_help); |
| 1442 |
praat_AffineTransform_init (classAffineTransform); |
| 1443 |
|
| 1444 |
|
| 1445 |
praat_addAction1 (classConfiguration, 0, U"Configuration help", nullptr, 0, |
| 1446 |
HELP__Configuration_help); |
| 1447 |
praat_TableOfReal_init2 (classConfiguration); |
| 1448 |
praat_TableOfReal_extras (classConfiguration); |
| 1449 |
praat_removeAction (classConfiguration, nullptr, nullptr, U"Insert column (index)..."); |
| 1450 |
praat_removeAction (classConfiguration, nullptr, nullptr, U"Remove column (index)..."); |
| 1451 |
praat_removeAction (classConfiguration, nullptr, nullptr, U"Append"); |
| 1452 |
praat_addAction1 (classConfiguration, 0, U"Draw...", DRAW_BUTTON, 1, |
| 1453 |
GRAPHICS_EACH__Configuration_draw); |
| 1454 |
praat_addAction1 (classConfiguration, 0, U"Draw sigma ellipses...", U"Draw...", 1, |
| 1455 |
GRAPHICS_EACH__Configuration_drawSigmaEllipses); |
| 1456 |
praat_addAction1 (classConfiguration, 0, U"Draw one sigma ellipse...", U"Draw...", 1, |
| 1457 |
GRAPHICS_EACH__Configuration_drawOneSigmaEllipse); |
| 1458 |
praat_addAction1 (classConfiguration, 0, U"Draw confidence ellipses...", U"Draw sigma ellipses...", 1, |
| 1459 |
GRAPHICS_EACH__Configuration_drawConfidenceEllipses); |
| 1460 |
praat_addAction1 (classConfiguration, 0, U"Draw one confidence ellipse...", U"Draw sigma ellipses...", 1, |
| 1461 |
GRAPHICS_EACH__Configuration_drawOneConfidenceEllipse); |
| 1462 |
|
| 1463 |
praat_addAction1 (classConfiguration, 0, U"Randomize", U"Normalize table...", 1, |
| 1464 |
MODIFY_Configuration_randomize); |
| 1465 |
praat_addAction1 (classConfiguration, 0, U"Normalize...", U"Randomize", 1, |
| 1466 |
MODIFY_Configuration_normalize); |
| 1467 |
praat_addAction1 (classConfiguration, 0, U"Centralize", U"Randomize", 1, |
| 1468 |
MODIFY_Configuration_centralize); |
| 1469 |
praat_addAction1 (classConfiguration, 1, U"-- set rotations & reflections --", U"Centralize", 1, nullptr); |
| 1470 |
|
| 1471 |
praat_addAction1 (classConfiguration, 0, U"Rotate...", U"-- set rotations & reflections --", 1, |
| 1472 |
MODIFY_Configuration_rotate); |
| 1473 |
praat_addAction1 (classConfiguration, 0, U"Rotate (pc)", U"Rotate...", 1, |
| 1474 |
MODIFY_Configuration_rotateToPrincipalDirections); |
| 1475 |
praat_addAction1 (classConfiguration, 0, U"Invert dimension...", U"Rotate (pc)", 1, |
| 1476 |
MODIFY_Configuration_invertDimension); |
| 1477 |
praat_addAction1 (classConfiguration, 0, U"Analyse", nullptr, 0, nullptr); |
| 1478 |
praat_addAction1 (classConfiguration, 0, U"To Distance", nullptr, 0, |
| 1479 |
CONVERT_EACH_TO_ONE__Configuration_to_Distance); |
| 1480 |
praat_addAction1 (classConfiguration, 0, U"To Configuration (varimax)...", nullptr, 0, |
| 1481 |
CONVERT_EACH_TO_ONE__Configuration_varimax); |
| 1482 |
praat_addAction1 (classConfiguration, 0, U"To Similarity (cc)", nullptr, 0, |
| 1483 |
COMBINE_ALL_LISTED_TO_ONE__Configurations_to_Similarity_cc); |
| 1484 |
|
| 1485 |
praat_addAction1 (classConfiguration, 0, U"Match configurations -", nullptr, 0, nullptr); |
| 1486 |
praat_addAction1 (classConfiguration, 2, U"To Procrustes...", nullptr, 1, |
| 1487 |
CONVERT_TWO_TO_ONE__Configurations_to_Procrustes); |
| 1488 |
praat_addAction1 (classConfiguration, 2, U"To AffineTransform (congruence)...", nullptr, 1, |
| 1489 |
CONVERT_TWO_TO_ONE__Configurations_to_AffineTransform_congruence); |
| 1490 |
|
| 1491 |
praat_addAction1 (classConfusion, 0, U"To ContingencyTable", U"To Matrix", 1, |
| 1492 |
CONVERT_EACH_TO_ONE__Confusion_to_ContingencyTable); |
| 1493 |
praat_addAction1 (classConfusion, 0, U"To Proximity -", U"Analyse", 0, nullptr); |
| 1494 |
praat_addAction1 (classConfusion, 0, U"To Dissimilarity (pdf)...", U"To Proximity -", 1, |
| 1495 |
CONVERT_EACH_TO_ONE__Confusion_to_Dissimilarity_pdf); |
| 1496 |
praat_addAction1 (classConfusion, 0, U"To Similarity...", U"To Proximity -", 1, |
| 1497 |
CONVERT_EACH_TO_ONE__Confusion_to_Similarity); |
| 1498 |
praat_addAction1 (classConfusion, 0, U"Sum", U"Synthesize -", 1, |
| 1499 |
COMBINE_ALL_LISTED_TO_ONE__Confusions_sum); |
| 1500 |
|
| 1501 |
|
| 1502 |
praat_TableOfReal_init2 (classContingencyTable); |
| 1503 |
praat_addAction1 (classContingencyTable, 1, U"-- statistics --", U"Get value...", 1, nullptr); |
| 1504 |
praat_addAction1 (classContingencyTable, 1, U"Get chi squared probability", U"-- statistics --", 1, |
| 1505 |
QUERY_ONE_FOR_REAL__ContingencyTable_chisqProbability); |
| 1506 |
praat_addAction1 (classContingencyTable, 1, U"Get Cramer's statistic", U"Get chi squared probability", 1, |
| 1507 |
QUERY_ONE_FOR_REAL__ContingencyTable_cramersStatistic); |
| 1508 |
praat_addAction1 (classContingencyTable, 1, U"Get contingency coefficient", U"Get Cramer's statistic", 1, |
| 1509 |
QUERY_ONE_FOR_REAL__ContingencyTable_contingencyCoefficient); |
| 1510 |
praat_addAction1 (classContingencyTable, 0, U"Analyse", nullptr, 0, nullptr); |
| 1511 |
praat_addAction1 (classContingencyTable, 1, U"To Configuration (ca)...", nullptr, 0, |
| 1512 |
CONVERT_EACH_TO_ONE__ContingencyTable_to_Configuration_ca); |
| 1513 |
|
| 1514 |
|
| 1515 |
praat_addAction1 (classCorrelation, 0, U"To Configuration...", nullptr, 0, |
| 1516 |
CONVERT_EACH_TO_ONE__Correlation_to_Configuration); |
| 1517 |
|
| 1518 |
praat_addAction1 (classDissimilarity, 0, U"Dissimilarity help", nullptr, 0, |
| 1519 |
HELP__Dissimilarity_help); |
| 1520 |
praat_TableOfReal_init2 (classDissimilarity); |
| 1521 |
praat_TableOfReal_extras (classDissimilarity); |
| 1522 |
praat_addAction1 (classDissimilarity, 0, U"Get additive constant", U"Get table norm", 1, |
| 1523 |
QUERY_ONE_FOR_REAL__Dissimilarity_getAdditiveConstant); |
| 1524 |
praat_addAction1 (classDissimilarity, 0, CONFIGURATION_BUTTON, nullptr, 0, nullptr); |
| 1525 |
praat_addAction1 (classDissimilarity, 1, U"To Configuration (monotone mds)...", nullptr, 1, |
| 1526 |
CONVERT_EACH_TO_ONE__Dissimilarity_to_Configuration_monotone_mds); |
| 1527 |
praat_addAction1 (classDissimilarity, 1, U"To Configuration (i-spline mds)...", nullptr, 1, |
| 1528 |
CONVERT_EACH_TO_ONE__Dissimilarity_to_Configuration_ispline_mds); |
| 1529 |
praat_addAction1 (classDissimilarity, 1, U"To Configuration (interval mds)...", nullptr, 1, |
| 1530 |
CONVERT_EACH_TO_ONE__Dissimilarity_to_Configuration_interval_mds); |
| 1531 |
praat_addAction1 (classDissimilarity, 1, U"To Configuration (ratio mds)...", nullptr, 1, |
| 1532 |
CONVERT_EACH_TO_ONE__Dissimilarity_to_Configuration_ratio_mds); |
| 1533 |
praat_addAction1 (classDissimilarity, 1, U"To Configuration (absolute mds)...", nullptr, 1, |
| 1534 |
CONVERT_EACH_TO_ONE__Dissimilarity_to_Configuration_absolute_mds); |
| 1535 |
praat_addAction1 (classDissimilarity, 1, U"To Configuration (kruskal)...", nullptr, 1, |
| 1536 |
CONVERT_EACH_TO_ONE__Dissimilarity_to_Configuration_kruskal); |
| 1537 |
praat_addAction1 (classDissimilarity, 0, U"To Distance...", nullptr, 0, |
| 1538 |
CONVERT_EACH_TO_ONE__Dissimilarity_to_Distance); |
| 1539 |
praat_addAction1 (classDissimilarity, 0, U"To Weight", nullptr, 0, |
| 1540 |
CONVERT_EACH_TO_ONE__Dissimilarity_to_Weight); |
| 1541 |
praat_addAction1 (classDissimilarity, 0, U"To MDSVec", nullptr, GuiMenu_HIDDEN, |
| 1542 |
CONVERT_EACH_TO_ONE__Dissimilarity_to_MDSVec); |
| 1543 |
|
| 1544 |
praat_addAction1 (classCovariance, 0, U"To Configuration...", nullptr, 0, |
| 1545 |
CONVERT_EACH_TO_ONE__Covariance_to_Configuration); |
| 1546 |
|
| 1547 |
praat_TableOfReal_init2 (classDistance); |
| 1548 |
praat_TableOfReal_extras (classDistance); |
| 1549 |
praat_addAction1 (classDistance, 0, U"Analyse -", nullptr, 0, nullptr); |
| 1550 |
praat_addAction1 (classDistance, 0, CONFIGURATION_BUTTON, nullptr, 0, nullptr); |
| 1551 |
praat_addAction1 (classDistance, 0, U"To Configuration (indscal)...", nullptr, 1, |
| 1552 |
CONVERT_ALL_TO_MULTIPLE__Distances_to_Configuration_indscal); |
| 1553 |
praat_addAction1 (classDistance, 0, U"-- linear scaling --", nullptr, 1, nullptr); |
| 1554 |
praat_addAction1 (classDistance, 0, U"To Configuration (ytl)...", nullptr, 1, |
| 1555 |
CONVERT_ALL_TO_MULTIPLE__Distances_to_Configuration_ytl); |
| 1556 |
praat_addAction1 (classDistance, 0, U"To Configuration (torsca)...", nullptr, 1, |
| 1557 |
CONVERT_EACH_TO_ONE__Distance_to_Configuration_torsca); |
| 1558 |
praat_addAction1 (classDistance, 0, U"To Dissimilarity", nullptr, 0, |
| 1559 |
CONVERT_EACH_TO_ONE__Distance_to_Dissimilarity); |
| 1560 |
praat_addAction1 (classDistance, 0, U"To ScalarProduct...", nullptr, 0, |
| 1561 |
CONVERT_EACH_TO_ONE__Distance_to_ScalarProduct); |
| 1562 |
|
| 1563 |
|
| 1564 |
praat_addAction1 (classProcrustes, 0, U"Procrustes help", nullptr, 0, |
| 1565 |
HELP__Procrustes_help); |
| 1566 |
praat_AffineTransform_init (classProcrustes); |
| 1567 |
praat_addAction1 (classProcrustes, 1, U"Get scale", QUERY_BUTTON, 1, |
| 1568 |
QUERY_ONE_FOR_REAL__Procrustes_getScale); |
| 1569 |
praat_addAction1 (classProcrustes, 0, U"Extract transformation matrix", nullptr, 0, |
| 1570 |
CONVERT_EACH_TO_ONE__AffineTransform_extractMatrix); |
| 1571 |
praat_addAction1 (classProcrustes, 0, U"Extract translation vector", nullptr, 0, |
| 1572 |
CONVERT_EACH_TO_ONE__AffineTransform_extractTranslationVector); |
| 1573 |
|
| 1574 |
praat_TableOfReal_init2 (classSalience); |
| 1575 |
praat_TableOfReal_extras (classSalience); |
| 1576 |
praat_addAction1 (classSalience, 0, U"Draw...", DRAW_BUTTON, 1, |
| 1577 |
GRAPHICS_EACH__Salience_draw); |
| 1578 |
|
| 1579 |
|
| 1580 |
praat_addAction1 (classSimilarity, 0, U"Similarity help", nullptr, 0, |
| 1581 |
HELP__Similarity_help); |
| 1582 |
praat_TableOfReal_init2 (classSimilarity); |
| 1583 |
praat_TableOfReal_extras (classSimilarity); |
| 1584 |
praat_addAction1 (classSimilarity, 0, U"Analyse -", nullptr, 0, nullptr); |
| 1585 |
praat_addAction1 (classSimilarity, 0, U"To Dissimilarity...", nullptr, 0, |
| 1586 |
CONVERT_EACH_TO_ONE__Similarity_to_Dissimilarity); |
| 1587 |
|
| 1588 |
|
| 1589 |
praat_TableOfReal_init2 (classScalarProduct); |
| 1590 |
praat_TableOfReal_extras (classScalarProduct); |
| 1591 |
praat_addAction1 (classScalarProduct, 0, U"To Configuration (ytl)...", nullptr, 1, |
| 1592 |
CONVERT_ALL_TO_MULTIPLE__ScalarProducts_to_Configuration_ytl); |
| 1593 |
|
| 1594 |
praat_TableOfReal_extras (classTableOfReal); |
| 1595 |
praat_addAction1 (classTableOfReal, 1, U"Centre rows", U"Normalize table...", 1, |
| 1596 |
MODIFY_EACH__TableOfReal_centreRows); |
| 1597 |
praat_addAction1 (classTableOfReal, 1, U"Centre columns", U"Centre rows", 1, |
| 1598 |
MODIFY_EACH__TableOfReal_centreColumns); |
| 1599 |
praat_addAction1 (classTableOfReal, 1, U"Double centre", U"Centre columns", 1, |
| 1600 |
MODIFY_EACH__TableOfReal_doubleCentre); |
| 1601 |
praat_addAction1 (classTableOfReal, 0, U"Cast -", nullptr, 0, nullptr); |
| 1602 |
praat_addAction1 (classTableOfReal, 0, U"To Confusion", nullptr, 1, |
| 1603 |
CONVERT_EACH_TO_ONE__TableOfReal_to_Confusion); |
| 1604 |
praat_addAction1 (classTableOfReal, 0, U"To Dissimilarity", nullptr, 1, |
| 1605 |
CONVERT_EACH_TO_ONE__TableOfReal_to_Dissimilarity); |
| 1606 |
praat_addAction1 (classTableOfReal, 0, U"To Similarity", nullptr, 1, |
| 1607 |
CONVERT_EACH_TO_ONE__TableOfReal_to_Similarity); |
| 1608 |
praat_addAction1 (classTableOfReal, 0, U"To Distance", nullptr, 1, |
| 1609 |
CONVERT_EACH_TO_ONE__TableOfReal_to_Distance); |
| 1610 |
praat_addAction1 (classTableOfReal, 0, U"To Salience", nullptr, 1, |
| 1611 |
CONVERT_EACH_TO_ONE__TableOfReal_to_Salience); |
| 1612 |
praat_addAction1 (classTableOfReal, 0, U"To Weight", nullptr, 1, |
| 1613 |
CONVERT_EACH_TO_ONE__TableOfReal_to_Weight); |
| 1614 |
praat_addAction1 (classTableOfReal, 0, U"To ScalarProduct", nullptr, 1, |
| 1615 |
CONVERT_EACH_TO_ONE__TableOfReal_to_ScalarProduct); |
| 1616 |
praat_addAction1 (classTableOfReal, 0, U"To ContingencyTable", nullptr, 1, |
| 1617 |
CONVERT_EACH_TO_ONE__TableOfReal_to_ContingencyTable); |
| 1618 |
praat_addAction1 (classTableOfReal, 0, U"To Configuration", nullptr, 1, |
| 1619 |
CONVERT_EACH_TO_ONE__TableOfReal_to_Configuration); |
| 1620 |
|
| 1621 |
praat_TableOfReal_init2 (classWeight); |
| 1622 |
|
| 1623 |
/****** 2 classes ********************************************************/ |
| 1624 |
|
| 1625 |
praat_addAction2 (classConfiguration, 1, classAffineTransform, 1, U"To Configuration", nullptr, 0, |
| 1626 |
CONVERT_ONE_AND_ONE_TO_ONE__Configuration_AffineTransform_to_Configuration); |
| 1627 |
praat_addAction2 (classConfiguration, 1, classProcrustes, 1, U"To Configuration", nullptr, 0, |
| 1628 |
CONVERT_ONE_AND_ONE_TO_ONE__Configuration_Procrustes_to_Configuration); |
| 1629 |
|
| 1630 |
praat_addAction2 (classConfiguration, 0, classWeight, 1, U"Analyse", nullptr, 0, nullptr); |
| 1631 |
praat_addAction2 (classConfiguration, 0, classWeight, 1, U"To Similarity (cc)", nullptr, 0, |
| 1632 |
CONVERT_ONE_AND_ALL_LISTED_TO_ONE__Configuration_Weight_to_Similarity_cc); |
| 1633 |
|
| 1634 |
praat_addAction2 (classDissimilarity, 1, classWeight, 1, ANALYSE_BUTTON, nullptr, 0, nullptr); |
| 1635 |
praat_addAction2 (classDissimilarity, 1, classWeight, 1, U"To Configuration (monotone mds)...", nullptr, 1, |
| 1636 |
CONVERT_ONE_AND_ONE_TO_ONE__Dissimilarity_Weight_monotone_mds); |
| 1637 |
praat_addAction2 (classDissimilarity, 1, classWeight, 1, U"To Configuration (i-spline mds)...", nullptr, 1, |
| 1638 |
CONVERT_ONE_AND_ONE_TO_ONE__Dissimilarity_Weight_ispline_mds); |
| 1639 |
praat_addAction2 (classDissimilarity, 1, classWeight, 1, U"To Configuration (interval mds)...", nullptr, 1, |
| 1640 |
CONVERT_ONE_AND_ONE_TO_ONE__Dissimilarity_Weight_interval_mds); |
| 1641 |
praat_addAction2 (classDissimilarity, 1, classWeight, 1, U"To Configuration (ratio mds)...", nullptr, 1, |
| 1642 |
CONVERT_ONE_AND_ONE_TO_ONE__Dissimilarity_Weight_ratio_mds); |
| 1643 |
praat_addAction2 (classDissimilarity, 1, classWeight, 1, U"To Configuration (absolute mds)...", nullptr, 1, |
| 1644 |
CONVERT_ONE_AND_ONE_TO_ONE__Dissimilarity_Weight_absolute_mds); |
| 1645 |
|
| 1646 |
|
| 1647 |
praat_addAction2 (classDissimilarity, 1, classConfiguration, 1, DRAW_BUTTON, nullptr, 0, nullptr); |
| 1648 |
praat_addAction2 (classDissimilarity, 1, classConfiguration, 1, U"Draw Shepard diagram...", nullptr, 1, |
| 1649 |
GRAPHICS_ONE_AND_ONE__Dissimilarity_Configuration_drawShepardDiagram); |
| 1650 |
praat_addAction2 (classDissimilarity, 1, classConfiguration, 1, U"-- draw regressions --", nullptr, 1, nullptr); |
| 1651 |
praat_addAction2 (classDissimilarity, 1, classConfiguration, 1, U"Draw monotone regression...", nullptr, 1, |
| 1652 |
GRAPHICS_ONE_AND_ONE__Dissimilarity_Configuration_drawMonotoneRegression); |
| 1653 |
praat_addAction2 (classDissimilarity, 1, classConfiguration, 1, U"Draw i-spline regression...", nullptr, 1, |
| 1654 |
GRAPHICS_ONE_AND_ONE__Dissimilarity_Configuration_drawISplineRegression); |
| 1655 |
praat_addAction2 (classDissimilarity, 1, classConfiguration, 1, U"Draw interval regression...", nullptr, 1, |
| 1656 |
GRAPHICS_ONE_AND_ONE__Dissimilarity_Configuration_drawIntervalRegression); |
| 1657 |
praat_addAction2 (classDissimilarity, 1, classConfiguration, 1, U"Draw ratio regression...", nullptr, 1, |
| 1658 |
GRAPHICS_ONE_AND_ONE__Dissimilarity_Configuration_drawRatioRegression); |
| 1659 |
praat_addAction2 (classDissimilarity, 1, classConfiguration, 1, U"Draw absolute regression...", nullptr, 1, |
| 1660 |
GRAPHICS_ONE_AND_ONE__Dissimilarity_Configuration_drawAbsoluteRegression); |
| 1661 |
praat_addAction2 (classDissimilarity, 1, classConfiguration, 1, QUERY_BUTTON, nullptr, 0, nullptr); |
| 1662 |
praat_addAction2 (classDissimilarity, 1, classConfiguration, 1, U"Get stress (monotone mds)...", nullptr, 1, |
| 1663 |
QUERY_ONE_AND_ONE_FOR_REAL__Dissimilarity_Configuration_monotone_stress); |
| 1664 |
praat_addAction2 (classDissimilarity, 1, classConfiguration, 1, U"Get stress (i-spline mds)...", nullptr, 1, |
| 1665 |
QUERY_ONE_AND_ONE_FOR_REAL__Dissimilarity_Configuration_ispline_stress); |
| 1666 |
praat_addAction2 (classDissimilarity, 1, classConfiguration, 1, U"Get stress (interval mds)...", nullptr, 1, |
| 1667 |
QUERY_ONE_AND_ONE_FOR_REAL__Dissimilarity_Configuration_interval_stress); |
| 1668 |
praat_addAction2 (classDissimilarity, 1, classConfiguration, 1, U"Get stress (ratio mds)...", nullptr, 1, |
| 1669 |
QUERY_ONE_AND_ONE_FOR_REAL__Dissimilarity_Configuration_ratio_stress); |
| 1670 |
praat_addAction2 (classDissimilarity, 1, classConfiguration, 1, U"Get stress (absolute mds)...", nullptr, 1, |
| 1671 |
QUERY_ONE_AND_ONE_FOR_REAL__Dissimilarity_Configuration_absolute_stress); |
| 1672 |
praat_addAction2 (classDissimilarity, 1, classConfiguration, 1, U"Get stress...", nullptr, 1, |
| 1673 |
QUERY_ONE_AND_ONE_FOR_REAL__Dissimilarity_Configuration_getStress); |
| 1674 |
praat_addAction2 (classDissimilarity, 1, classConfiguration, 1, ANALYSE_BUTTON, nullptr, 0, nullptr); |
| 1675 |
praat_addAction2 (classDissimilarity, 1, classConfiguration, 1, U"To Configuration (monotone mds)...", nullptr, 1, |
| 1676 |
CONVERT_ONE_AND_ONE_TO_ONE__Dissimilarity_Configuration_monotone_mds); |
| 1677 |
praat_addAction2 (classDissimilarity, 1, classConfiguration, 1, U"To Configuration (i-spline mds)...", nullptr, 1, |
| 1678 |
CONVERT_ONE_AND_ONE_TO_ONE__Dissimilarity_Configuration_ispline_mds); |
| 1679 |
praat_addAction2 (classDissimilarity, 1, classConfiguration, 1, U"To Configuration (interval mds)...", nullptr, 1, |
| 1680 |
CONVERT_ONE_AND_ONE_TO_ONE__Dissimilarity_Configuration_interval_mds); |
| 1681 |
praat_addAction2 (classDissimilarity, 1, classConfiguration, 1, U"To Configuration (ratio mds)...", nullptr, 1, |
| 1682 |
CONVERT_ONE_AND_ONE_TO_ONE__Dissimilarity_Configuration_ratio_mds); |
| 1683 |
praat_addAction2 (classDissimilarity, 1, classConfiguration, 1, U"To Configuration (absolute mds)...", nullptr, 1, |
| 1684 |
CONVERT_ONE_AND_ONE_TO_ONE__Dissimilarity_Configuration_absolute_mds); |
| 1685 |
praat_addAction2 (classDissimilarity, 1, classConfiguration, 1, U"To Configuration (kruskal)...", nullptr, 1, |
| 1686 |
CONVERT_ONE_AND_ONE_TO_ONE__Dissimilarity_Configuration_kruskal); |
| 1687 |
|
| 1688 |
praat_addAction2 (classDistance, 1, classConfiguration, 1, DRAW_BUTTON, nullptr, 0, nullptr); |
| 1689 |
praat_addAction2 (classDistance, 1, classConfiguration, 1, U"Draw scatter diagram...", nullptr, 0, |
| 1690 |
GRAPHICS_ONE_AND_ONE__Distance_Configuration_drawScatterDiagram); |
| 1691 |
praat_addAction2 (classDistance, 1, classConfiguration, 1, QUERY_BUTTON, nullptr, 0, nullptr); |
| 1692 |
praat_addAction2 (classDistance, 0, classConfiguration, 1, U"Get VAF...", nullptr, 0, |
| 1693 |
QUERY_ONE_AND_ONE_FOR_REAL__Distance_Configuration_vaf); |
| 1694 |
praat_addAction2 (classDistance, 1, classConfiguration, 1, ANALYSE_BUTTON, nullptr, 0, nullptr); |
| 1695 |
praat_addAction2 (classDistance, 0, classConfiguration, 1, U"To Configuration (indscal)...", nullptr, 1, |
| 1696 |
CONVERT_ONE_AND_ALL_TO_MULTIPLE__Distance_Configuration_indscal); |
| 1697 |
|
| 1698 |
praat_addAction2 (classDistance, 1, classDissimilarity, 1, U"Draw Shepard diagram...", nullptr, 0, |
| 1699 |
GRAPHICS_ONE_AND_ONE__Distance_Dissimilarity_drawShepardDiagram); |
| 1700 |
praat_addAction2 (classDissimilarity, 1, classDistance, 1, U"Monotone regression...", nullptr, 0, |
| 1701 |
CONVERT_ONE_AND_ONE_TO_ONE__Dissimilarity_Distance_monotoneRegression); |
| 1702 |
|
| 1703 |
/****** 3 classes ********************************************************/ |
| 1704 |
|
| 1705 |
praat_addAction3 (classDissimilarity, 0, classConfiguration, 1, classSalience, 1, QUERY_BUTTON, nullptr, 0, nullptr); |
| 1706 |
praat_addAction3 (classDissimilarity, 0, classConfiguration, 1, classSalience, 1, U"Get VAF...", nullptr, 1, |
| 1707 |
QUERY_ONE_AND_ONE_AND_ALL_FOR_REAL__Dissimilarity_Configuration_Salience_vaf); |
| 1708 |
|
| 1709 |
praat_addAction3 (classDissimilarity, 1, classConfiguration, 1, classWeight, 1, QUERY_BUTTON, nullptr, 0, nullptr); |
| 1710 |
praat_addAction3 (classDissimilarity, 1, classConfiguration, 1, classWeight, 1, U"Get stress (monotone mds)...", nullptr, 1, |
| 1711 |
QUERY_ONE_AND_ONE_AND_ONE_FOR_REAL__Dissimilarity_Configuration_Weight_monotone_stress); |
| 1712 |
praat_addAction3 (classDissimilarity, 1, classConfiguration, 1, classWeight, 1, U"Get stress (i-spline mds)...", nullptr, 1, |
| 1713 |
QUERY_ONE_AND_ONE_AND_ONE_FOR_REAL__Dissimilarity_Configuration_Weight_ispline_stress); |
| 1714 |
praat_addAction3 (classDissimilarity, 1, classConfiguration, 1, classWeight, 1, U"Get stress (interval mds)...", nullptr, 1, |
| 1715 |
QUERY_ONE_AND_ONE_AND_ONE_FOR_REAL__Dissimilarity_Configuration_Weight_interval_stress); |
| 1716 |
praat_addAction3 (classDissimilarity, 1, classConfiguration, 1, classWeight, 1, U"Get stress (ratio mds)...", nullptr, 1, |
| 1717 |
QUERY_ONE_AND_ONE_AND_ONE_FOR_REAL__Dissimilarity_Configuration_Weight_ratio_stress); |
| 1718 |
praat_addAction3 (classDissimilarity, 1, classConfiguration, 1, classWeight, 1, U"Get stress (absolute mds)...", nullptr, 1, |
| 1719 |
QUERY_ONE_AND_ONE_AND_ONE_FOR_REAL__Dissimilarity_Configuration_Weight_absolute_stress); |
| 1720 |
praat_addAction3 (classDissimilarity, 1, classConfiguration, 1, classWeight, 1, ANALYSE_BUTTON, nullptr, 0, nullptr); |
| 1721 |
praat_addAction3 (classDissimilarity, 1, classConfiguration, 1, classWeight, 1, U"To Configuration (monotone mds)...", nullptr, 1, |
| 1722 |
CONVERT_ONE_AND_ONE_AND_ONE_TO_ONE__Dissimilarity_Configuration_Weight_monotone_mds); |
| 1723 |
praat_addAction3 (classDissimilarity, 1, classConfiguration, 1, classWeight, 1, U"To Configuration (i-spline mds)...", nullptr, 1, |
| 1724 |
CONVERT_ONE_AND_ONE_AND_ONE_TO_ONE__Dissimilarity_Configuration_Weight_ispline_mds); |
| 1725 |
praat_addAction3 (classDissimilarity, 1, classConfiguration, 1, classWeight, 1, U"To Configuration (interval mds)...", nullptr, 1, |
| 1726 |
CONVERT_ONE_AND_ONE_AND_ONE_TO_ONE__Dissimilarity_Configuration_Weight_interval_mds); |
| 1727 |
praat_addAction3 (classDissimilarity, 1, classConfiguration, 1, classWeight, 1, U"To Configuration (ratio mds)...", nullptr, 1, |
| 1728 |
CONVERT_ONE_AND_ONE_AND_ONE_TO_ONE__Dissimilarity_Configuration_Weight_ratio_mds); |
| 1729 |
praat_addAction3 (classDissimilarity, 1, classConfiguration, 1, classWeight, 1, U"To Configuration (absolute mds)...", nullptr, 1, |
| 1730 |
CONVERT_ONE_AND_ONE_AND_ONE_TO_ONE__Dissimilarity_Configuration_Weight_absolute_mds); |
| 1731 |
|
| 1732 |
praat_addAction3 (classDistance, 0, classConfiguration, 1, classSalience, 1, QUERY_BUTTON, nullptr, 0, nullptr); |
| 1733 |
praat_addAction3 (classDistance, 0, classConfiguration, 1, classSalience, 1, U"Get VAF...", nullptr, 1, |
| 1734 |
QUERY_ONE_AND_ONE_AND_ALL_FOR_REAL__Distance_Configuration_Salience_vaf); |
| 1735 |
praat_addAction3 (classDistance, 0, classConfiguration, 1, classSalience, 1, U"Analyse", nullptr, 0, nullptr); |
| 1736 |
praat_addAction3 (classDistance, 0, classConfiguration, 1, classSalience, 1, U"To Configuration (indscal)...", nullptr, 0, |
| 1737 |
CONVERT_ONE_AND_ONE_AND_ALL_TO_MULTIPLE__Distance_Configuration_Salience_indscal); |
| 1738 |
} |
| 1739 |
|
| 1740 |
/* End of file praat_MDS_init.c 1520*/ |