The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here

Polynomial Logistic Regression weird convergence issue? Bug?

mafern76mafern76 Member Posts: 45 Contributor II
edited November 2018 in Help
Hi!

I'm wondering if anyone could share some insight into this problem. I'm trying to run an evolutionary search of parameters for the mentioned operator, but it won't converge.

I've been trying to find out why, but ran into some trouble pinning it down. Take the sonar data example proposed by the logistic regression operator:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<process version="5.3.015">
  <context>
    <input/>
    <output/>
    <macros/>
  </context>
  <operator activated="true" class="process" compatibility="5.3.015" expanded="true" name="Process">
    <process expanded="true">
      <operator activated="true" class="retrieve" compatibility="5.3.015" expanded="true" height="60" name="Sonar" width="90" x="380" y="120">
        <parameter key="repository_entry" value="//Samples/data/Sonar"/>
      </operator>
      <operator activated="true" class="split_validation" compatibility="5.3.015" expanded="true" height="112" name="Validation" width="90" x="514" y="120">
        <process expanded="true">
          <operator activated="true" class="logistic_regression" compatibility="5.3.015" expanded="true" height="94" name="Logistic Regression" width="90" x="112" y="30">
            <parameter key="kernel_type" value="polynomial"/>
            <parameter key="kernel_degree" value="12.0"/>
          </operator>
          <connect from_port="training" to_op="Logistic Regression" to_port="training set"/>
          <connect from_op="Logistic Regression" from_port="model" to_port="model"/>
          <portSpacing port="source_training" spacing="0"/>
          <portSpacing port="sink_model" spacing="0"/>
          <portSpacing port="sink_through 1" spacing="0"/>
        </process>
        <process expanded="true">
          <operator activated="true" class="apply_model" compatibility="5.3.015" expanded="true" height="76" name="Apply Model" width="90" x="45" y="30">
            <list key="application_parameters"/>
          </operator>
          <operator activated="true" class="performance" compatibility="5.3.015" expanded="true" height="76" name="Performance" width="90" x="179" y="30"/>
          <connect from_port="model" to_op="Apply Model" to_port="model"/>
          <connect from_port="test set" to_op="Apply Model" to_port="unlabelled data"/>
          <connect from_op="Apply Model" from_port="labelled data" to_op="Performance" to_port="labelled data"/>
          <connect from_op="Performance" from_port="performance" to_port="averagable 1"/>
          <portSpacing port="source_model" spacing="0"/>
          <portSpacing port="source_test set" spacing="0"/>
          <portSpacing port="source_through 1" spacing="0"/>
          <portSpacing port="sink_averagable 1" spacing="0"/>
          <portSpacing port="sink_averagable 2" spacing="0"/>
        </process>
      </operator>
      <connect from_op="Sonar" from_port="output" to_op="Validation" to_port="training"/>
      <connect from_op="Validation" from_port="model" to_port="result 1"/>
      <connect from_op="Validation" from_port="averagable 1" to_port="result 2"/>
      <portSpacing port="source_input 1" spacing="0"/>
      <portSpacing port="sink_result 1" spacing="90"/>
      <portSpacing port="sink_result 2" spacing="18"/>
      <portSpacing port="sink_result 3" spacing="0"/>
    </process>
  </operator>
</process>
1) I simply changed to polynomial and set degree at 12. This runs instantly on my PC, but when changing degree to 13, it won't converge not even past 5 minutes.
2) Then I changed max iterations to 1 and started going up. 291 max iterations runs fine, again, almost instantly. 292 max iterations, one minute going already... won't converge.

I'm not a doctor in machine learning algorithms but this looks like a bug to me  ;D...

Any ideas of how to cope with this while it gets fixed?

Thanks! I hope the bug report helps.

