Jump to content

Modify via a script the Min, Max parameters in Logistic Regression Fitting model


Jean-Francois LE ROCH

Recommended Posts

Hello,

I'm currently doing a Logistic regression via a script and save the results Min, Max, Hill, LoggedX50 in a table

The script is working fine but i would like to manualy set the Min to 0 ,Max to 1 and also togglethe "Assume that X is Log10 transformed" ON

I tried using FixedMin, HasFixedMin ... etc without any success ; herebelow a piece of the script :

#Add a vis parameter referencing an existing Scatter Plot visualization

vis = vis.As[scatterPlot]()

#Clear all Lines & Curves for a visualization

vis.FittingModels.Clear()

#Loop through all the Lines & Curves collection

for fm in vis.FittingModels:

#To remove a specific line or curve

if fm.Line.DisplayName == 'Avg(10)':

vis.FittingModels.Remove(fm)

formatter = DataType.Real.CreateLocalizedFormatter()

formatter.Category = NumberFormatCategory.Scientific

formatter.DecimalDigits = 5

#font = Font("Calibri", 12, FontStyle.Bold)

#Adding Add Logistic Regression Curve

Logreg_line=vis.FittingModels.AddNew(LogisticRegressionFittingModel)

Logreg_line.ManualUpdate=True

Logreg_line.FixedMin = 0

Logreg_line.FixedMax = 1

Logreg_line.Fit

Logreg_line.Update

#Loop through all the Lines & Curves collection

for fm in vis.FittingModels:

fm.FixedMin=0

 

Thanks for your help

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...