Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
Python is a programming language commonly used for machine learning. Use this tag for any *on-topic* question that (a) involves `Python` either as a critical part of the question or expected answer, & (b) is not *just* about how to use `Python`.
1
vote
Accepted
Measuring R-Squared by category
You could separate both the data and regression results by category, then for each category calculate R-squared (R2) as "R2 = 1.0 - (residual_error_variance / dependent_data_variance)". Using numpy's …
0
votes
(How) Can I fit a dataset with some parameters fit globally?
One approach is to construct the fitting function like so:
if (data in dataset 1):
bottom+(top-bottom)/(1+10**((logIC50_1-x)*HillSlope_1)) # "_1"
elif (data in dataset 2):
bottom+(top-bottom) …
2
votes
Multi-variable nonlinear scipy curve_fit
Here is a 3D surface fitter using your equation and my test data that makes a 3D scatter plot, a 3D surface plot, and a contour plot. You should be able to click-drag the 3D plots with the mouse and r …
0
votes
Modify fit or function to match certain values
Looking at the scatterplot, the data seemed to me as if it were similar to a sine wave plus a straight line. I fitted the data to several trigonometric functions of this type, and found that a hyperbo …
1
vote
Accepted
Keep eliminating data points until good correlation coefficient is obtained-using Python
This should be similar to what you are looking for:
import numpy, scipy, matplotlib
import matplotlib.pyplot as plt
from scipy.optimize import curve_fit
import scipy.stats
import copy
xyDataPairs = …
1
vote
Best estimation of a fitting parameter to measured data
Per the comments, here is an example Python surface fitter using
non-linear curve fitting with 3D scatter plot, 3D surface plot,
and contour plot. …
2
votes
Accepted
regression algorithms for asymmetric losses
here is example Python code that uses an asymmetric loss in the fitting (only) similar to what you describe. …
1
vote
How should I go about doing regression with a series of exponents involved?
Here is example code that I think should what you describe, using the equation "Z = (a1 * X1^n1) + (a2 * X2^n2)". This code uses the "brick wall" technique to keep the parameters n1 and n2 within boun …
4
votes
Accepted
How to know if a parameter is statistically significant in a “curve_fit” estimation?
Here is example code adapted from my zunzun.com curve fitting web site. Note that your original data gives very small or zero p-values.
from scipy.optimize import curve_fit
import numpy as np
import …
0
votes
Accepted
What statistical technique could be used to extrapolate CO2 data
The NOAA site has the Moana Loa observatory atmospheric CO2 data directly downloadable as text at ftp://aftp.cmdl.noaa.gov/products/trends/co2/co2_mm_mlo.txt - no scraping needed. After removing a few …
0
votes
Maximum Likelihood Estimation of a dataset
I got what looks like a good fit of the data in the .csv file to scipy's right-sided Gumbel distribution:
with the following info:
Right Sided Gumbel distribution
http://docs.scipy.org/doc/scipy/ …
0
votes
Dealing with outlier data causing a non-linearity for logistic regression model
This is my comparison of a third order polynomial and a different equation from an equation search, placed here as I cannot display images in the comments. The third order polynomial does not visually …
1
vote
Coffee ratings: How to do causal inference with high kurtosis/outliers?
If you examine this 3D scatter plot and 3D surface plot, you can see that the data is concentrated in one 3-space region on the left side of the images. From the "Y = a + (b * X1) + (c * X2)" linear …