Answers

  • mafern76mafern76 Member Posts: 45 Contributor II
    PS. with same scenario I tried anova and epach with 1000000 degree and it runs instantly.
  • Marco_BoeckMarco_Boeck Administrator, Moderator, Employee-RapidMiner, Member, University Professor Posts: 1,996 RM Engineering
    Hi,

    this looks weird indeed. I have created an interal ticket for the issue. Thank you for reporting it!

    Regards,
    Marco
  • mafern76mafern76 Member Posts: 45 Contributor II
    Thanks Marco..

    An update on anova and epach, on a real-case scenario (1000/1000 cases, 17 predictors, evo search) anova also does get stuck immediately. Epach runs but seems to be the slowest, by far, of all the log. reg. kernel types.

    This anova runs slowly but at least it runs:
          <parameter key="LR_ANOVA_MOD.kernel_gamma" value="[0.00001;1]"/>
         <parameter key="LR_ANOVA_MOD.kernel_degree" value="[1;2]"/>
         <parameter key="LR_ANOVA_MOD.C" value="[0;10]"/>
         <parameter key="LR_ANOVA_MOD.convergence_epsilon" value="[0.1;0.5]"/>
    RM gets a little bit unresponsive though. Maybe something overloads something else, somewhere, somehow?.. some combinations of parameters seem to be growing the problem exponentially, sometimes to a point of no return.

  • mafern76mafern76 Member Posts: 45 Contributor II
    Maybe this short run log can help: as you can see on a plot, time between validations varies a lot.

    Oh and by the way, I think this is the first time I've seen this... C takes values beyond the '10' limit, maybe it's related, or maybe just another bug, I don't know.
    time	memo	c	gamma	degree	conv_epsilon	perfo	perfo_dev
    38150.0 1.309247264E9 5.708774309130852 0.4815469360780778 1.6894985156297109 0.19529838321505755 0.6884993281209857 0.009104510275475342
    40917.0 9.19223E8 0.34267737363115836 0.5404634943325216 1.1315150563914869 0.3353537248701405 0.7190726762798834 0.014539775408387932
    41967.0 9.52729576E8 4.045221107690375 0.5418650318132358 1.15506380864328 0.34045601477565923 0.7129182553289294 0.007991655337273243
    45275.0 1.003653544E9 5.582406057073806 0.7529332875079319 1.5722415400323753 0.3292090558828451 0.6910714863323157 0.02577555337930816
    48630.0 1.061641624E9 1.9208786040692127 0.09031466602051914 1.3506065039940034 0.21694383601777456 0.7229121687906822 0.01876950586447982
    49876.0 1.107410392E9 7.064506657257637 0.1708202860122061 1.7701408475473643 0.3574992319873054 0.7139310553653035 0.01432962989892049
    51702.0 1.149064168E9 9.283586508053055 0.6414603799727803 1.12793541677748 0.18930458951378593 0.7143786177070958 0.008817034286516803
    70348.0 1.135039096E9 3.932816792972239 0.6092641243325083 1.1693069734344674 0.4941098025556281 0.7049589509669353 0.008141281022841543
    74978.0 1.23385896E9 2.426932483403231 0.31428682470647146 1.0870086081876171 0.20659435998579867 0.7204462063977267 0.016030465001562005
    79201.0 1.30768132E9 6.418460635092642 0.5810773923204395 1.166485633857378 0.23746993715202766 0.7101477140228466 0.013473914170796316
    85176.0 1.393157744E9 1.184470914832041 0.10107715281597253 1.7012496415722138 0.3995335283412699 0.7202398762791491 0.00782635395314254
    89301.0 1.455334712E9 5.684078892397887 0.37615507533058334 1.6599569309530264 0.32343447313523055 0.7045865298504168 0.00758473619116184
    96185.0 1.28324144E9 7.319507607384569 0.7315126605027208 1.0153267269058426 0.33660279363918477 0.7067246527605087 0.012074547614553706
    97045.0 1.312284944E9 9.51802920569946 0.8976145120135676 1.1733254479345103 0.37414430487644434 0.7013951787827462 0.022094308373348394
    102833.0 1.388376928E9 1.7050302288006303 0.23896274248266555 1.8167816553198142 0.20543990440885818 0.714600868873405 0.002085741291580042
    111538.0 1.54661712E9 2.2130802871495914 0.7118060096652402 1.6840588243765502 0.46875187981425115 0.6950412227335856 0.009255470275353304
    111868.0 1.568900064E9 4.894496901187777 0.3495421779824898 1.1738950460972846 0.26848741803479537 0.7191990726588201 0.022097908298988347
    121557.0 1.67546256E9 5.3924435300248375 0.2425121107196942 1.197427457321235 0.3500783570894842 0.7130529587327702 0.009580636347955454
    140489.0 1.556543688E9 7.461114328990838 0.8596664754043832 1.392347134012234 0.18152722239373673 0.6806821611851192 0.028670948315808756
    142974.0 1.597683736E9 5.218303991020648 0.8676367182533121 1.972198391057401 0.4303996662608066 0.6721368425662538 0.004328388452869105
    147476.0 1.651625624E9 8.036174047387362 0.9129158386603619 1.4308164824476644 0.30448794779088084 0.6984339989051289 0.013353620591657922
    147730.0 1.675805136E9 8.921163654249808 0.9656971378021245 1.8116543957805584 0.22724217242201505 0.6636951907581815 0.020795025400285255
    147758.0 1.679714752E9 9.668164313424306 0.3773293925592099 1.0151665689728122 0.3714132799212917 0.7190176321148612 0.024169711971744317
    160139.0 1.629361432E9 7.832584209011712 0.7386643629359521 1.886457924309644 0.3850843762594095 0.6734634285433588 0.010917629983447787
    166021.0 1.731287144E9 1.3811333366368361 0.014007220797994803 1.4872379652635046 0.44468594015751073 0.7167327007646368 0.007954168872637885
    174154.0 1.826358744E9 3.2951994655398753 0.5892307812642472 1.54209476170346 0.29614317152020597 0.6981369710146392 0.03402833291333147
    182754.0 1.923968776E9 6.903396779102156 0.1643050001335695 1.8253275495392594 0.41991146152179804 0.6957799584483154 0.01324647924891981
    192011.0 2.02175304E9 7.311182151072626 0.6484917870505055 1.1541328026339568 0.3515970330945857 0.711583038325949 0.016786058311814317
    196315.0 1.591508056E9 1.18108729949584 0.401175735131441 1.891891649708826 0.18575965653193607 0.699700802203005 0.02084890869398228
    196327.0 1.592594256E9 3.8873688436245812 0.8853132770513075 1.7738159372028142 0.4154256114342184 0.682629195522328 0.013266562618951443
    197200.0 1.634690568E9 3.5164899139662618 0.8819520570878033 1.0081140406912281 0.46798518275473466 0.7144341883736968 0.01000728449201773
    213771.0 1.80994304E9 4.177110368223158 0.5532590696011848 1.3044098818263632 0.1903004517464491 0.709618363935855 0.008605632623559534
    218831.0 1.888284272E9 3.545512855013082 0.8109125560396426 1.5096071651664982 0.49208668204810924 0.7036219519586117 0.009395901057234667
    222934.0 1.943067952E9 1.5400919631098553 0.2829893108688261 1.8875484294834917 0.2246321064521577 0.7157171107198983 0.010734655249126607
    222962.0 1.961852728E9 3.658174234786946 0.8737568241623955 1.4285382028387767 0.4223618805806696 0.6910746588418273 0.015851581204424193
    242794.0 1.758368112E9 7.476376476754874 0.337850738548379 1.4296781364482793 0.24719650227858173 0.713201364677691 0.010038205948386988
    245000.0 1.800679232E9 9.370017165607399 0.11375141470351133 1.646407291192437 0.4494709457695123 0.7109480999224035 0.005585327238154533
    246665.0 1.840574264E9 5.095671196349531 0.8573374248604849 1.4014226073723013 0.16390018697373193 0.7014954930834879 0.010124099344752686
    251227.0 1.918151568E9 2.7362735765907873 0.9864136855888085 1.934624960686064 0.13676471633425225 0.6701002264604788 0.014749887013671336
    254185.0 1.96666384E9 5582.406057073806 0.7529332875079319 1.5722415400323753 0.061572037573640145 0.5523663599943472 0.04334687764130416
    254907.0 1.971291784E9 9.96497724600189 0.05612611640414672 1.0834359529437907 0.3775511447043972 0.7187511593159757 0.011292863665187895
    257626.0 2.024475656E9 5.230740186565407 0.5348256101060016 1.3608517832054585 0.14222789839826291 0.7042947219755767 0.019037808131940778
    265508.0 1.778088664E9 342.67737363115833 0.5404634943325216 2.1836355075233818 0.05925004690535977 0.6731124994912739 0.015270509095333508
    266428.0 1.847025616E9 1.9265000113381991 0.7109030215407427 1.0100736032378945 0.4178060916873182 0.7202839044111452 0.029770194768506685
    274282.0 2.09867532E9 4.83593477775484 0.15092976629608099 1.8166258931440056 0.17387178321961516 0.6932631864030326 0.022483365626161846
    281249.0 1.881700808E9 2.7690743136618345 0.16093375506486185 1.4936335124425941 0.39142865498441304 0.7187737538837147 0.01994430863967215
    286713.0 1.962305704E9 7.457223263431855 0.5079668568466053 1.6215603768818934 0.36228152645183365 0.6958150540535323 0.010488156784317809
    287292.0 1.988633528E9 5.16197868314025 0.615553759000578 1.7563421938726185 0.4619437095933707 0.6964531514665481 0.009603617573282753
    292080.0 2.079647512E9 1.527550010761295 0.740697166353972 1.7572680848516566 0.15145212913517972 0.6993034375117052 0.0035446504861621287
    293727.0 2.115503704E9 4045.2211076903745 0.5418650318132358 1.15506380864328 0.06410260332452332 0.6545033417010183 0.014878341928942334
    294563.0 2.125494024E9 0.25163305858933893 0.46481190839252046 1.4824922550707125 0.23535841301416696 0.7146254884472142 0.014922544564620558
    295929.0 2.155508528E9 342.67737363115833 0.5404634943325216 2.1836355075233818 0.05884254737441337 0.6791311415351625 0.023479206163966097
    303978.0 2.19254576E9 2.4624364654236097 0.8174025041672938 1.1502518288632528 0.48315178280150217 0.7202227582278297 0.013892972909008264
    309788.0 2.273454056E9 2.8176101971941323 0.4575477587989642 1.2706111274897673 0.48756478978463835 0.7160086260938613 0.00948390904823626
    312984.0 2.332199376E9 0.7456447992776349 0.2293319245498495 1.946072463049354 0.24808400140905118 0.7108681841828165 0.025138593987299195
    314633.0 2.395150192E9 0.6975301272663237 0.7233412664505098 1.7690119167781742 0.48888819197647293 0.6970509782588327 0.013302220806821701
    321418.0 1.827417896E9 1.3983933694768902 0.9852447269108896 1.373261970300323 0.4809482219053224 0.7072075042080977 0.005279657152730951
    336154.0 2.044452152E9 1.6129221361116786 0.3733492486128845 1.8146662978471406 0.47948339737603096 0.7104653564751388 0.014990730704236172
    337283.0 2.090273456E9 3.946487058427236 0.6455145037568712 1.2360364909893051 0.27331149599557736 0.7065493502349519 0.006916545802158054
    339001.0 2.142573664E9 9.807825867576703 0.4997269304832418 1.536639681141258 0.3935068022132546 0.6876287645110363 0.014920285261340066
    344528.0 2.226778E9 9.60266936279813 0.20148109582311394 1.7203381737135124 0.14434597509853841 0.7045443422239384 0.0169090032230886
    346156.0 1.992182984E9 4.310307142340647 0.6257558266468753 1.3574495400132478 0.25438387637753546 0.7089349288869169 0.011772806447186777
    352430.0 2.081428968E9 9.69625966309308 0.7915715293919935 1.358117345181303 0.3021715550538516 0.7016607875790409 0.008716466946462657
    359601.0 2.18156456E9 4.255873469053726 0.27917314862340803 1.4578043872410233 0.13596251569944112 0.7103817867245961 0.015357019219903305
    372723.0 2.329972688E9 3.342269526738566 0.6111750065451231 1.932711633643239 0.16320727300878582 0.67952208470721 0.006370336454091284
    375630.0 2.380136264E9 5.060490374759166 0.6215650630212081 1.0890105231170775 0.26643459744916653 0.7130898633434105 0.01218393543170073
    377058.0 2.41718904E9 3932.816792972239 0.6092641243325083 1.1693069734344674 0.09867470557501631 0.6311985503332541 0.021493439832313017
    377444.0 2.420830984E9 5.806818160478787 0.3269896604403513 1.68833845239295 0.24734524342181696 0.6976872621664119 0.022277061865239346
    377621.0 2.441865968E9 8.448598169269488 0.6942477736664299 1.1916407096283863 0.49570193313348765 0.7070117491212239 0.008491218325435996
    380378.0 1.907507864E9 3.232567307771034 0.7793842254229078 1.3387108418061757 0.35914051611781495 0.7051949856745671 0.029186244773557173
    383273.0 1.970011016E9 9283.586508053055 0.6414603799727803 1.12793541677748 0.030093532640601835 0.6266777737799661 0.014159019286139609
    394748.0 2.120197112E9 0.853428675890886 0.8572837137136211 1.5526826985039632 0.37040406162056605 0.7140870483329705 0.006018408064076753
    399823.0 2.211202728E9 4.702935257088988 0.033372759131132336 1.3559126078812815 0.40114883458940465 0.7200895893285889 0.004671481426103248
    400482.0 2.244187424E9 1.9761313419574766 0.8753151656860709 1.2154329768114471 0.46650318120424183 0.7078005339860008 0.00965804485999117
    405247.0 2.314990136E9 4.525897385053258 0.2920216280669617 1.3938915071558535 0.10948404733341253 0.7163982372619152 0.021111461642853064
    407655.0 1.751322328E9 2.9885031280753727 0.9222511938563279 1.399712533233474 0.11505680794167202 0.6940845738655526 0.016935980315308633
    408323.0 1.785733376E9 7.305526860895975 0.10801087601452745 1.4216741120994143 0.3653346844884414 0.709359649160228 8.50804943391694E-4
    421725.0 1.962826904E9 1.6925395384622555 0.6191798890940724 1.752683967602758 0.14889512826712054 0.7053755802159897 0.013890994892359291
    424102.0 2.009328584E9 2.4298339806564098 0.054526993042224574 1.150696370233863 0.2055976683669084 0.7161843066205512 0.021511316220814102
    431448.0 2.12271244E9 2.154536749894007 0.6218888672607388 1.7901065041555844 0.37366174019807596 0.6959460719463237 0.01296096699843944
    432555.0 2.153152856E9 8.306765401809443 0.15656175706506584 1.5279887396150287 0.12678361032661534 0.7070825973336267 0.016547043259155958
    433040.0 2.179154112E9 2.122159379548041 0.33486812109180686 1.9477707349916136 0.49175469610703126 0.7053852822450759 0.013165051552203808
    440100.0 1.719810032E9 2.079286696675662 0.51528437943111 1.0247871499486831 0.282445124913424 0.7170362401746481 0.013079403901668429
    449624.0 1.846824488E9 1.8160058667085255 0.8698515235624599 1.813832074007067 0.3626159732126578 0.6840760218599137 0.010435526027455847
    451930.0 1.918044296E9 3.4882058150737736 0.8573183928123029 1.3694413401986822 0.35258212547938783 0.7164367843774798 0.015309577016638485
    459395.0 2.02357656E9 9.60598813376839 0.4973381957023859 1.3518319616137893 0.4429055177995379 0.702068556301532 0.014646038577217628
    462531.0 2.084370848E9 2.8854163010372647 0.5273533950063987 1.8427074452916645 0.2301383074325628 0.6981063934229672 0.0073419498452870135
    466206.0 1.714297144E9 5.63834541739579 0.6309152332214293 1.7915423209918009 0.3945169540043306 0.6854168953798525 0.019689276388678248
    471500.0 1.783692008E9 7.120682134134916 0.821495110611903 1.7534965088018686 0.2481733332983611 0.685361716214425 0.02028648328812727
    472914.0 1.823612632E9 5.095323566083916 0.5434382920277592 1.582081107697701 0.2291941519902801 0.6998818062456552 0.00155788059716332
    480099.0 1.946979416E9 0.9560949987965539 0.8603724930474578 1.1554803867046588 0.14032972839457747 0.7137559463403275 0.005583892630795802
    485044.0 2.01049736E9 9.432034292532897 0.5000397934984788 1.7533728914650821 0.2700997659130243 0.6996255934775292 0.017244720425215472
    486811.0 2.0540178E9 1.1789338668326055 0.02406665784648783 1.4349831423814168 0.162011900096125 0.7137534083327184 0.01190104568148355
    495694.0 1.806886328E9 5.679768000398402 0.7662843674178953 1.3876986614125828 0.3083786697353899 0.6973619831912256 0.0056699628579325225
  • Marco_BoeckMarco_Boeck Administrator, Moderator, Employee-RapidMiner, Member, University Professor Posts: 1,996 RM Engineering
    Hi,

    I forgot to mention this, but this has been fixed in RM Studio 6.0.005 :)

    Regards,
    Marco
Sign In or Register to comment.