Method for making and optimizing an integrated pointing model of an alt-azimuth telescope
By combining the basic parameter model and the spherical harmonic function model, and using multinomial regression and machine learning techniques, a comprehensive pointing model was constructed. This solved the problem of insufficient pointing accuracy of altazimuth telescopes, met the needs of high-precision astronomical observation, and improved the telescope's observation accuracy and applicability.
Patent Information
- Application Number
- CN202411200346.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-29
- Publication Date
- 2026-11-27
- Estimated Expiration
- 2044-08-29
AI Technical Summary
In existing technologies, the pointing accuracy correction methods for altazimuth telescopes cannot fully consider all influencing factors, and the basic parameter model has limited correction capabilities. While the spherical harmonic function model is accurate in handling higher-order error terms, it lacks physical meaning.
By combining the basic parameter model and the spherical harmonic function model, a comprehensive pointing model is constructed using multinomial regression and machine learning methods. The telescope pointing deviation is corrected using the error correction model and the multinomial regression model, and the parameters are dynamically adjusted to adapt to different observation conditions and equipment status.
It significantly improves the observation accuracy of altazimuth telescopes, meeting the needs of high-precision astronomical observation. The pointing deviation is further optimized through a polynomial regression model, improving pointing accuracy and applicability.
Smart Images

