正态分布向偏正态分布的转换

时间:2020-10-12 15:27:36

标签: transformation normal-distribution skew

我有一组数据数组,它们几乎像正态分布。但是我必须将数据转换为偏正态分布。在互联网上搜索后,我发现任何凹或凸双射变换都会使正态分布向左或向右倾斜。 我正在寻找有关上述想法的任何论文,论文或python代码,但我找不到。 任何对此事的建议将不胜感激!

谢谢!

1 个答案:

答案 0 :(得分:1)

有一个名为places_result = gmaps.places(query=query, location=(latitude1, longitude1), radius=32186.9) def get_field_value(result, field): try: for f in field.split('/'): result = result[f] return result except KeyError: return 'na' col_field = [ ('name', 'name'), ('rating', 'rating') ('address', 'formatted_address') ('website', 'website') ('phone', 'formatted_phone_number') ('status', 'business_status') ('hours', 'opening_hours') ('lat', 'geometry/location/lat') ('lng', 'geometry/location/lng') ] fields = [e[1] for e in col_field] for place in places_result['results']: place_details_result = gmaps.place(place_id=place['place_id'], fields=fields)['result'] df1 = { column: [get_field_value(place_details_result, field)] for column, field in col_field } 的scipy实用程序,可以产生偏态正态分布。如果需要,您可以在github上查找源代码。

External link to scipy.stats.skewnorm docs