Figure CN119089307B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of astronomical observation equipment, and in particular to a method for optimizing and correcting the pointing model of an altazimuth telescope. This method is applied to astronomical telescopes, pointing and positioning turntables, and related fields to improve the pointing accuracy of altazimuth telescopes. Background Technology
[0002] With the advancement of science and technology, astronomical observation techniques have developed rapidly. The observation capabilities of modern astronomical telescopes are constantly improving, and the requirements for the accuracy of observational data are becoming increasingly stringent. To meet the demands of high-precision observation, the pointing accuracy of telescopes must be strictly controlled and corrected. Due to their relatively simple construction and ease of operation, altazimuth telescopes have become the primary equipment for astronomical observation. Their pointing accuracy is a key indicator for measuring the accuracy of the telescope's observation of the target position. Currently, methods exist for correcting pointing errors using fundamental parameter models and spherical harmonic function models, respectively. These two pointing models each have their own advantages and disadvantages. The fundamental parameter model has limited correction capabilities, making it difficult to comprehensively consider all influencing factors; it can only fit error terms with clear physical meaning generated by the telescope. In contrast, the spherical harmonic function model performs exceptionally well in handling higher-order error terms, accurately fitting complex errors. Summary of the Invention
[0003] To address the aforementioned problems in the existing technology, this invention provides a method for fabricating and optimizing a comprehensive pointing model for a horizontal telescope.
[0004] To achieve the above objectives, the present invention provides the following technical solution:
[0005] The method for fabricating and optimizing a comprehensive pointing model for an altazimuth telescope includes the following steps:
[0006] Step 1: Use the basic parameter terms of the basic parameter model and the spherical harmonic terms of the spherical harmonic function model to form an error correction model;
[0007] Step 2: Create a multinomial regression model using multinomial regression and machine learning methods;
[0008] Step 3: Use a comprehensive pointing model consisting of an error correction model and a multinomial regression model to correct the telescope pointing deviation.
[0009] Furthermore, before step 1, there are also data acquisition and preprocessing steps, as well as error analysis and screening steps;
[0010] The data acquisition and preprocessing steps include: inputting pointing commands to the telescope according to predetermined azimuth and elevation intervals, at which time the azimuth and elevation angles of the telescope are saved as actual values; taking multiple sets of star images, and obtaining the right ascension and declination corresponding to the centers of the multiple sets of star images by comparing them with standard star images; converting the right ascension and declination into azimuth and elevation angles in the horizontal coordinate system based on the recorded data in the star images, i.e., the theoretical values of azimuth and elevation angles; and calculating the deviation between the actual values and the theoretical values.
[0011] The error analysis and screening steps include: analyzing the deviation data obtained from the data acquisition and preprocessing steps, and screening out error points that exceed a set threshold.
[0012] Furthermore, in step 1, the basic parameter model is established based on physical factors, the model is stable and each parameter has a clear physical meaning; a spherical harmonic function model is used to handle higher-order error terms; the combined error correction model is used to dynamically adjust parameters based on real-time observation data to adapt to different observation conditions and equipment status.
[0013] Furthermore, in step 1, the azimuth pointing error ΔA and the elevation pointing error ΔH are expressed as follows:
[0014]
[0015] ΔH=IE-AN·cosA+AW·sinA-TX·tan(90°-Z)
[0016] +e0+e1·sinA+e2·cosA+e3·sinH+e4·cosH
[0017] +e5·cosA·sinH+e6·cosA·sin 2 H+e7·cos 3 A
[0018] Where A, H, and Z represent the actual azimuth, elevation, and zenith distance of the telescope, respectively; IA, IE, NPAE, CA, AN, AW, and TX are coefficients of the basic parameters; IA is the zero-point error of the azimuth angle; IE is the zero-point error of the elevation angle; NPAE indicates the non-orthogonality between the azimuth and elevation axes; CA indicates the non-orthogonality between the telescope tube axis and the elevation axis; AN indicates the north-south tilt of the azimuth axis; AW indicates the east-west tilt of the azimuth axis; and TX indicates the tube deflection; q0, q1, ..., q 12 Here are the coefficients of the azimuth spherical harmonics term, and e0, e1, ..., e7 are the coefficients of the elevation spherical harmonics function. After fitting the coefficients based on the actual error, the telescope control system calculates the possible errors for each set of observations based on this model and then automatically corrects them.
[0019] Furthermore, after determining the form of the error correction model in step 1, the coefficients of each term are solved. Using the actual error and the actual azimuth and elevation angles, the coefficients of each term are obtained by fitting using the least squares method, thus obtaining the error correction model. By adjusting the coefficients of the error correction model, the sum of squares of the differences between the model's predicted values and the actual values is minimized.
[0020] Furthermore, in step 2, a multinomial regression model with automatically determined order is used to fit the residual error. After each fitting, the mean squared error (RMSE) and R² are calculated. 2 Both are used as scores for judgment, the model with the highest score is saved, and the theoretical residual error is calculated based on this model.
[0021] Furthermore, the specific steps for automatically determining the order are as follows:
[0022] Step 2-1: Import necessary libraries: (1) Import the NumPy library for numerical computation; (2) Import PolynomialFeatures, StandardScaler, LinearRegression, train_test_split, mean_squared_error, and r2_score from the sklearn library for multinomial regression, data standardization, linear regression, data splitting, mean squared error calculation, and R... 2 Calculation; (3) Import the joblib library to save and load the model;
[0023] Step 2-2: Data preprocessing and segmentation: (1) Create a function polynomial_regression, which accepts a feature matrix X composed of the actual azimuth angle sj_AZ and the corresponding actual pitch angle sj_ALT, and the residual error_ALT that still exists after the error correction model fitting as the target variable y, and sets the maximum polynomial degree max_degree; (2) Use StandardScaler to standardize the training set and the test set to scale the data to the same range; (3) Use the train_test_split function to split the dataset into a training set and a test set;
[0024] Steps 2-3: Multinomial regression model training and optimization: (1) Initialize the best score, best number of iterations, best model, and best R-value. 2 (2) Use joblib to save the best polynomial regression model, standardizer and polynomial features to a local file for easy loading and use later;
[0025] Steps 2-4: Call the model to predict the residuals: (1) Use joblib to load the saved model, normalizer and multinomial feature transformation instance; (2) Standardize the new data and perform multinomial feature transformation; (3) Use the loaded model to make predictions and return the prediction results.
[0026] Furthermore, in steps 2-3, for each polynomial degree degree from 1 to max_degree, the following operations are performed sequentially:
[0027] Step 2-3-1: Perform polynomial feature transformation using PolynomialFeatures;
[0028] Step 2-3-2: Use LinearRegression to perform linear regression fitting;
[0029] Step 2-3-3: Calculate the mean squared error and R on the test set. 2 Fraction;
[0030] Steps 2-3-4: If the current mean squared error is less than the best score, then update the best score, best number of attempts, best model, and best R-squared value. 2 Fractions, and their corresponding polynomial characteristics.
[0031] Furthermore, step 3 includes an overall evaluation and correction step. By calculating the residual between the fitting result and the actual error, a comparison chart of the actual error and the fitting result is drawn to visually demonstrate the fitting effect of the model. By evaluating the goodness of fit, the accuracy and reliability of the model are comprehensively judged.
[0032] Compared with the prior art, the beneficial effects of the present invention are:
[0033] This invention provides an optimization method. First, an error correction model is constructed using basic parameter terms and spherical harmonic terms. Then, a multinomial regression model is created using multinomial regression and machine learning techniques. Finally, a comprehensive pointing model composed of the error correction model and the multinomial regression model is used to correct the telescope's pointing deviation. Verification shows that the method of this invention can significantly improve the observation accuracy of altazimuth telescopes, meeting the needs of high-precision astronomical observation. Attached Figure Description
[0034] Figure 1 This is a flowchart of the method of the present invention;
[0035] Figure 2 This is a flowchart of the method in Step 1 of the embodiment;
[0036] Figure 3 This is a flowchart of the method for automatically determining the order in the training of a multinomial regression model;
[0037] Figure 4 This is a comparison chart of the actual error and the fitting results of AZ;
[0038] Figure 5 This is a comparison chart of the actual error of ALT and the fitting results. Detailed Implementation
[0039] The present invention will now be described in further detail with reference to the accompanying drawings.
[0040] like Figure 1 As shown, this invention achieves the fabrication and optimization of a horizontal telescope pointing model through the following steps:
[0041] Step 1. Data Acquisition and Preprocessing (e.g.) Figure 2 (As shown)
[0042] First, pointing commands were input to the telescope at approximately 30° intervals for azimuth and 10° intervals for elevation. The azimuth and elevation angles at this point were saved as actual values. A total of 76 sets of star charts were captured. By comparing these with standard star charts, the right ascension and declination corresponding to the centers of the 76 images were obtained. Then, based on the captured time, the geographical latitude and longitude of the observation site, altitude, air pressure, and temperature recorded in the images, the right ascension and declination were converted into azimuth and elevation angles in a horizontal coordinate system, i.e., the theoretical azimuth and elevation angles. The deviation between the actual and theoretical values was calculated and saved in a spreadsheet for subsequent calculations and analysis.
[0043] Step 2. Error Analysis and Screening
[0044] The calculated deviation data is analyzed to identify error points that exceed a set threshold. Setting a reasonable error threshold helps identify observation data points with significant errors, which may be caused by mechanical errors, environmental influences, etc. Further analysis of these errors can improve the accuracy of the model.
[0045] Step 3. Constructing the error correction model
[0046] The error correction model uses the actual azimuth and elevation angles to predict errors, pre-correcting the telescope's pointing. Through analysis of the telescope structure and major error sources, the forms of the basic parameter terms and spherical harmonic terms are obtained. Let A, H, and Z represent the actual azimuth, elevation, and zenith distance of the telescope, respectively. Then, the azimuth pointing error ΔA and the elevation pointing error ΔH can be expressed as:
[0047]
[0048] ΔH=IE-AN·cosA+AW·sinA-TX·tan(90°-Z)
[0049] +e0+e1·sinA+e2·cosA+e3·sinH+e4·cosH
[0050] +e5·cosA·sinH+e6·cosA·sin 2 H+e7·cos 3 A
[0051] Where IA, IE, NPAE, CA, AN, AW, and TX are the coefficients of the basic parameters. IA is the zero-point error of the azimuth angle, IE is the zero-point error of the elevation angle, NPAE indicates the non-orthogonality between the azimuth and elevation axes, CA indicates the non-orthogonality between the telescope tube axis and the elevation axis, AN indicates the north-south tilt of the azimuth axis, AW indicates the east-west tilt of the azimuth axis, and TX indicates the telescope tube deflection. q0, q1, ..., q 12 Here, e0, e1, ..., e7 are the coefficients of the spherical harmonic function for azimuth, and e0, e1, ..., e7 are the coefficients of the spherical harmonic function for elevation. After fitting the coefficients based on the actual error, the telescope control system can calculate the possible errors for each set of observations and automatically correct them.
[0052] In Python, this can be constructed as a matrix for operations. Assuming there are m sets of data and n coefficients, an m*n matrix can be constructed. Taking the first row of the azimuth AZ error correction matrix as an example: A[0] and H[0] represent the values substituted from the first set of observations, a... (1 ,1),...a (1,5) This is the basic parameter item of the first set of observation data, a (1 ,6),...a (1,18) It is the spherical harmonic term of the first set of observations, where a (1,j) This indicates that the element is located in the 1st row and jth column of the matrix, for example, a. (1,1) This represents the element in the first row and first column of the matrix.
[0053]
[0054] a (1,4) =-AN·sin(A[0])·tan(H[0]); a (1,5) =-AW·cos(A[0])·tan(H[0]);
[0055]
[0056] By analogy, we can obtain the basic parameter terms and spherical harmonic terms of the observation data from group 2 to group 76. There are a total of 18 coefficients for the basic parameter terms and spherical harmonic terms, which are arranged into a 76*18 matrix.
[0057]
[0058] Each row of the matrix corresponds to an error correction formula for a set of observation data. Summing the first row yields ΔA = a. (1,1) +a (1,2) +...+a (1,18) This allows us to predict the possible azimuth pointing deviation in the first set of observation data.
[0059] This invention combines a fundamental parameter model with a spherical harmonic function model. The fundamental parameter model is established based on physical factors such as equipment shaft system errors and encoder errors. The model is stable, and each parameter has a clear physical meaning. However, this model often has limited correction accuracy and cannot comprehensively consider all factors affecting pointing accuracy. Therefore, a spherical harmonic function model is used to handle higher-order error terms. While ensuring the clear physical meaning of the model, the flexibility of the spherical harmonic function can be used to more accurately fit complex errors. This combined approach allows for dynamic adjustment of parameters based on real-time observation data, adapting to different observation conditions and equipment states, and has wide applicability.
[0060] Step 4. Error Correction Model Coefficient Fitting
[0061] After determining the form of the error correction model, it is also necessary to solve for the coefficients of each term: -IA, -NPAE, -CA, -AN, -AW, q0, q1, ..., q 11 ,q 12 By using the actual error and the actual azimuth and elevation angles, the coefficients of each term can be obtained through fitting using the least squares method, thus deriving the error correction model. The least squares method is a mathematical statistical method whose core principle is to minimize the sum of squares of the errors to find the best function for the data. In this process, the coefficients of the error correction model are adjusted to minimize the sum of squares of the differences between the model's predicted and actual values.
[0062] Step 5. Training the multinomial regression model
[0063] After initially fitting the data using an error correction model, this invention employs a multinomial regression model to further improve the pointing accuracy, thus fitting the remaining residuals again. Multinomial regression is an extension of linear regression. Linear regression uses a straight line to fit the data, such as a linear function y = kx + b, while multinomial regression uses a curve to fit the data, such as a quadratic function y = ax². 2 +bx+c, cubic function y=ax 3 +bx 2The data is fitted using functions such as +cx+d and multiple functions. The input to the polynomial regression model is a feature matrix composed of the actual azimuth and the corresponding actual elevation angles. The output of the model is the residual error remaining after the error correction model is fitted. These residual errors are the targets that the polynomial regression model needs to continue fitting. To find the most suitable model, we try to use polynomial regressions of orders 1 to 15 for fitting. After each fitting, the mean squared error (MSE) and R are calculated. 2 The two scores are used to judge and save the model with the highest score, and the theoretical residual is calculated based on this model.
[0064] This invention uses two performance metrics for validation: goodness of fit and overall RMS value. Goodness of fit is one of the important metrics for evaluating model performance, reflecting the degree of matching between model predictions and actual observations. It can be calculated in many different ways, the most common being using the coefficient of determination R. 2 R is also known as the goodness-of-fit coefficient. 2 The calculation formula is:
[0065]
[0066] Where, y i It is the actual value of the i-th set of observation data. It is the predicted value of the i-th set of observation data. R is the average of all observed data, where n is the number of observation groups. 2 The value is between 0 and 1. The closer the value is to 1, the better the model fits the data.
[0067] However, when the goodness of fit is high, the model's generalization ability deteriorates, and for data with nonlinear relationships, traditional goodness-of-fit indices cannot accurately reflect the model's fit. Therefore, the root mean square error (RMSE) is added, which reflects the accuracy of the model's predictions by calculating the mean of the squared differences between the predicted and actual values. The smaller the RMSE value, the higher the model's fitting accuracy. Assuming we have n sets of observation data, each set of observation data has a corresponding predicted value, then the formula for calculating RMSE is:
[0068]
[0069] Among them, Y pred,i Y represents the predicted value of the i-th observation. obs,iLet represent the actual value of the i-th observation, and n represent the number of observations. It's clear from the RMSE calculation formula that the square of the error is involved, making it highly sensitive to large prediction errors. This means that if the model's predicted values at certain observation points deviate significantly from the actual values, these large errors will be amplified in the RMSE value. Therefore, during the research process, these poorly predicted points can be directly addressed and improved.
[0070] This invention employs a polynomial regression model with an automatically determined appropriate order to fit the residuals. Analysis of the residuals after fitting the error correction model reveals a non-linear relationship, but the order is unknown. Therefore, this invention uses a polynomial regression model with an automatically determined appropriate order to fit the error data, employing polynomials from order 1 to 15 for fitting, and calculating the mean squared error (MSE) and coefficient of determination (R²). 2 The model with the highest score is saved for comparison. For example... Figure 3 As shown, the specific steps to automatically determine the order are as follows:
[0071] Step 5-1. Import necessary libraries
[0072] (1) Import the NumPy library for numerical computation.
[0073] (2) Import PolynomialFeatures, StandardScaler, LinearRegression, train_test_split, mean_squared_error, and r2_score from the sklearn library for multinomial regression, data standardization, linear regression, data splitting, mean squared error calculation, and R... 2 calculate.
[0074] (3) Import the joblib library to save and load the model.
[0075] Step 5-2. Data Preprocessing and Segmentation
[0076] (1) Create a function polynomial_regression. This function accepts the feature matrix X composed of the actual azimuth angle sj_AZ and the corresponding actual pitch angle sj_ALT, the residual error_ALT that still exists after the error correction model is fitted, as the target variable y, and sets the maximum polynomial degree max_degree to 5.
[0077] (2) Use StandardScaler to standardize the training and test sets to scale the data to the same range.
[0078] (3) Use the train_test_split function to split the dataset into a training set and a test set, with the test set accounting for 10%.
[0079] Step 5-3. Training and Optimization of the Multinomial Regression Model
[0080] (1) Initialize the best score, best number of attempts, best model, and best R-value. 2 Examples of fractional and optimal polynomial feature transformations.
[0081] (2) For each polynomial degree degree from 1 to max_degree, perform the following operations in sequence:
[0082] ① Use PolynomialFeatures for polynomial feature transformation.
[0083] ② Use LinearRegression for linear regression fitting.
[0084] ③ Calculate the mean square error and R on the test set. 2 Fraction.
[0085] ④ If the current mean squared error is less than the best score, then update the best score, best number of attempts, best model, and best R-squared value. 2 Fractions, and their corresponding polynomial characteristics.
[0086] (3) Use joblib to save the best multinomial regression model, normalizer and multinomial features to a local file for easy loading and use later.
[0087] Step 5-4. Call the model to predict the residual.
[0088] (1) Use joblib to load the saved model, normalizer and multinomial feature transformation instance.
[0089] (3) Standardize the new data and perform polynomial feature transformation.
[0090] (3) Use the loaded model to make predictions and return the prediction results.
[0091] Step 6. Overall Assessment and Correction
[0092] By calculating the residual between the fitted result and the actual error, a comparison graph of the actual error and the fitted result is plotted, such as... Figure 4-5 As shown, the model's fitting performance is visually demonstrated. The accuracy and reliability of the model are judged by evaluating two performance metrics: goodness of fit and the overall RMSE value.
[0093] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for fabricating and optimizing a comprehensive pointing model for an altazimuth telescope, characterized in that, Includes the following steps: Step 1: Use the basic parameter terms of the basic parameter model and the spherical harmonic terms of the spherical harmonic function model to form an error correction model; prior to this, there are also data acquisition and preprocessing steps, as well as error analysis and screening steps; The data acquisition and preprocessing steps include: inputting pointing commands to the telescope according to predetermined azimuth and elevation intervals, at which time the azimuth and elevation angles of the telescope are saved as actual values; taking multiple sets of star images, and obtaining the right ascension and declination corresponding to the centers of the multiple sets of star images by comparing them with standard star images; converting the right ascension and declination into azimuth and elevation angles in the horizontal coordinate system based on the recorded data in the star images, i.e., the theoretical values of azimuth and elevation angles; and calculating the deviation between the actual values and the theoretical values. The error analysis and screening steps include: analyzing the deviation data obtained from the data acquisition and preprocessing steps, and screening out error points that exceed a set threshold; Among them, azimuth pointing error and pitch angle pointing error They are expressed as follows: ; ; Where A, H, and Z represent the telescope's actual azimuth, elevation, and zenith distance, respectively. These are the coefficients of the basic parameter terms. It is the zero-point error of the azimuth angle. It is the zero-point error of the pitch angle. This indicates the non-orthogonality between the azimuth and pitch axes. This indicates the non-orthogonality between the telescope tube axis and the pitch axis. This indicates that the azimuth axis is tilted north-south. This indicates that the azimuth axis is tilted east-west. Indicates that the lens barrel is bent; The coefficient of the spherical harmonic term for azimuth is... The coefficients are the spherical harmonic function of the elevation angle. After fitting the coefficients based on the actual error, the telescope control system calculates the possible errors based on this model for each set of observations and then automatically corrects them. Step 2: Create a multinomial regression model using multinomial regression and machine learning methods; Among them, a multinomial regression model with automatic order determination is used to fit the residual error. After each fitting, the mean square error (RMSE) and R² are calculated and used as scores for judgment. The model with the highest score is saved, and the theoretical residual error is calculated based on this model. Step 3: Use a comprehensive pointing model consisting of an error correction model and a multinomial regression model to correct the telescope pointing deviation.
2. The method for fabricating and optimizing a comprehensive pointing model for a horizontal telescope according to claim 1, characterized in that, In step 1, the basic parameter model is established based on physical factors. The model is stable and each parameter has a clear physical meaning. A spherical harmonic function model is used to handle higher-order error terms. The combined error correction model is used to dynamically adjust parameters based on real-time observation data to adapt to different observation conditions and equipment status.
3. The method for fabricating and optimizing a comprehensive pointing model for a horizontal telescope according to claim 1, characterized in that, After determining the form of the error correction model in step 1, the coefficients of each term are solved. Using the actual error and the actual azimuth and elevation angles, the coefficients of each term are obtained by fitting using the least squares method, thus obtaining the error correction model. By adjusting the coefficients of the error correction model, the sum of squares of the differences between the model prediction and the actual value is minimized.
4. The method for fabricating and optimizing a comprehensive pointing model for a horizontal telescope according to claim 1, characterized in that, The specific steps for automatically determining the order are as follows: Step 2-1: Import necessary libraries: (1) Import the numpy library for numerical computation; (2) Import PolynomialFeatures, StandardScaler, LinearRegression, train_test_split, mean_squared_error and r2_score from the sklearn library for multinomial regression, data standardization, linear regression, data splitting, mean squared error calculation and R² calculation; (3) Import the joblib library for saving and loading models; Step 2-2: Data preprocessing and segmentation: (1) Create a function polynomial_regression, which accepts the feature matrix X composed of the actual azimuth angle sj_AZ and the corresponding actual pitch angle sj_ALT, the residual error_ALT that still exists after the error correction model fitting as the target variable y, and sets the maximum polynomial degree max_degree; (2) Use StandardScaler to standardize the training set and the test set to scale the data to the same range; (3) Use the train_test_split function to split the dataset into the training set and the test set; Steps 2-3: Multinomial regression model training and optimization: (1) Initialize the best score, best degree, best model, best R² score and best multinomial feature transformation instance; (2) Use joblib to save the best multinomial regression model, normalizer and multinomial features to a local file for easy loading and use later; Steps 2-4: Call the model to predict the residual: (1) Use joblib to load the saved model, normalizer and multinomial feature transformation instance; (2) Standardize the new data and perform multinomial feature transformation; (3) Use the loaded model to make predictions and return the prediction results.
5. The method for fabricating and optimizing a horizontal telescope integrated pointing model according to claim 4, characterized in that, In steps 2-3, for each polynomial degree degree from 1 to max_degree, perform the following operations in sequence: Step 2-3-1: Perform polynomial feature transformation using PolynomialFeatures; Step 2-3-2: Use LinearRegression to perform linear regression fitting; Step 2-3-3: Calculate the mean squared error and R² score on the test set; Steps 2-3-4: If the current mean squared error is less than the best score, then update the best score, best number, best model, best R² score, and the corresponding polynomial features.
6. The method for fabricating and optimizing a comprehensive pointing model for a horizontal telescope according to claim 1, characterized in that, Step 3 is followed by an overall evaluation and correction step. By calculating the residual between the fitting result and the actual error, a comparison chart of the actual error and the fitting result is drawn to visually demonstrate the fitting effect of the model. By evaluating the goodness of fit, the accuracy and reliability of the model are comprehensively judged.
